I've recently created a Makefile for building an image processing package with ifc. Previously on the linux platform pgi was the supported compiler. The code is f90. Thanks to the forum for help with a couple of issues along the way. Now that the code compiles and links, I am having some runtime errors with OpenMP and my use of an external library, fftw (fastest fourier transform in the west). The platform is Red Hat 8.0, ifc is version 7.0 (see comments below about compatibility).
Problem 1: I compile with -openmp and explicitly link -lguide, -lpthread, and -lPEPCF90. I do not use -parallel. During compile I get many messages that OpenMP routines are being parallelized. Yet when I run the code, only one CPU is being used. The machine is a dual-xeon with hyperthreading kernel enabled, and OMP_NUM_THREADS is set to 2 (have also tried 4), although this should not be necessary.
Problem 2: I've compiled the thread version of fftw, and even compiled the fortran interface portion of fftw with ifc. I link the fftw libraries successfully in my executable. But when code is reached that uses fftw, the program either segfaults (+core, if more than 1 thread was requested) or silently dies (no core, if only 1 thread was requested). I've looked at the corefile with gdb, stacktrace seems to show the crash occur after a couple of libpthread calls. The pthread lib linked (dynamically) here is /lib/i686/libpthread.so.0. There is a different version of libpthread.so in /lib (same version 0.10, but different filesize).
Recalling concerns with compatibility of ifc 7.0 and the glibc 2.2.93 included with Red Hat 8.0 (although I've not previously had problems with other programs I've built under this combination), I tried using ifc 6.0 with my code. This gives me an internal compiler error during compile, about 75% of the way through.
From searching this forum, I also see references to the need for libpthread to be built with support for FLOATING_STACKS. I don't know how to check if this is the case in Red Hat 8.0.
Other misc. compiler flags I'm using: -O2 -WB -mp -fpp2 -auto -pc64 -c -cm -w95 -tpp7 -xW
Thanks in advance for any suggestions, regarding either of these issues.
Problems with OpenMP; fftw (long, sorry)