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

Build errors with ifort

yfort
Beginner
1,291 Views

Hi All,

After hours of googling, I decide to give up and ask the experts! I am trying to compile a fortran code using ifort on CentOS6.4.

I have installed all the pre-requisites for intel fortan.

Following is the error I am getting:
make -f makefile
ifort -o ./p2s2 -O2 -xW -static -traceback p2s2.o read_spray_data.o sector.o beam.o cylin.o mktrac.o spray_wall.o in_cylin.o wall_evapo.o part.o idle.o drop_evapo.o point_info.o dia_distri.o char_sub.o sector_incylin.o user_func2.o xy-sec_info.o r_info.o gross_evapo.o
ifort: command line remark #10279: option '-xW' is deprecated and will be removed in a future release. See '-help deprecated'
ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../..//libm.a when searching for -lm
ld: skipping incompatible /usr/lib/libm.a when searching for -lm
ld: skipping incompatible /usr/lib/libm.a when searching for -lm


Please let me know how to resolve this issue. I am new to using linux systems, any help is greatly appriciated, I looked at other threads but didn't get how to change the environment variables.

which ifort
/opt/intel/composer_xe_2013.5.192/bin/intel64/ifort

Thanks in advance!!

0 Kudos
6 Replies
mecej4
Honored Contributor III
1,291 Views

The commands issued by make show none for compilation and one command for linking, which failed because there is an apparent mismatch between 32-bit and 64-bit objects and libraries.

How were the *.o files compiled? All using Intel Fortran? Some mix of Gcc/GFortran and Intel Fortran? Were they compiled for 32-bit or 64-bit?

Did you use the command environment spawned by running ". /opt/intel/composer_xe_2013.5.192/bin/ifortvars.sh ia32"?

0 Kudos
yfort
Beginner
1,291 Views

Thank you for responding!

How were the *.o files compiled? All using Intel Fortran? - Yes all were complied by Intel Fortran composerxe2011

Were they compiled for 32-bit or 64-bit? - Yes they were complied on 64bit version

I used -> source /opt/intel/composer_xe_2013.5.192/bin/compilervars.sh intel64

0 Kudos
mecej4
Honored Contributor III
1,291 Views

Thanks. It would help if you could display the value of LD_LIBRARY_PATH (type "echo $LD_LIBRARY_PATH" in the IFort shell).

0 Kudos
yfort
Beginner
1,291 Views

Hi Mecej4, thanks a lot!

These are the runtime lib for 2011 version

echo $LD_LIBRARY_PATH
/lib/composerxe-2011/intel64

0 Kudos
TimP
Honored Contributor III
1,291 Views

Among the problems would be that a basic CentOS6 installation of g++ would not include the libraries required by your -static option.  If you can build without -static but still want to build with -static, you will need to find corresponding 64-bit .a libraries.

An intermediate choice would be -static-intel, which will choose the static libraries provided with ifort.  Then you could try -static-libgcc which would require .a versions of files which come with g++,

0 Kudos
yfort
Beginner
1,291 Views

Yup, that was the exact problem thanks all for your help.

0 Kudos
Reply