Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28995 Discussions

what is the intel equivalent to -fopenmp of gfortran.. ?

alexvader
Beginner
1,725 Views
Hi

I am trying to compile a piece of software with the flags

FFLAGS = -Wall -O2 -fopenmp -nofor-main

CC=icc
FC=ifort

But the compilation yelds a lot of warnings and the binary cannot take advantage of Openmpi parallelization in the thread count

ifort -Wall -O2 -fopenmp -nofor-main -c addimdnodecload.f
ifort: command line warning #10157: ignoring option '-W'; argument is of wrong
type
ifort: command line warning #10006: ignoring unknown option '-fopenmp'
ifort -Wall -O2 -fopenmp -nofor-main -c addimdnodedload.f
ifort: command line warning #10157: ignoring option '-W'; argument is of wrong
type
ifort: command line warning #10006: ignoring unknown option '-fopenmp'
ifort -Wall -O2 -fopenmp -nofor-main -c addizdofcload.f
ifort: command line warning #10157: ignoring option '-W'; argument is of wrong
type
ifort: command line warning #10006: ignoring unknown option '-fopenmp'
ifort -Wall -O2 -fopenmp -nofor-main -c addizdofdload.f
ifort: command line warning #10157: ignoring option '-W'; argument is of wrong
type
ifort: command line warning #10006: ignoring unknown option '-fopenmp'
ifort -Wall -O2 -fopenmp -nofor-main -c add_bo_st.f
ifort: command line warning #10157: ignoring option '-W'; argument is of wrong
type
ifort: command line warning #10006: ignoring unknown option '-fopenmp'
ifort -Wall -O2 -fopenmp -nofor-main -c add_pr.f
ifort: command line warning #10157: ignoring option '-W'; argument is of wrong
type
ifort:

-------------------------------------------------------------------------------------------

and it goes like that till the end of compilation.


Which flags should i use with ifort compiler to acheive the same results obtained with the gfortran compiler...?

Best regards

Alex
0 Kudos
2 Replies
Ron_Green
Moderator
1,725 Views
I dunno what gfortran's -Wall does, is this to get all compiler warnings? If so then

-warn all -O2 -openmp -nofor-main

You should consider reading the friendly manual on both compilers to confirm this selection.

ron
0 Kudos
alexvader
Beginner
1,725 Views
Hi Ron

Thanks for your reply

The new FFLAGS did it... :)

BRGDS

Alex
0 Kudos
Reply