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

Optimization flags

Zuheyr_A_
Beginner
921 Views

Hello,

I am using Ubintu Linux 8.10,

~$ uname -a
Linux zuheyr-desktop 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:06 UTC 2008 x86_64 GNU/Linux

The processor is Intel Core 2 Duo, Dell Inspiron 530S desktop. I am using

~$ which ifort

/opt/intel/fce/10.1.018/bin/ifort

I would greatly appreciate if I can figure out the best optimization flags for the fortran compiler

which still retains the numerical accuracy. I am doing benchmarks and it is running much slower than lahey fortran 64 bit compiler...

Many thanks for reading, Regards, Zuheyr

0 Kudos
5 Replies
TimP
Honored Contributor III
921 Views

The processor is Intel Core 2 Duo, Dell Inspiron 530S desktop. I am using

/opt/intel/fce/10.1.018/bin/ifort

I would greatly appreciate if I can figure out the best optimization flags for the fortran compiler

which still retains the numerical accuracy. I am doing benchmarks and it is running much slower than lahey fortran 64 bit compiler...

It would help if you would divulge which options you use on the 2 compilers, how critical you are about accuracy, and what kind of operations you want to speed up.

'ifort -xP -O3 -parallel -assume protect_parens,buffered_io' usually works well. It is certainly possible to find benchmarks which run faster at -O1.

Current ifort has some improved optimizations.

0 Kudos
Zuheyr_A_
Beginner
921 Views
Quoting - tim18

It would help if you would divulge which options you use on the 2 compilers, how critical you are about accuracy, and what kind of operations you want to speed up.

'ifort -xP -O3 -parallel -assume protect_parens,buffered_io' usually works well. It is certainly possible to find benchmarks which run faster at -O1.

Current ifort has some improved optimizations.

Hi,

Thank you very much. I am using -O3 for both. When I used the options you suggested I got the following error message:

../../PROGRAM/hyp_grid-if.exe: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

Many thanks for your time. Regards, Zuheyr

0 Kudos
Zuheyr_A_
Beginner
921 Views

Hi,

Thank you very much. I am using -O3 for both. When I used the options you suggested I got the following error message:

../../PROGRAM/hyp_grid-if.exe: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

Many thanks for your time. Regards, Zuheyr

Hi again, furthermore, when I removed the -parallel option, it just crashed at some point with the error

segmentation fault.

When I use -O3 it is working.

Thank you again, Regards Zuheyr

0 Kudos
TimP
Honored Contributor III
921 Views

Hi,

Thank you very much. I am using -O3 for both. When I used the options you suggested I got the following error message:

../../PROGRAM/hyp_grid-if.exe: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

Many thanks for your time. Regards, Zuheyr

When you set -parallel or -openmp, or link in libraries built with similar options, libiomp will be required at run time. Then it is doubly important to set LD_LIBRARY_PATH (e.g. by running the ifortvars script in the same directory as ifort).

0 Kudos
kiran_nalawade
Beginner
921 Views


You are not setting the library path .. just look for the proper one ..

0 Kudos
Reply