Closed malb closed 15 years ago
Hi! It's damn hot here. At the moment, I don't know any more, why you shouldn't just use the constructor Variable(i). Is it, as you have to attach the parent? Unluckily, we use use Variable(i) in a lot of places from python. Of course, it would be cleaner to do something like ring.gen(i). Michael
Replying to @sagetrac-PolyBoRi:
Is it, as you have to attach the parent?
Yep, it is still somewhat strange that the code above is so slow.
I think, we should wait for Alexander having a look on it, who might have an idea, what happens. Michael
By the way, there happen at least two things: the call BooleEnv::ring and
static ring_type& ring(){
return active_ring;
}
the assigment operator.
It must be the assignment operator (or the dummy constructor) then.
Thanks, a lot, you did it. I didn't remember this Cython thingy. It is the dummy constructor. The assignment doesn't do anything. It is isn't defined. So it is the standard c++ behaviour. However the dummy constructors of the ring should construct a CuddManager, which means something like allocating a memory pool. Michael
faster Variable(i)
Attachment: polybori-0.6.3.2.patch.gz
The attached patch fixes the bottleneck by avoiding the dummy constructor. Note, that we still need to take care of that Solaris issue Dave reported where scons would pick up the Sun compiler instead of gcc.
Attachment: custom.py.gz
Solaris fix for patches/custom.py
I added some lines to custom.py, s.th. C and C++ compiler are picked from the Sage environment (if any). This fixes the Solaris issue.
Regards, Alexander
I have added this fix to the newest SPKG available at:
http://sage.math.washington.edu/home/malb/spkgs/polybori-0.6.3-20090825.spkg
There seems to be a pickling problem, try the following on sage.math:
sage -t -long devel/sage/sage/structure/sage_object.pyx
I've found another Solaris issue. I tried a build of Sage from scratch on my Solaris machine, which has Sun Studio 12 update 1 in /opt/sunstudio12.1
You will note below that SCons can't write to the file sage-4.1.1/local/share/polybori/flags.conf, as it does not exist.
It strikes me the build process of this leaves a bit to be desired. Note in the following line, -fPIC is twice used as a flag (... -g -fPIC -fPIC -DNDEBUG), and the 'gd' library is linked no less than four times in the line following that (...-Lgroebner -LCudd -lm -lgd -lgd -lgd -lgd). Looking at install.log I see numerous instances of this.
Another thing that I believe would be helpful is if there was a space between the '-h' flag and the library name, which appears below as "-Wl,-hlibpboriCudd-0.6.3.so.0". Although the Sun linker will accept that, I think having "-Wl,-h libpboriCudd-0.6.3.so.0" would be a bit neater. But all these are minor points compared to the fact polybori fails as it can't write to a file which does not exist.
gcc -o M4RI/brilliantrussian.pic.o -c -std=c99 -O3 -Wno-long-long -Wreturn-type -g -fPIC -fPIC -DNDEBUG -DHAVE_GD -DHAVE_TR1_UNORDERED_MAP -DPACKED -DHAVE_M4RI -DHAVE_GD -DHAVE_IEEE_754 -DBSD -I/export/home/drkirkby/sage/tmp/sage-4.1.1/spkg/build/polybori-0.6.3-20090825/src/boost_1_34_1.cropped -I/export/home/drkirkby/sage/tmp/sage-4.1.1/local/include -I/export/home/drkirkby/sage/tmp/sage-4.1.1/local/include/python2.6 -Ipolybori/include -IM4RI -ICudd/obj -ICudd/util -ICudd/cudd -ICudd/mtr -ICudd/st -ICudd/epd M4RI/brilliantrussian.c
g++ -o groebner/libgroebner-0.6.3.so.0.0.0 -G -Wl,-hlibgroebner-0.6.3.so.0 Cudd/obj/cuddObj.pic.o Cudd/util/cpu_time.pic.o Cudd/util/state.pic.o Cudd/util/datalimit.pic.o Cudd/util/texpand.pic.o Cudd/util/pipefork.pic.o Cudd/util/strsav.pic.o Cudd/util/ptime.pic.o Cudd/util/tmpfile.pic.o Cudd/util/stub.pic.o Cudd/util/cpu_stats.pic.o Cudd/util/safe_mem.pic.o Cudd/util/getopt.pic.o Cudd/util/prtime.pic.o Cudd/util/pathsearch.pic.o Cudd/cudd/cuddApprox.pic.o Cudd/cudd/cuddRead.pic.o Cudd/cudd/cuddLevelQ.pic.o Cudd/cudd/cuddCof.pic.o Cudd/cudd/cuddGenetic.pic.o Cudd/cudd/cuddZddPort.pic.o Cudd/cudd/cuddMatMult.pic.o Cudd/cudd/cuddZddIsop.pic.o Cudd/cudd/cuddAPI.pic.o Cudd/cudd/cuddZddGroup.pic.o Cudd/cudd/cuddZddSymm.pic.o Cudd/cudd/cuddRef.pic.o Cudd/cudd/cuddZddMisc.pic.o Cudd/cudd/cuddDecomp.pic.o Cudd/cudd/cuddZddUtil.pic.o Cudd/cudd/cuddLiteral.pic.o Cudd/cudd/cuddAddNeg.pic.o Cudd/cudd/cuddPriority.pic.o Cudd/cudd/cuddAnneal.pic.o Cudd/cudd/cuddInit.pic.o Cudd/cudd/cuddZddSetop.pic.o Cudd/cudd/cuddReorder.pic.o Cudd/cudd/cuddSolve.pic.o Cudd/cudd/cuddBddCorr.pic.o Cudd/cudd/cuddAddFind.pic.o Cudd/cudd/cuddAddInv.pic.o Cudd/cudd/cuddWindow.pic.o Cudd/cudd/cuddAddIte.pic.o Cudd/cudd/cuddAddAbs.pic.o Cudd/cudd/cuddZddReord.pic.o Cudd/cudd/cuddBddAbs.pic.o Cudd/cudd/cuddBddIte.pic.o Cudd/cudd/cuddLinear.pic.o Cudd/cudd/cuddSign.pic.o Cudd/cudd/cuddCheck.pic.o Cudd/cudd/cuddZddCount.pic.o Cudd/cudd/cuddZddFuncs.pic.o Cudd/cudd/cuddEssent.pic.o Cudd/cudd/cuddGroup.pic.o Cudd/cudd/cuddSplit.pic.o Cudd/cudd/cuddSat.pic.o Cudd/cudd/cuddAddApply.pic.o Cudd/cudd/cuddLCache.pic.o Cudd/cudd/cuddCache.pic.o Cudd/cudd/cuddAndAbs.pic.o Cudd/cudd/cuddHarwell.pic.o Cudd/cudd/cuddBridge.pic.o Cudd/cudd/cuddUtil.pic.o Cudd/cudd/cuddExport.pic.o Cudd/cudd/cuddSubsetHB.pic.o Cudd/cudd/cuddAddWalsh.pic.o Cudd/cudd/cuddSymmetry.pic.o Cudd/cudd/cuddTable.pic.o Cudd/cudd/cuddApa.pic.o Cudd/cudd/cuddCompose.pic.o Cudd/cudd/cuddZddLin.pic.o Cudd/cudd/cuddExact.pic.o Cudd/cudd/cuddSubsetSP.pic.o Cudd/cudd/cuddGenCof.pic.o Cudd/cudd/cuddClip.pic.o Cudd/cudd/cuddInteract.pic.o Cudd/mtr/mtrBasic.pic.o Cudd/mtr/mtrGroup.pic.o Cudd/st/st.pic.o Cudd/epd/epd.pic.o polybori/src/BoolePolyRing.pic.o polybori/src/BooleEnv.pic.o polybori/src/BoolePolynomial.pic.o polybori/src/BooleVariable.pic.o polybori/src/CErrorInfo.pic.o polybori/src/PBoRiError.pic.o polybori/src/CCuddFirstIter.pic.o polybori/src/CCuddNavigator.pic.o polybori/src/BooleMonomial.pic.o polybori/src/BooleSet.pic.o polybori/src/LexOrder.pic.o polybori/src/CCuddLastIter.pic.o polybori/src/CCuddGetNode.pic.o polybori/src/BooleExponent.pic.o polybori/src/DegLexOrder.pic.o polybori/src/DegRevLexAscOrder.pic.o polybori/src/pbori_routines.pic.o polybori/src/BlockDegLexOrder.pic.o polybori/src/BlockDegRevLexAscOrder.pic.o groebner/src/groebner.pic.o groebner/src/literal_factorization.pic.o groebner/src/randomset.pic.o groebner/src/pairs.pic.o groebner/src/groebner_alg.pic.o groebner/src/fglm.pic.o groebner/src/polynomial_properties.pic.o groebner/src/lexbuckets.pic.o groebner/src/dlex4data.pic.o groebner/src/dp_asc4data.pic.o groebner/src/lp4data.pic.o groebner/src/nf.pic.o groebner/src/interpolate.pic.o M4RI/grayflex.pic.o M4RI/permutation.pic.o M4RI/packedmatrix.pic.o M4RI/strassen.pic.o M4RI/misc.pic.o M4RI/brilliantrussian.pic.o -L/export/home/drkirkby/sage/tmp/sage-4.1.1/local/lib -L/export/home/drkirkby/sage/tmp/sage-4.1.1/local/lib/python2.6/config -Lpolybori -Lgroebner -LCudd -lm -lgd -lgd -lgd -lgd
g++ -o Cudd/libpboriCudd-0.6.3.so.0.0.0 -G -Wl,-hlibpboriCudd-0.6.3.so.0 Cudd/obj/cuddObj.pic.o Cudd/util/cpu_time.pic.o Cudd/util/state.pic.o Cudd/util/datalimit.pic.o Cudd/util/texpand.pic.o Cudd/util/pipefork.pic.o Cudd/util/strsav.pic.o Cudd/util/ptime.pic.o Cudd/util/tmpfile.pic.o Cudd/util/stub.pic.o Cudd/util/cpu_stats.pic.o Cudd/util/safe_mem.pic.o Cudd/util/getopt.pic.o Cudd/util/prtime.pic.o Cudd/util/pathsearch.pic.o Cudd/cudd/cuddApprox.pic.o Cudd/cudd/cuddRead.pic.o Cudd/cudd/cuddLevelQ.pic.o Cudd/cudd/cuddCof.pic.o Cudd/cudd/cuddGenetic.pic.o Cudd/cudd/cuddZddPort.pic.o Cudd/cudd/cuddMatMult.pic.o Cudd/cudd/cuddZddIsop.pic.o Cudd/cudd/cuddAPI.pic.o Cudd/cudd/cuddZddGroup.pic.o Cudd/cudd/cuddZddSymm.pic.o Cudd/cudd/cuddRef.pic.o Cudd/cudd/cuddZddMisc.pic.o Cudd/cudd/cuddDecomp.pic.o Cudd/cudd/cuddZddUtil.pic.o Cudd/cudd/cuddLiteral.pic.o Cudd/cudd/cuddAddNeg.pic.o Cudd/cudd/cuddPriority.pic.o Cudd/cudd/cuddAnneal.pic.o Cudd/cudd/cuddInit.pic.o Cudd/cudd/cuddZddSetop.pic.o Cudd/cudd/cuddReorder.pic.o Cudd/cudd/cuddSolve.pic.o Cudd/cudd/cuddBddCorr.pic.o Cudd/cudd/cuddAddFind.pic.o Cudd/cudd/cuddAddInv.pic.o Cudd/cudd/cuddWindow.pic.o Cudd/cudd/cuddAddIte.pic.o Cudd/cudd/cuddAddAbs.pic.o Cudd/cudd/cuddZddReord.pic.o Cudd/cudd/cuddBddAbs.pic.o Cudd/cudd/cuddBddIte.pic.o Cudd/cudd/cuddLinear.pic.o Cudd/cudd/cuddSign.pic.o Cudd/cudd/cuddCheck.pic.o Cudd/cudd/cuddZddCount.pic.o Cudd/cudd/cuddZddFuncs.pic.o Cudd/cudd/cuddEssent.pic.o Cudd/cudd/cuddGroup.pic.o Cudd/cudd/cuddSplit.pic.o Cudd/cudd/cuddSat.pic.o Cudd/cudd/cuddAddApply.pic.o Cudd/cudd/cuddLCache.pic.o Cudd/cudd/cuddCache.pic.o Cudd/cudd/cuddAndAbs.pic.o Cudd/cudd/cuddHarwell.pic.o Cudd/cudd/cuddBridge.pic.o Cudd/cudd/cuddUtil.pic.o Cudd/cudd/cuddExport.pic.o Cudd/cudd/cuddSubsetHB.pic.o Cudd/cudd/cuddAddWalsh.pic.o Cudd/cudd/cuddSymmetry.pic.o Cudd/cudd/cuddTable.pic.o Cudd/cudd/cuddApa.pic.o Cudd/cudd/cuddCompose.pic.o Cudd/cudd/cuddZddLin.pic.o Cudd/cudd/cuddExact.pic.o Cudd/cudd/cuddSubsetSP.pic.o Cudd/cudd/cuddGenCof.pic.o Cudd/cudd/cuddClip.pic.o Cudd/cudd/cuddInteract.pic.o Cudd/mtr/mtrBasic.pic.o Cudd/mtr/mtrGroup.pic.o Cudd/st/st.pic.o Cudd/epd/epd.pic.o -L/export/home/drkirkby/sage/tmp/sage-4.1.1/local/lib -L/export/home/drkirkby/sage/tmp/sage-4.1.1/local/lib/python2.6/config -Lpolybori -Lgroebner -LCudd -lm -lgd -lgd -lgd -lgd
build_symlink(["polybori/libpolybori-0.6.3.so.0"], ["polybori/libpolybori-0.6.3.so.0.0.0"])
Symlinking from libpolybori-0.6.3.so.0.0.0 to polybori/libpolybori-0.6.3.so.0
build_symlink(["polybori/libpolybori-0.6.3.so"], ["polybori/libpolybori-0.6.3.so.0"])
Symlinking from libpolybori-0.6.3.so.0 to polybori/libpolybori-0.6.3.so
build_symlink(["polybori/libpolybori.so"], ["polybori/libpolybori-0.6.3.so"])
Symlinking from libpolybori-0.6.3.so to polybori/libpolybori.so
build_symlink(["groebner/libgroebner-0.6.3.so.0"], ["groebner/libgroebner-0.6.3.so.0.0.0"])
Symlinking from libgroebner-0.6.3.so.0.0.0 to groebner/libgroebner-0.6.3.so.0
build_symlink(["groebner/libgroebner-0.6.3.so"], ["groebner/libgroebner-0.6.3.so.0"])
Symlinking from libgroebner-0.6.3.so.0 to groebner/libgroebner-0.6.3.so
build_symlink(["groebner/libgroebner.so"], ["groebner/libgroebner-0.6.3.so"])
Symlinking from libgroebner-0.6.3.so to groebner/libgroebner.so
build_symlink(["Cudd/libpboriCudd-0.6.3.so.0"], ["Cudd/libpboriCudd-0.6.3.so.0.0.0"])
Symlinking from libpboriCudd-0.6.3.so.0.0.0 to Cudd/libpboriCudd-0.6.3.so.0
build_symlink(["Cudd/libpboriCudd-0.6.3.so"], ["Cudd/libpboriCudd-0.6.3.so.0"])
Symlinking from libpboriCudd-0.6.3.so.0 to Cudd/libpboriCudd-0.6.3.so
build_symlink(["Cudd/libpboriCudd.so"], ["Cudd/libpboriCudd-0.6.3.so"])
Symlinking from libpboriCudd-0.6.3.so to Cudd/libpboriCudd.so
scons: done building targets.
Done build_polybori.
Installing PolyBoRi...
scons: Reading SConscript files ...
Sun linker detected.
Checking for C header file gd.h... (cached) yes
Checking for C library gd... (cached) yes
Checking for C++ header file unordered_map... (cached) no
Checking for C++ header file tr1/unordered_map... (cached) yes
Warning: No LaTeX to html converter found, Tutorial will not be installed
Checking for C library m4ri... (cached) no
Checking for C header file gd.h... (cached) yes
Checking for C library gd... (cached) yes
no python extension
setting umask to 022 (was 022)
scons: *** Error writing options to file: /export/home/drkirkby/sage/tmp/sage-4.1.1/local/share/polybori/flags.conf
[Errno 2] No such file or directory: '/export/home/drkirkby/sage/tmp/sage-4.1.1/local/share/polybori/flags.conf'
File "/export/home/drkirkby/sage/tmp/sage-4.1.1/spkg/build/polybori-0.6.3-20090825/src/polybori-0.6/SConstruct", line 1281, in <module>
Error installing PolyBoRi.
real 18m9.386s
user 16m29.417s
sys 1m23.875s
sage: An error occurred while installing polybori-0.6.3-20090825
Patched the (patched) patch/SConstruct to fix the "flags.conf" issue
Attachment: flags-conf.patch.gz
Indeed, this is not a Solaris issue, but it will occur always, in the case, that PolyBoRi wasn't installed in the corresponding Sage before. Some patch from Sage adds the generation of flags.conf
, but that goes wrong, if the installation directory does not exist before. The flags-conf.patch above should fix the problem.
Regards, Alexander
I would suggest to postpone the minor issues (duplicated arguments, missing, but not mandatory space) to the next release of PolyBoRi.
Alexander
Alright, the new SPKG deals with the flags.conf issue (thanks Alexander)
http://sage.math.washington.edu/home/malb/spkgs/polybori-0.6.3-20090827.spkg
I will postpone the fPIC issue for now and will concentrate on the pickling issue.
Reviewer: David Kirkby, Alex Ghitza
Author: Michael Brickenstein, Alexander Dreyer, Martin Albrecht
Attachment: polybori-0.6.3.3.patch.gz
fixes the pickling issue
The attached patch fixes the pickling issue and now all doctests pass on sage.math.
Attachment: trac_6177_reviewer_patch.gz
minor fixes
I added a patch with minor changes:
sage/crypto/mq/mpolynomialsystem.py
eval()
in module_list.py
I give Martin's patch and the package a positive review. Martin, if you're ok with my changes, please mark this positive review.
Only attachment: polybori-0.6.3.3.patch and attachment: trac_6177_reviewer_patch should be applied, with the package linked from comment:54.
Changed reviewer from David Kirkby, Alex Ghitza to David Kirkby, Alex Ghitza, Burcin Erocal
Burcin's patch looks good, applies cleanly against 4.1.2.alpha1 and doctests pass.
Its done, finally!
Merged patches in this order:
polybori-0.6.3.3.patch
trac_6177_reviewer_patch
Merged polybori-0.6.3-20090827.spkg
in the standard packages repository.
Merged: Sage 4.1.2.alpha2
Attachment: trac_6177-polybori-0.6.3.3.patch.gz
repo corrupt-free version
with the ".patch" file extension
Attachment: trac_6177_reviewer.patch.gz
I have attached two new patches
trac_6177-polybori-0.6.3.3.patch
--- This is the same as polybori-0.6.3.3.patch
. The only change is inserting the comment
# Insert a comment here to prevent repo corruption.
into the empty file sage/libs/polybori/__init__.py
in order to prevent repository corruption as was reported on IRC by William Stein:
20:14 < williamstein> mvngu -- possible problem with alpha2
20:14 < williamstein> i get /scratch/wstein/build/sage-4.1.2.alpha3/devel/sage-main/sage/rings/polynomial/pbori.pxd:10:0: 'sage.libs.polybori.decl.pxd' not found
20:15 < williamstein> "repo corruption"?
20:15 < williamstein> yep
20:15 < williamstein> wstein@sage:~/build/sage-4.1.2.alpha3/devel/sage$ hg status
20:15 < williamstein> ! sage/libs/polybori/__init__.py
20:15 < williamstein> I fix it with:
20:15 < williamstein> wstein@sage:~/build/sage-4.1.2.alpha3/devel/sage$ hg revert --all
20:15 < williamstein> reverting sage/libs/polybori/__init__.py
20:16 < mvngu> williamstein: yeah, I just do "make" again.
20:16 < williamstein> mvngu -- that always bites you for some reason.
20:17 < mvngu> I have been experiencing that problem on every machine I'm building on.
20:17 < mvngu> It's always about polybori.
trac_6177_reviewer.patch
--- This is the same as trac_6177_reviewer_patch
. I put in the file extension ".patch" so that the patch would be displayed with colour on trac.Only merge these:
trac_6177-polybori-0.6.3.3.patch
trac_6177_reviewer.patch
add files to MANIFEST.in
Attachment: trac_6177-manifest.patch.gz
The patch trac_6177-manifest.patch
adds the following files to MANIFEST.in:
sage/libs/polybori/__init__.py
sage/libs/polybori/decl.pxd
This way, the files would be picked up when making a source release. By now, patches should be merged in this order:
trac_6177-polybori-0.6.3.3.patch
trac_6177_reviewer.patch
trac_6177-manifest.patch
Changed reviewer from David Kirkby, Alex Ghitza, Burcin Erocal to David Kirkby, Alex Ghitza, Burcin Erocal, Minh Van Nguyen
This version also allows bigger systems to be solved using the M4RI library (due to an updated M4RI) and makes use of M4RI in shared library mode.
This ticket depends on #5510
CC: @sagetrac-PolyBoRi @burcin @rlmill @boothby
Component: packages: standard
Keywords: M4RI, PolyBoRi
Author: Michael Brickenstein, Alexander Dreyer, Martin Albrecht
Reviewer: David Kirkby, Alex Ghitza, Burcin Erocal, Minh Van Nguyen
Merged: Sage 4.1.2.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/6177