Opened 9 years ago

Closed 4 years ago

Last modified 4 years ago

#10224 closed enhancement (fixed)

(new-style) packages for saclib 2.2.6 and qepcad-B.1.69

Reported by: bgoodri Owned by: tbd
Priority: major Milestone: sage-6.8
Component: packages: optional Keywords: qepcad
Cc: jason, cwitty, jondo Merged in:
Authors: Thierry Monteil Reviewers: Jeroen Demeyer, Matthias Koeppe, Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 4c26982 (Commits) Commit:
Dependencies: Stopgaps:

Description (last modified by tmonteil)

There exists a new upstream versions of saclib and qepcad that compile on 64 bit machines at https://www.usna.edu/CS/qepcadweb/INSTALL/IQ.html

Sources:

Copy both tarballs into your $SAGE_ROOT/upstream directory and rename saclib2.2.6.tar.gz to saclib-2.2.6.tar.gz

There could be some improvements to the QEPCAD interface, but it would probably be better for me to open separate tickets and base them on the updated spkg.

Another thing that would be good to include is Chris Brown's SLFQ program

https://www.usna.edu/CS/qepcadweb/SLFQ/Home.html

which calls QEPCAD B. I have gotten SLFQ to build outside of sage with a couple of patches, but I have not actually gotten it to work yet.

Change History (50)

comment:1 Changed 9 years ago by bgoodri

  • Cc cwitty added
  • Component changed from optional packages to experimental package
  • Description modified (diff)
  • Milestone changed from sage-4.6.1 to sage-4.6.2
  • Status changed from new to needs_info

comment:2 Changed 9 years ago by maldun

Works fine for me. (Ubuntu 10.10)

But did you make a Mercurial update of your changes? If I build your package I get:

Created package qepcad-1.54.p0.spkg.

NAME: qepcad

VERSION: 1.54.p0

SIZE: 4.0M

HG REPO: Unchecked in changes

SPKG.txt: Good

Btw: Version 1.55 is out, perhaps try to use the new source.

Regards, Stefan

comment:3 Changed 7 years ago by kcrisman

If this ever wants to leave experimental, it will need some changes. See for instance this sage-support thread, where it seems some of the install scripts are tcsh (?!?), and #11933 confirms it doesn't build everywhere. The spkg-install will need work, too - there is no checking whether saclib even builds correctly before going on!

This spkg link does still work for now, though, which is good!

comment:4 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:5 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:6 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:7 Changed 5 years ago by jondo

  • Cc jondo added
  • Description modified (diff)

Updated the links in the description.

comment:8 Changed 5 years ago by chapoton

  • Keywords qepcad added

comment:9 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:10 Changed 5 years ago by kcrisman

Note that http://trac.sagemath.org/ticket/16642 and https://groups.google.com/forum/#!topic/sage-support/X6U8FxnNuzU continue to confirm this optional package does not compile everywhere...

comment:11 Changed 5 years ago by jondo

  • Description modified (diff)

I again updated the links to the QEPCAD pages.

comment:12 Changed 5 years ago by mkoeppe

There's a fork of qepcad with a CMake-based build system here: https://github.com/PetterS/qepcad

Still does not compile on Mac OS X because of gnu-libc-isms such as using "ieee754.h"

(sage-sh) mkoeppe@d245:qepcad$ cmake .
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /Users/mkoeppe/s/sage/sage-6.5/local/bin/gcc
-- Check for working C compiler: /Users/mkoeppe/s/sage/sage-6.5/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /Users/mkoeppe/s/sage/sage-6.5/local/bin/g++
-- Check for working CXX compiler: /Users/mkoeppe/s/sage/sage-6.5/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mkoeppe/s/qepcad
(sage-sh) mkoeppe@d245:qepcad$ make
Scanning dependencies of target saclib
[  0%] Building C object CMakeFiles/saclib.dir/saclib/src/AADV.c.o
In file included from /Users/mkoeppe/s/qepcad/saclib/include/saclib.h:11:0,
                 from /Users/mkoeppe/s/qepcad/saclib/src/AADV.c:13:
/Users/mkoeppe/s/qepcad/saclib/include/hfloats.h:23:21: fatal error: ieee754.h: No such file or directory
 #include <ieee754.h>
                     ^
compilation terminated.
make[2]: *** [CMakeFiles/saclib.dir/saclib/src/AADV.c.o] Error 1
make[1]: *** [CMakeFiles/saclib.dir/all] Error 2
make: *** [all] Error 2

comment:13 Changed 5 years ago by mkoeppe

  • Description modified (diff)
  • Milestone changed from sage-6.4 to sage-6.7
  • Status changed from needs_info to needs_work
  • Summary changed from upgrading qepcad-1.50.spkg to 1.54 to upgrading qepcad-1.50.spkg to 1.69

