Hello,
It appears that although the most recent svn update (Revision 109975) of gcc compiles apparently fine, simple OpenMP programs will only operate when OMP_NUM_THREADS=1. I am compiling and running gcc on a Dual CPU G5 PowerPC running OS X 10.4.4. If I compile omp_hello.c from testsuite/libgomp.c with

 gcc -fopenmp omp_hello.c -o omp_hello -lgomp

then the program reports that 1 thread is created. If I then set OMP_NUM_THREADS=2, omp_hello hangs. If one runs recomplies this program, runs it in gdb and Ctrl-C's it when it hangs, here is the backtrace generated

#0  0x900c48fc in sem_wait ()
#1 0x00020c24 in gomp_sem_wait (sem=0x222c4) at ../../../gomp/ libgomp/config/posix/sem.c:44 #2 0x00020d68 in gomp_barrier_wait_end (bar=0x22298, last=4294967295) at ../../../gomp/libgomp/config/posix/bar.c:92 #3 0x000202f8 in gomp_team_start (fn=0x2a08 <main.omp_fn.0>, data=0x0, nthreads=2, work_share=0x0) at ../../../gomp/libgomp/team.c: 293
#4  0x000029e0 in main (argc=1, argv=0xbffff714) at omp_hello.c:33

Thanks,
Walter Szeliga



Reply via email to