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

Convert Fortran configuration from Linux to windows

Saleh
Novice
795 Views

Hello. 

I am using a Fortran subroutine for Abaqus software.  

The Fortran compiler is configured as follow based on Linux Os. But I want to use the subroutine through windows OS and unfortunately, I don't know how to write the following configuration on windows Os (how to convert it to Windows format). 

 

compile_fortran= 'ifort -V -c -fPIC -auto -mP2OPT_hpo_vec_divbyzero=F -extend_source -fpp -free -WB -I%I'

 

For example, I know that "-free" in Linux converts to "/free" in windows. But I don't have any clue about others. 

 

Thanks in advance,

Best

0 Kudos
8 Replies
mecej4
Black Belt
733 Views

Look up the compiler options in your compiler documentation. For example, for the current OneAPI Fortran compilers, here are the details . Some options apply only to the Windows compiler, some others only to the Linux compiler. The other options may have slight differences.

Saleh
Novice
683 Views

Thanks, mecej4. 

I have found most of them but unfortunately, I have not found "-mP2OPT_hpo_vec_divbyzero" and  "-I%I". 

Do you have any clue about them?

Great thanks

ClariceStarling
Valued Contributor II
680 Views

I really thought Intel just make processors ... nice to hear about all the Fortran ... I love you guys!

mecej4
Black Belt
669 Views

The Linux compiler and the Windows compiler do not always have corresponding pairs of options. Furthermore, the goal should not be to try to translate the Linux options to their Windows equivalents. It is really the ANSYS for Windows product that should specify which options to use on Windows.

Similarly, shell substitutions and pattern matching symbols from BASH will not work  in CMD windows. You have to find the purpose and look for a replacement, if possible.

Saleh
Novice
661 Views

Thanks. You're right. 

Unfortunately, I don't know their meanings and purposes ("-mP2OPT_hpo_vec_divbyzero" and  "-I%I"). 

mecej4
Black Belt
659 Views

Just leave out the optimization option that is not recognized. The other option seems to be for specifying a path for include files. It also may not be needed. Try building without it. The Windows compiler has a /I option. Look for INCLUDE statements in the Fortran source file that you are trying to compile, and provide the path to the directory of those files with the /I option.

Barbara_P_Intel
Moderator
635 Views

The -mP2OPT* compiler options are undocumented and not guaranteed to work with other versions of the compiler.  Best to ignore it.

 

Saleh
Novice
447 Views

Great thank @mecej4 and @Barbara_P_Intel 

Reply