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

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

alexvader
初学者
1,867 次查看
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 项奖励
2 回复数
Ron_Green
主持人
1,867 次查看
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 项奖励
alexvader
初学者
1,867 次查看
Hi Ron

Thanks for your reply

The new FFLAGS did it... :)

BRGDS

Alex
0 项奖励
回复