mersenneforum.org GMP-ECM with --enable-openmp flag set in configure = bad results?
 Register FAQ Search Today's Posts Mark Forums Read

2016-10-16, 01:35   #1
GP2

Sep 2003

32·7·41 Posts
GMP-ECM with --enable-openmp flag set in configure = bad results?

In the README file for GMP-ECM, it mentions using the possibility of using the --enable-openmp flag with the configure command. This enables multithreading and greater parallelism in stage 2.

I ran configure with this flag and compiled 7.0.4, and "make check" indicated the tests were passed. However, when I tried testing it, it missed a P-1 factor it should have found.

First I ran:

Code:
echo "2^20173-1" | ./ecm -pm1 -save toto.txt 50e6 50e6
which finds the composite factor 237664504975279983867404174809 = 121039 * 525947712473 * 3733330406447, which are the first three factors of M20173 (2,20173−)

Then I ran:

Code:
./ecm -resume toto.txt 50e6 150e6
This choice of B1 and B2 should find the fourth factor
242259284775981115080842803960207
= 2kp + 1, k = 3 × 449773 × 628373 × 49835969 × 142103537

However, ecm-7.0.4 configured with --enable-openmp does not find this fourth factor, whereas ecm-7.0.3 configured without --enable-openmp does find it.

This was using gcc 4.8 on Linux, which presumably implies support of OpenMP 3.1, which are both somewhat outdated versions, but these are standard on Amazon Linux.

The save file toto.txt is included as an attachment. The second command above (stage 2) takes only a few seconds to complete.

Is there any more extensive test suite for gmp-ecm beyond what is provided by "make check" ?
Attached Files
 toto.txt (5.1 KB, 95 views)

2016-10-16, 06:24   #2
xilman
Bamboozled!

"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

296016 Posts

Quote:
 Originally Posted by GP2 In the README file for GMP-ECM, it mentions using the possibility of using the --enable-openmp flag with the configure command. This enables multithreading and greater parallelism in stage 2. I ran configure with this flag and compiled 7.0.4, and "make check" indicated the tests were passed. However, when I tried testing it, it missed a P-1 factor it should have found. ... Is there any more extensive test suite for gmp-ecm beyond what is provided by "make check" ?
I suggest that you raise this question with the dev team. They are much more likely to give you a definitive and/or helpful answer than the folk here.

2016-10-16, 08:51   #3
GP2

Sep 2003

32×7×41 Posts

Quote:
 Originally Posted by xilman I suggest that you raise this question with the dev team. They are much more likely to give you a definitive and/or helpful answer than the folk here.
One reason I posted here was to warn other users or get feedback about whether anyone else has tried to enable OpenMP, and also providing a very simple test case that can be checked in a few seconds.

2016-10-16, 10:21   #4
xilman
Bamboozled!

"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

25·331 Posts

Quote:
 Originally Posted by GP2 One reason I posted here was to warn other users or get feedback about whether anyone else has tried to enable OpenMP, and also providing a very simple test case that can be checked in a few seconds.
Good point, and a useful contribution. Nonetheless you should mail ecm-discuss@lists.gforge.inria.fr so that a much wider audience learns about the issue and so that a fix can be prepared.

 Similar Threads Thread Thread Starter Forum Replies Last Post BrainStone Mlucas 14 2017-11-19 00:59 richs YAFU 11 2016-01-30 14:27 Mr. P-1 Programming 77 2015-02-23 00:04 R. Gerbicz Programming 13 2011-09-22 01:11 graysky Hardware 4 2004-10-17 10:23

All times are UTC. The time now is 22:39.

Fri Mar 5 22:39:35 UTC 2021 up 92 days, 18:50, 0 users, load averages: 1.28, 1.51, 1.51