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

Convert Fortran configuration from Linux to windows

Saleh
Novice
1,379 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
Honored Contributor III
1,317 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
1,267 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

0 Kudos
ClariceStarling
Valued Contributor II
1,264 Views

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

0 Kudos
mecej4
Honored Contributor III
1,253 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.

0 Kudos
Saleh
Novice
1,245 Views

Thanks. You're right. 

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

0 Kudos
mecej4
Honored Contributor III
1,243 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.

0 Kudos
Barbara_P_Intel
Moderator
1,219 Views

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

 

0 Kudos
Saleh
Novice
1,031 Views

Great thank @mecej4 and @Barbara_P_Intel 

0 Kudos
Reply