------- Comment #8 from geir at cray dot com 2009-09-18 18:41 ------- Here is how other compilers process this code:
PGI: $ pgf90 -mp test.f90 $ ./a.out Warning: omp_set_num_threads (4) greater than available cpus (2) tmp, fsize 3.141592653589793 -7 s = 0.000000000000000 $ pgf90 test.f90 $ ./a.out tmp, fsize 3.141592653589793 -7 s = 100.0000000000000 $ Intel: $ ifort -openmp test.f90 $ ./a.out tmp, fsize 3.14159265358979 -7 s = 100.000000000000 $ ifort test.f90 /tmp/pbs.1871075.sdb/ifortE1EQWX.o: In function `MAIN__': test.f90:(.text+0x3e): undefined reference to `omp_set_num_threads_' $ Cray: $ ftn -target=native -Oomp test.f90 /opt/cray/xt-asyncpe/3.3/bin/ftn: INFO: native target is being used $ ./a.out tmp, fsize 3.1415926535897931, -7 s = 0. $ ftn -target=native -Onoomp test.f90 /opt/cray/xt-asyncpe/3.3/bin/ftn: INFO: native target is being used $ ./a.out tmp, fsize 3.1415926535897931, -7 s = 100. $ I would say that none of the above are desired behavior, but rather a runtime error message should be printed out. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33439