comment:14 Changed 4 years ago by tmonteil

  • Branch set to u/tmonteil/saclib_2_2_6_qepcad_B_1_69

comment:15 Changed 4 years ago by tmonteil

  • Authors set to Thierry Monteil
  • Commit set to 5fc251ec297bb925929b6eb7f8307399175bb8be
  • Component changed from packages: experimental to packages: optional
  • Description modified (diff)
  • Priority changed from minor to major
  • Status changed from needs_work to needs_review
  • Summary changed from upgrading qepcad-1.50.spkg to 1.69 to (new-style) packages for saclib 2.2.6 and qepcad-B.1.69
  • Type changed from task to enhancement

I made two (new-style) packages for latest saclib and qepcad, see the branch. According to saclib2.2.6/sysdep, this should build on linuxX86, linuxX86_64, macosX86, macosX86_64, solarisSparc. The packages work well on my Debian/jessie/65bits. Let's see if you can let it work on mac (i cannot test myself). I updated instructions on the ticket description.


New commits:

3b5ecbf#10224 : saclib 2.2.6 package.
5fc251e#10224 : qepcad B.1.69 package.

comment:16 follow-up: Changed 4 years ago by mkoeppe

Quick fix for non-GNU find on Mac OS X:

diff --git a/build/pkgs/qepcad/spkg-install b/build/pkgs/qepcad/spkg-install
index 01f850e..1f7566b 100755
--- a/build/pkgs/qepcad/spkg-install
+++ b/build/pkgs/qepcad/spkg-install
@@ -42,7 +42,7 @@ fi
 
 
 # install binaries to the Sage tree
-find -name *.a -exec cp {} $SAGE_LOCAL/lib/
+find . -name *.a -exec cp {} $SAGE_LOCAL/lib/ \;
 cp source/qepcad $SAGE_LOCAL/bin/
 cp bin/qepcad.help $SAGE_LOCAL/bin/
 cp ../sage-qepcad $SAGE_LOCAL/bin/

Unfortunately it segfaults:

(sage-sh) mkoeppe@d100:sage-develop$ qepcad
Segmentation fault: 11

Only the help screen works:

(sage-sh) mkoeppe@d100:sage-develop$ qepcad -h
usage: qepcad [-h] [-noecho] [+N<numcells>]

QEPCAD B v1.69 is a program for studying Cylindrical Algebraic Decomposition (CAD). It constructs CADs from an input formula and 
variable order, and provides many commands for getting info out of the CAD, including construction of simple equivalent Tarski 
formulas.

Options
-h      : Help information
-noecho : Turns off echoing of input

Saclib options
+N<numcells> : Sets garbage collected space to <numcells>.  Default is 2000000.

comment:17 Changed 4 years ago by git

  • Commit changed from 5fc251ec297bb925929b6eb7f8307399175bb8be to 3e9b14f86e96565f5b26a2f3b0e9a3b1efbb95d8

Branch pushed to git repo; I updated commit sha1. New commits:

3e9b14f#10224 : fix for non-GNU find on Mac OS X (comment 16).

comment:18 Changed 4 years ago by git

  • Commit changed from 3e9b14f86e96565f5b26a2f3b0e9a3b1efbb95d8 to 12ecf56c516bf1c3eb4e66b170e2d407e56cac55

Branch pushed to git repo; I updated commit sha1. New commits:

12ecf56#10224 : fix variable name in sage-qepcad.

comment:19 in reply to: ↑ 16 Changed 4 years ago by tmonteil

Replying to mkoeppe:

Quick fix for non-GNU find on Mac OS X:

Done.

Unfortunately it segfaults:

Could you try again with the new branch and the sage-qepcad command instead of qepcad ?

comment:20 Changed 4 years ago by tmonteil

Could you also try from Sage if you get the following behaviour:

sage: var('a,b,c,d,x,y,z')
(a, b, c, d, x, y, z)
sage: qf = qepcad_formula
sage: ellipse = 3*x^2 + 2*x*y + y^2 - x + y - 7
sage: F = qf.exists(y, ellipse == 0); F
(E y)[3 x^2 + 2 x y + y^2 - x + y - 7 = 0]
sage: qepcad(F)
8 x^2 - 8 x - 29 <= 0

comment:21 Changed 4 years ago by tmonteil

  • Status changed from needs_review to needs_work

There are also some failed (but correct) doctests to fix.

comment:22 Changed 4 years ago by git

  • Commit changed from 12ecf56c516bf1c3eb4e66b170e2d407e56cac55 to 2e32ee1595e879a31c632f93630e3660e6ba1838

Branch pushed to git repo; I updated commit sha1. New commits:

2e32ee1#10224 : fix broken doctests.

comment:23 Changed 4 years ago by tmonteil

  • Status changed from needs_work to needs_review

The following should also work:

