![]() |
|
|
#34 | |
|
Jun 2003
Ottawa, Canada
3×17×23 Posts |
Quote:
I'm not sure if there is svn for mingw, but you can get it for cygwin so you could do it that way as well. |
|
|
|
|
|
|
#35 | |
|
"Mark"
Apr 2003
Between here and the
11000110101002 Posts |
Quote:
|
|
|
|
|
|
|
#36 |
|
Jun 2003
Ottawa, Canada
3×17×23 Posts |
Ok, looks like I found some values that work with -k1 so now I will do a bit more testing with some Release mode binaries to make sure it still works with all three -k values and if yes, let you know what the stack size settings are and release a new binary for people.
|
|
|
|
|
|
#37 |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
7×292 Posts |
What is the disadvantage in increasing the stack size? If nothing then we should increase well above what we need as we will just run into the problem again.
|
|
|
|
|
|
#38 | |
|
Jun 2003
Ottawa, Canada
3·17·23 Posts |
Quote:
It seems to be stable with -k1 using 32KB commit, and 6MB reserve. To give some extra room for other inputs, I could use 64K commit and 8MB reserve. I will try to see if I can actually measure any memory usage differences between them. |
|
|
|
|
|
|
#39 |
|
Jun 2003
Ottawa, Canada
3×17×23 Posts |
Ok, so it looks like everything is running fine now and there wasn't any real measurable difference between the 32KB/6MB and 64KB/8MB stack sizes (maybe 100K difference) so these are the settings I'm using:
Stack Reserve Size: 8388608 Stack Commit Size: 65536 Brian, can you please update the VS project file to use those stack sizes to put in gmp-ecm's SVN repository? I will release a new set of binaries soon. Jeff. |
|
|
|
|
|
#40 |
|
Einyen
Dec 2003
Denmark
2×1,579 Posts |
Is this only fixed for the Visual Studio project files? or can I compile it with mingw64 as well?
|
|
|
|
|
|
#41 | |
|
Jun 2003
Ottawa, Canada
3·17·23 Posts |
Quote:
In UNIX, you can actually set the stack use using ulimit -s right inside the shell, not sure if you can do the same in the msys shell or not, so don't need to recompile, just change the shell parameters before you run. Jeff. |
|
|
|
|
|
|
#42 |
|
Jun 2003
Ottawa, Canada
3×17×23 Posts |
Before I make a full release, can a couple of you (especially lavalamp and ATH) please try this Windows 64bit Core2 based binary to make sure it also works fine for you?
You can download it from here: http://gilchrist.ca/jeff/factoring/ecm_test.zip Thanks, Jeff. |
|
|
|
|
|
#43 |
|
Einyen
Dec 2003
Denmark
2×1,579 Posts |
I'll test it tonight when I get home.
Can anyone with a deeper understanding of gcc help me with how to increase stack size as Jeff suggest in post #39. Is it these 2 options I need to use? Code:
-mpreferred-stack-boundary=num Attempt to keep the stack boundary aligned to a 2 raised to num byte boundary. If ‘-mpreferred-stack-boundary’ is not specified, the default is 4 (16 bytes or 128 bits). -mincoming-stack-boundary=num Assume the incoming stack is aligned to a 2 raised to num byte boundary. If ‘-mincoming-stack-boundary’ is not specified, the one specified by ‘-mpreferred-stack-boundary’ will be used. On Pentium and PentiumPro, double and long double values should be aligned to an 8 byte boundary (see ‘-malign-double’) or suffer significant run time performance penalties. On Pentium III, the Streaming SIMD Extension (SSE) data type __m128 may not work properly if it is not 16 byte aligned. To ensure proper alignment of this values on the stack, the stack boundary must be as aligned as that required by any value stored on the stack. Further, every function must be generated such that it keeps the stack aligned. Thus calling a function compiled with a higher preferred stack boundary from a function compiled with a lower preferred stack boundary will most likely misalign the stack. It is recommended that libraries that use callbacks always use the default setting. This extra alignment does consume extra stack space, and generally increases code size. Code that is sensitive to stack space usage, such as embedded systems and operating system kernels, may want to reduce the preferred alignment to ‘-mpreferred-stack-boundary=2’. |
|
|
|
|
|
#44 | |
|
Mar 2006
13·37 Posts |
Quote:
gcc -Wl,--stack,16777216 -o file.exe file.c Or, with gmp-ecm, you can configure it with LDFLAGS like so: ./configure CFLAGS="options" LDFLAGS="-Wl,--stack,16777216" These commands increase the Stack Reserve Size of the compiled application to 16MB. Unfortunately, this command line option (-Wl) can't change the Stack Commit Size. I'm not 100% sure the LDFLAGS option is correct. I tried it two different ways and make and 'make check' passed both times. Maybe both ways work, or maybe only one is correct, I'm not sure how to check the stack size of an executable, and I have to leave for work. So, the two different LDFLAGS to try are: LDFLAGS="-Wl,--stack,16777216" LDFLAGS="-Wl,--stack=16777216" Hopefully we can find out which way is correct and how to find out what the actual stack size of an executable is. |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| gmp-ecm crash | yoyo | GMP-ECM | 26 | 2011-06-01 06:31 |
| Crash! | storm5510 | Software | 8 | 2009-08-31 02:07 |
| GMP-ECM crash on win XP SP3 | yoyo | GMP-ECM | 2 | 2009-01-26 19:22 |
| Crash? | remaker | Software | 4 | 2007-05-03 16:39 |
| Crash | coastertux | Software | 2 | 2004-03-16 20:49 |