Slug #773
DMPZmerge: make non-recursive
Description
The fn DMPZmerge
is recursive; this is a problem when dealing with large polys.
Rewrite it to be iterative.
History
#1 Updated by John Abbott over 8 years ago
- % Done changed from 0 to 10
Problem was signalled by email (from Winfried Bruns, Bogdan Ichim on 2015-09-14). It appears to be a stack overflow: it worked OK for me when I increased stacksize to 32768 (Kbytes), but failed with SEGV when I tried a smaller stacksize (e.g. 16384).
Here is how to reproduce the problem:
you must have both normaliz
and nmzIntegrate
compiled;
now start the command
./nmzIntegrate -c -E 7x7footballSymm
You will also need the following two files:
This is 7x7footballSymm.in
:
6 7 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 1 -1 inequalities 1 7 1 1 1 1 1 1 1 signs 1 7 1 1 1 1 1 1 1 grading
And this is 7x7footballSymm.pnm
:
1/120*1/120*1/120*1/120*1/120*1/120*1/120* (x[1]+5)* (x[1]+4)* (x[1]+3)* (x[1]+2)* (x[1]+1)* (x[2]+5)* (x[2]+4)* (x[2]+3)* (x[2]+2)* (x[2]+1)* (x[3]+5)* (x[3]+4)* (x[3]+3)* (x[3]+2)* (x[3]+1)* (x[4]+5)* (x[4]+4)* (x[4]+3)* (x[4]+2)* (x[4]+1)* (x[5]+5)* (x[5]+4)* (x[5]+3)* (x[5]+2)* (x[5]+1)* (x[6]+5)* (x[6]+4)* (x[6]+3)* (x[6]+2)* (x[6]+1)* (x[7]+5)* (x[7]+4)* (x[7]+3)* (x[7]+2)* (x[7]+1)
PS JAA is not actually sure whether the PNM file is actually needed.
#2 Updated by John Abbott over 8 years ago
- Status changed from New to In Progress
- Assignee set to John Abbott
- % Done changed from 10 to 50
I have had a "quick hack" at the code. The CoCoA/CoCoALib tests all pass, but I'm not sure that any of them actually uses the code in DMPZmerge
.
I'll try sending (by email) the hacked code to the enthusastic alpha testers... ;-)
PS given how little I slept last night, and that it's the end of the day, and I'm drinking (Erika's) wine... no guarantees about the quickly hacked code!
#3 Updated by John Abbott over 8 years ago
I have now rewritten the hacked code in a cleaner way, but shall still wait for confirmation from the Normaliz group that it works fine for them before checking it into CVS.
#4 Updated by Christof Soeger over 8 years ago
I can confirm that it is working with your quickly hacked code!
#5 Updated by John Abbott over 8 years ago
- Status changed from In Progress to Feedback
- % Done changed from 50 to 90
- Estimated time set to 3.90 h
I have checked in a cleaned up version of the new code.
I hope Christof will verify that this version is still fine.
#6 Updated by Christof Soeger over 8 years ago
It does! Thanks for the fix!
NOTE phew! Thanks for the confirmation :-)
#7 Updated by John Abbott about 8 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100