Support for OpenMP in gfortran has been committed to GCC mainline.
It may take a few days for pre-built binaries to show up on the
gfortran wiki. Note, GCC's OpenMP implementation requires that
your operating system have a working pthread library.
Yes, there are still several bugs in gfortran. The one, which
will impact may of the c.l.f regular posters, is the scalarization
of TRANSFER. This bug is currently being fixed.
Thanks for all the efforts and time you guys have put in. It is amazing
what open source can achieve!
raju
Thank you very much to Steven and the rest of the Gnu Fortran 95 crew.
Well done!
I hope the following question is not too off topic for this group:
I have downloaded the 20060220 snapshot of gfortran onto my Linux i686
system and tried to rebuild a program that I have successfully built
previously with gfortran in serial mode and with other compilers in
OpenMP mode. It fails at the link stage, with a message suggesting to me
that it cannot find a thread-related function. The command is
(simplified because I really don't want to go into the details):
gfortran -ff2c (various .o and .a files) -lnetcdf
and the failure messages are
: undefined reference to `omp_get_thread_num__'
: undefined reference to `omp_get_max_threads__'
Now, the missing functions look like they come from Gfortran's OpenMP
code, so I'm wondering if the problem is caused by the "-ff2c" switch.
But I need that to link to the netCDF library, which I also built with
-ff2c, and I don't know how to build the netCDF library without -ff2c,
because it relies on Fortran->C linkage.
Any comments? Does my diagnosis look reasonable? What do I do next?
--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.had...@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
You need the -fopenmp option to get OpenMP. I don't know
if there is some strange interaction between the -ff2c
and -fopenmp. As this is vendor specific question, you
should probably post a question to fortran at gcc.gnu.org.