Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

-m64 flag doesn't seem to work

pDs
Beginner
138 Views

 

Greetings, 

I've compiled a project from source with the command:

ifort -c ../Source/*/* -std90 -m64

Next, I try to link all the binaries with 

ifort * -o runfile

This generates the warning 

ld: warning: ld: warning: ld: warning: ld: warning: ld: warning: ignoring file noise_general.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0x93 0x01 0x00 0x00 0x04 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): noise_general.modld: warning: ld: warning: ignoring file nwtc_const.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0x5F 0x04 0x00 0x00 0x09 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): nwtc_const.modignoring file airfoilparams.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0x01 0x04 0x00 0x00 0x0D 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): airfoilparams.modignoring file nwtc_aero.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0xAE 0x09 0x00 0x00 0x16 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): nwtc_aero.modignoring file noise_inputs.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0x92 0x06 0x00 0x00 0x18 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): noise_inputs.mod
ignoring file atmosphere.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0x3E 0x02 0x00 0x00 0x06 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): atmosphere.modignoring file blparams.mod, file was built for unsupported file format ( 0x0C 0x00 0x01 0x00 0x38 0x03 0x00 0x00 0x06 0x00 0x00 0x00 0x6B 0x38 0x32 0x30 ) which is not the architecture being linked (x86_64): blparams.mod

 

So it seems the -m64 flag is being ignored by the compiler. How do I resolve this?

Best Regards,
Pranav

0 Kudos
1 Reply
Lorri_M_Intel
Employee
138 Views

Instead of linking all files (which is what you get with the simple * expression)  try

ifort *.o  -o runfile

 

This will link the object files, but not the .mod files.   

Please note that .mod files are not readable by the linker/loader no matter whether you've got -m64 on the command line or not.   These are files generated for use by the compiler.

                  --Lorri

Reply