- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Current ifx does not support command line option qopenmp-lib (e.g. with -qopenmp-lib=compat for linking with gcc compiled C code). In the documentation I could not find any hint as to what should be done with ifx. Is this option still necessary? Is it planned to be added later on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-qopenmp-lib is on the "options being removed" list. See ifx -qnextgen-diag for a list of options planned and removed.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-qopenmp-lib is on the "options being removed" list. See ifx -qnextgen-diag for a list of options planned and removed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fact that ifx does not support -qopenmp-lib=compat is a surprise to me. If your Fortran main wants to call an external C library with Openmp from gomp or MS, why would ifx be any different from ifort, which supports this option? I am baffled.
I will dig into this a bit deeper.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ron_Green and I did some digging. What do you expect to happen when you use -qopenmp-lib=compat? Do you have a reproducer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This option has been present for ages in my makefile, but it does not seem to be necessary anymore, even with a couple years old classical ifort. Originally it was necessary to link gcc compiled library with fortran code using ifort for the linking.
Here is a small test code, compiled with (source files are omp_c.c and omp_f.f90)
gcc -fopenmp -c omp_c.c -o omp_c.o
ifort -qopenmp omp_c.o omp_f.f90 -o omp_cf.x
int run_c(int N) {
int i, s;
s = 0;
#pragma omp parallel for private(i) reduction(+:s)
for(int i = 1; i <= N; i++) {
s += i;
}
return s;
}
program omp_f
use iso_c_binding, only: c_int
implicit none
interface
function run_c(N) result(s) bind(c, name="run_c")
import :: c_int
integer(c_int) :: s
integer(c_int), value :: N
end function run_c
end interface
integer :: s, N
N = 10000
s = run_c(N)
print *, N, s
end program omp_f
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, @martinmath, for confirming that -qopenmp-lib=compat is no longer needed and for the reproducer.
Migrating applications to a new compiler can be a challenge. We recently added a section to the Intel Fortran Porting Guide, Compiler Options for Intel Fortran Compiler First Use. That includes a number of compiler options that check your application for validity before doing any optimizations. Another suggestion is to recompile only with "-O2 -xhost" as a start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I submitted a documentation bug report to deprecate the compiler option -qopenmp-lib, /Qopenmp-lib, for ifort and to clarify that it is an ifort only compiler option.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page