# Intel fortran to gfortran

**URL:** <https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711>\
**Category:** Help\
**Created:** [June 10, 2022, 1:16pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711 "2022-06-10T13:16:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![RezaRezaei](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@RezaRezaei](https://fortran-lang.discourse.group/u/RezaRezaei)\
**Post date:** [June 10, 2022, 1:16pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/1 "2022-06-10T13:16:20Z")

</div>

Hi,  
I’m trying to use the _gfortran_ to compile a Makefile. However, the flag options are set for _ifort_ compiler, yet the Makefile could be compiled with _gfortran_. Now I need to configure the flag options to match the _gfortran_. I couldn’t find the equivalents of some _ifort_ options in _gfortran_. Could anyone help me in configuring the flag options? The _ifort_ flag options are:

`-fixed`

`-check`

`-fp-stack-check`

`-132`

Thank you for any help in advance.

Reza,

---

<div class="post-metadata">

**Author:** ![alozada](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/alozada/32/298_2.png) [@alozada](https://fortran-lang.discourse.group/u/alozada)\
**Post date:** [June 10, 2022, 2:25pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/2 "2022-06-10T14:25:13Z")

</div>

Hi @RezaRezaei,  
this link can be useful:

> [@Equivalent gfort and ifort compilation](https://fortran-lang.discourse.group/t/equivalent-gfort-and-ifort-compilation/3092):
>
> I am trying to compile a code using gfortran instead of ifortran. The gfortran code runs much much slower than the ifortran code. It does not even use all threads from my computer. I have 40 cores and 80 threads. ifort uses all of them.I think it has to do with the ifort flag /Qm64 but can’t be sure (using the /Qm32 flag on ifort is slower and does not use all the threads on openmp - not sure why). This is the way that visual studio seems to be compiling my code: Compiling with Intel® Fortran…

you could also try _fpm_ to build your program  
[https://fpm.fortran-lang.org/en/index.html](https://fpm.fortran-lang.org/en/index.html)

---

<div class="post-metadata">

**Author:** ![RezaRezaei](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@RezaRezaei](https://fortran-lang.discourse.group/u/RezaRezaei)\
**Post date:** [June 10, 2022, 2:39pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/3 "2022-06-10T14:39:02Z")

</div>

Thank you for responding. Unfortunately, I couldn’t find the mentioned option in the links.

---

<div class="post-metadata">

**Author:** ![alozada](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/alozada/32/298_2.png) [@alozada](https://fortran-lang.discourse.group/u/alozada)\
**Post date:** [June 10, 2022, 2:57pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/4 "2022-06-10T14:57:47Z")

</div>

you could also compare these two lists of compile options

[gfortran](https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html) [ifort](https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/compiler-options/alphabetical-option-list.html)

example:  
-fixed → Specifies source files are in fixed format. _ifort_  
-ffixed-form → Specify the layout used by the source file. _gfortran_

---

<div class="post-metadata">

**Author:** ![Sideboard](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/sideboard/32/779_2.png) [@Sideboard](https://fortran-lang.discourse.group/u/Sideboard)\
**Post date:** [June 10, 2022, 3:04pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/5 "2022-06-10T15:04:08Z")

</div>

Is there a an overview of commonly used options for commonly used compilers somewhere? Might be a worthwhile community project.

---

<div class="post-metadata">

**Author:** ![RezaRezaei](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@RezaRezaei](https://fortran-lang.discourse.group/u/RezaRezaei)\
**Post date:** [June 10, 2022, 3:20pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/7 "2022-06-10T15:20:12Z")

</div>

@Sideboard

I couldn’t find such a document.

---

<div class="post-metadata">

**Author:** ![alozada](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/alozada/32/298_2.png) [@alozada](https://fortran-lang.discourse.group/u/alozada)\
**Post date:** [June 10, 2022, 3:23pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/8 "2022-06-10T15:23:17Z")

</div>

> [@Sideboard](#):
>
> Might be a worthwhile community project

Maybe, a _quick reference card_ that lists the common options between compilers. 🤔

---

<div class="post-metadata">

**Author:** ![cmaapic](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/cmaapic/32/659_2.png) [@cmaapic](https://fortran-lang.discourse.group/u/cmaapic)\
**Post date:** [June 11, 2022, 6:05am UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/9 "2022-06-11T06:05:10Z")

</div>

Here is a link that people may find useful.

[https://polyhedron.com/?page\_id=175](https://polyhedron.com/?page_id=175)

---

<div class="post-metadata">

**Author:** ![RezaRezaei](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@RezaRezaei](https://fortran-lang.discourse.group/u/RezaRezaei)\
**Post date:** [June 12, 2022, 1:32pm UTC](https://fortran-lang.discourse.group/t/intel-fortran-to-gfortran/3711/10 "2022-06-12T13:32:10Z")

</div>

I found a comparative collection of different compilers options here:

[https://confluence.ecmwf.int/display/UDOC/Compilers](https://confluence.ecmwf.int/display/UDOC/Compilers)

[https://doku.lrz.de/pages/viewpage.action?pageId=43320993](https://doku.lrz.de/pages/viewpage.action?pageId=43320993)
