On our UQAM servers we have three compilers:

    - GNU Fortran (GFortran)
    - Portland Group (PGI)
    - Intel

Before being able to use one of the above compilers you have to acquire one with one of the following commands (in bold), depending on which compiler you want to acquire:

    -  gfort   ( for GNU Fortran )
    -  pgi        ( for PGI )
    -  intel    ( for Intel-16 )
    -  int19   ( for Intel-19 )


Compiling with NetCDF libraries

Fortran code

When using NetCDF libraries best use the GNU compiler.

Note, the recipe below does not work when needing librmn.a as well!

First load the GNU compiler and NetCDF libraries with:

module load  compiler/gcc-7.3  development/netcdf

Then you can compile, load, and link with something like:

gfortran  $(nf-config --fflags)  $(nf-config --flibs)  some.F90  -o some.Abs

You need to adjust the name of your program and executable but you can keep the rest.


Alternatively you can also use the Intel compiler:


module load compiler/intel-19 development/netcdf-c development/netcdf-f/intel1900
ifort  $(nf-config --fflags)  $(nf-config --flibs)   some.F90  -o some.Abs



nf-config --all
nf-config --fc

C code

gcc  $(nc-config --cflags)  $(nc-config --libs)  some.c  -o some.Abs


  • Aucune étiquette

0 commentaires

Vous n'êtes pas connecté. Toutes vos modifications seront marquées comme réalisées par anonyme. Vous pouvez vous connecter si vous disposez déjà d'un compte.