Handle different OpenMP flags for Fortran and C
There was an inconsistency when the OpenMP flag was different for the Fortran and C compiler (e.g. -openmp for ifort and -fopenmp for gcc). This led to strange errors when linking the example program with the C main() routine when using Intel Fortran, Intel MPI, and GCC together, a typical error message was /usr/bin/ld: MPIR_Thread: TLS definition in [...]/intel64/lib/libmpi_dbg_mt.so section .tbss mismatches non-TLS definition in [...]/intel64/lib/libmpi_dbg.so section .bss [...]/intel64/lib/libmpi_dbg_mt.so: could not read symbols: Bad value The reason seems to be that the various MPI wrapper shell scripts (mpicc, mpiifort) need the correct OpenMP option to select the thread-safe Intel MPI debug library. Previously, always OPENMP_FCFLAGS was appended to LDFLAGS, which did not trigger this when linking a C main program with mpicc.
Showing with 39 additions and 33 deletions