sage -t --optional=sage,qepcad $SAGE_ROOT/src/sage/interfaces/qepcad.py

comment:24 Changed 4 years ago by git

  • Commit changed from 2e32ee1595e879a31c632f93630e3660e6ba1838 to 000773df6a54f0f0ef2e67121a265837bcddf0db

Branch pushed to git repo; I updated commit sha1. New commits:

000773d#10224 : fix version.

comment:25 Changed 4 years ago by mkoeppe

Works for me now! Thanks very much for working on this!

sage -t --optional=sage,qepcad $SAGE_ROOT/src/sage/interfaces/qepcad.py
too few successful tests, not using stored timings

Running doctests with ID 2015-06-25-17-27-17-09f49200.
Git branch: t/10224/saclib_2_2_6_qepcad_B_1_69
Using --optional=qepcad,sage
Doctesting 1 file.
sage -t src/sage/interfaces/qepcad.py
    [317 tests, 4.58 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------

comment:26 Changed 4 years ago by tmonteil

Great!

comment:27 Changed 4 years ago by ncohen

Helloooooooooooo,

Just leaving a note here that if you create a new-style package that replaces an old-style package (it seems to be the case for qepcad?) then somebody should ask Harald to remove the old-style package from the "optional/" folder on the mirrors, and move it to the "archive/" folder instead.

Otherwise we will be having consistency problems at some point.

Thanks,

Nathann

comment:28 follow-up: Changed 4 years ago by dimpase

on a 32-bit machine I get:

./sage -tp --long --optional=gcc,lidia,mpir,normaliz,python2,sage,scons,qepcad src/sage/interfaces/qepcad.py 
Running doctests with ID 2015-06-30-11-43-27-4a2e1119.
Git branch: qep
Using --optional=gcc,lidia,mpir,normaliz,python2,qepcad,sage,scons
Doctesting 1 file using 4 threads.
sage -t --long --warn-long 73.3 src/sage/interfaces/qepcad.py
**********************************************************************
File "src/sage/interfaces/qepcad.py", line 98, in sage.interfaces.qepcad
Failed example:
    qepcad(F)                                         # optional - qepcad
Expected:
    x^2 - 3 <= 0 /\ 8 x^2 - 8 x - 29 <= 0 /\ 8 x^4 - 26 x^2 - 4 x + 13 >= 0 /\ [ 8 x^4 - 26 x^2 - 4 x + 13 = 0 \/ x^2 - 3 = 0 \/ 8 x^2 - 8 x - 29 = 0 ]
Got:
    8 x^2 - 8 x - 29 <= 0 /\ x^2 - 3 <= 0 /\ 8 x^4 - 26 x^2 - 4 x + 13 >= 0 /\ [ 8 x^4 - 26 x^2 - 4 x + 13 = 0 \/ x^2 - 3 = 0 \/ 8 x^2 - 8 x - 29 = 0 ]
**********************************************************************
1 item had failures:
   1 of  60 in sage.interfaces.qepcad
    [317 tests, 1 failure, 3.25 s]
----------------------------------------------------------------------
sage -t --long --warn-long 73.3 src/sage/interfaces/qepcad.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 23.2 seconds
    cpu time: 1.5 seconds
    cumulative wall time: 3.2 seconds

i.e. the inequalities might come up in a different order.

comment:29 in reply to: ↑ 28 ; follow-ups: Changed 4 years ago by tmonteil

Replying to dimpase:

on a 32-bit machine I get:

[...]

i.e. the inequalities might come up in a different order.

I propose to add a "not tested" flag to those examples in order not to pollute the tutorial, and then add tests that transforms the string to a set of substrings so that we can test equality. Does it makes sense ?

comment:30 follow-up: Changed 4 years ago by git

  • Commit changed from 000773df6a54f0f0ef2e67121a265837bcddf0db to 0535b3a228e65609f6ecd85837af2eb999b73280

Branch pushed to git repo; I updated commit sha1. New commits:

1fa7536#10224 : add a _qepcad_atoms() function to deal with the nondeterministic order of formulas in doctests.
0535b3a#10224 : remove useless "# optional - qepcad".

comment:31 in reply to: ↑ 29 Changed 4 years ago by tmonteil

Replying to dimpase:

i.e. the inequalities might come up in a different order.

I did the changes i proposed in 29. Does the doctests now work with your 32-bit machine ?

comment:32 in reply to: ↑ 30 ; follow-up: Changed 4 years ago by dimpase

Replying to git:

Branch pushed to git repo; I updated commit sha1. New commits:

1fa7536#10224 : add a _qepcad_atoms() function to deal with the nondeterministic order of formulas in doctests.
0535b3a#10224 : remove useless "# optional - qepcad".

why are # optional - qepcad useless?

comment:33 in reply to: ↑ 32 Changed 4 years ago by tmonteil

Replying to dimpase:

why are # optional - qepcad useless?

I meant: among the occurrences of # optional - qepcad i removed the uselesses, that is the one for which the tests can be run without qepcad installed.

Typically, the calls to qepcad_formula do only create some srtings, they not require qepcad to be installed. Only the calls to the qepcad command require qepcad to be installed.

comment:34 Changed 4 years ago by tmonteil

To get convinced that they were not needed, just run the doctests without qepcad installed.

comment:35 Changed 4 years ago by dimpase

  • Milestone changed from sage-6.7 to sage-6.8
  • Status changed from needs_review to positive_review

LGTM

comment:36 in reply to: ↑ 29 Changed 4 years ago by jdemeyer

Replying to tmonteil:

I propose to add a "not tested" flag to those examples in order not to pollute the tutorial, and then add tests that transforms the string to a set of substrings so that we can test equality. Does it makes sense ?

Better use # random instead of # not tested if you want to run the tests but not check the output.

comment:37 Changed 4 years ago by jdemeyer

  • Status changed from positive_review to needs_work

Also reviewer name is missing...

comment:38 follow-up: Changed 4 years ago by dimpase

OK, I'd be happy to give a positive review once the change proposed by Jeroen is done.

comment:39 Changed 4 years ago by tmonteil

Replying to jdemeyer:

Better use # random instead of # not tested if you want to run the tests but not check the output.

Actually, the tests tagged # not tested are run in the TESTS: section that follows the EXAMPLE: section where it appears, but there, the output is sent to a function that makes a set of atoms so that the difference of ordering (that seems arch dependent) is taken into account. So, be both have meaningful user-friendly examples and the doctest are still executed and partially checked. Hence, if i replace # not tested with # random in the EXAMPLE: section, those tests will be run twice and take longer. I do not mind doing this, but i do not see the point since any test is already run at least once. Tell me.

comment:40 follow-up: Changed 4 years ago by jdemeyer

OK, I see your point.

One reason to still have # random is to make it more explicit that the output of the test is random. When a test says "not tested", it is not clear why it is not tested. At the very least, write something like # not tested (random order).

How much time do those tests take? If we're talking about a few seconds, then I would just use # random.

And the reviewer name is still missing.

comment:41 Changed 4 years ago by dimpase

  • Reviewers set to Jeroen Demeyer, Matthias Koeppe, Dima Pasechnik

comment:42 Changed 4 years ago by git

  • Commit changed from 0535b3a228e65609f6ecd85837af2eb999b73280 to e0b1caf1004eac2d3de2139c357c356925dc07e2

Branch pushed to git repo; I updated commit sha1. New commits:

e0b1caf#10224 : make explicit why some examples are not tested (random order).

comment:43 in reply to: ↑ 40 Changed 4 years ago by tmonteil

  • Status changed from needs_work to needs_review

Replying to jdemeyer:

At the very least, write something like # not tested (random order).

I like this alternative, both explicit and not redundant.

comment:44 in reply to: ↑ 38 Changed 4 years ago by novoselt

Replying to dimpase:

OK, I'd be happy to give a positive review once the change proposed by Jeroen is done.

So - it is done and can be positive reviewed? (I don't really follow what is going on here, but I will add these packages to SageMathCell when they are ready.)

comment:45 Changed 4 years ago by dimpase

trying this with the latest beta, and seeing that one needs to set "make -j1" in order to build qepcad successfully. At least for me...

comment:46 Changed 4 years ago by dimpase

  • Branch changed from u/tmonteil/saclib_2_2_6_qepcad_B_1_69 to public/10224
  • Commit changed from e0b1caf1004eac2d3de2139c357c356925dc07e2 to 4c26982db224d191dc3793edd54cd4ed77a8407c
  • Status changed from needs_review to positive_review

added one more commit to indicate the latter issue in SPKG.txt

comment:47 Changed 4 years ago by vbraun

  • Branch changed from public/10224 to 4c26982db224d191dc3793edd54cd4ed77a8407c
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:48 follow-up: Changed 4 years ago by novoselt

  • Commit 4c26982db224d191dc3793edd54cd4ed77a8407c deleted

Given that it fails consistently with "make -j2" and most likely parallel building is enabled, shouldn't the build script enforce "make -j1" rather than mention it somewhere?..

comment:49 in reply to: ↑ 48 Changed 4 years ago by rws

Replying to novoselt:

Given that it fails consistently with "make -j2" and most likely parallel building is enabled, shouldn't the build script enforce "make -j1" rather than mention it somewhere?..

Exactly, please review #19450.

comment:50 Changed 4 years ago by jondo

This issue's component is packages: optional. Currently the package is 'experimental'. In order to promote it to 'optional', it needs to build on all supported systems. Is this already the case?

Note: See TracTickets for help on using tickets.