fpm icon indicating copy to clipboard operation
fpm copied to clipboard

Compiler support and recognition

Open awvwgk opened this issue 5 years ago • 12 comments

Came up in #220.

At some point we might have to determine which compiler is used with fpm, therefore I tried to collect some information on the various Fortran compilers around. I only have first hand access to a fraction of them, so most of these information are second hand from HPC documentations or build systems.

Feel free to correct or add information to this table. Alternatively, we could move this table to the wiki.

vendor Fortran compiler C compiler Module output directory Module include directory OpenMP Free for OSS
Gnu gfortran gcc -J -I -fopenmp :heavy_check_mark:
Intel ifort icc -module -I -qopenmp :heavy_check_mark:
Intel (Windows) ifort icc /module:path /I /Qopenmp :heavy_check_mark:
Intel oneAPI ifx icx -module -I -qopenmp :heavy_check_mark:
PGI pgfortran pgcc -module -I -mp :heavy_check_mark:
NVIDIA nvfortran nvc -module -I -mp :heavy_check_mark:
LLVM flang flang clang -module -I -mp :heavy_check_mark:
LFortran lfortran --- ? ? ? :heavy_check_mark:
Lahey/Futjitsu lfc ? -M -I -openmp ?
NAG nagfor ? -mdir -I -openmp :x:
Cray crayftn craycc -J -I -homp ?
IBM xlf90 ? -qmoddir -I -qsmp :heavy_check_mark:
Oracle/Sun ? ? -moddir= -M -xopenmp ?
Silverfrost FTN95 ftn95 ? ? /MOD_PATH ? ?
Elbrus ? lcc -J -I -fopenmp ?
Hewlett Packard ? ? ? ? ? discontinued
Watcom ? ? ? ? ? discontinued
PathScale ? ? -module -I -mp discontinued
G95 ? ? -fmod= -I -fopenmp discontinued
Open64 ? ? -module -I -mp discontinued
Unisys ? ? ? ? ? discontinued

For now it might be sufficient to only support GCC, since we only guarantee that fpm works when compiled with GCC right now.

First class compiler support requires access to the compiler to allow testing in a CI environment, some of the commercial compilers have free versions for open source developers available.

awvwgk avatar Oct 31 '20 11:10 awvwgk

Overview of compilers known by the meson build system can be found here, actual implementation is here.

awvwgk avatar Oct 31 '20 11:10 awvwgk

Awesome, thanks @awvwgk this is super useful! I've edited to include Intel differences on Windows.

LKedward avatar Oct 31 '20 11:10 LKedward

Thanks for putting this together. It will be invaluable as we try to support more compilers.

everythingfunctional avatar Nov 02 '20 20:11 everythingfunctional

  • I have asked NAG to have free access for use in maintaining NAG support for Meson build system, but never got a reply. I did get replies to other email topics with NAG.
  • Intel (non-oneAPI) is also free for OSS on Windows
  • IBM XL is generally available at no cost assuming you have an IBM Power system to run it on.

scivision avatar Nov 06 '20 20:11 scivision

I found that Ubuntu Focal (ubuntu-20.04 image) has a flang package available.

awvwgk avatar Nov 22 '20 11:11 awvwgk

This Ubuntu flang possibly came from Debian. It might be quite out of date i.e. syntax bugs that might make issues for modern Fortran packages.

scivision avatar Nov 22 '20 19:11 scivision

@awvwgk This has to be the most comprehensive listing of Fortran compilers that I've ever seen. Bravo!

rouson avatar Oct 03 '22 04:10 rouson

Yes I think this would be great for the WIki insetad of Issue. Also, PGI is now also discontinued, replaced by NVIDIA

scivision avatar Oct 03 '22 19:10 scivision

Feel free to create a wiki page for it, the wiki should be still world-editable.

awvwgk avatar Oct 21 '22 18:10 awvwgk

The wiki isn't world editable

scivision avatar Oct 23 '22 17:10 scivision

That can be fixed. Try again.

awvwgk avatar Oct 23 '22 18:10 awvwgk

Thanks, I put an updated version of this table at https://github.com/fortran-lang/fpm/wiki/Compiler-support

scivision avatar Oct 26 '22 19:10 scivision