This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgomp: Thread creation failed: Invalid argument


I am very happy to see that gfortran from current gcc snapshots can 
successfully compile an 18000 lines Fortran 77 numerics program I wrote. 
Results are indeed the same as obtained with other compilers (g77, PGI, 
ifort), and also execution speed seems roughly comparable, although I 
haven't yet done any precise measurements.
A big thank you to the developers for that!

Now I am trying to get the program to run with OpenMP, which works 
(although slower than anticipated) with PGI and ifort compilers. While I 
can successfully build and execute small OpenMP test programs, starting my 
large program fails with the message

  libgomp: Thread creation failed: Invalid argument

resulting from a failing call to pthread_create() in libgomp/team.c.

Using gdb I see that pthread_create() is called with the same 
gomp_thread_attr argument as for the smaller, succeeding testcases.

strace shows that pthread_create() fails without trying to call clone(), 
while the clone() call of course does happen for the succeeding testcases.

How to further debug this problem?
I am currently using gcc-4.2-20060812 on i686 and x86_64 SuSE 10.0 Linux 
systems.

Thank you,
Tim



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]