-module

can you specify a different directory where to save .mod from the one the compiler should look for pre-existing .mod?

I’m building f90 code using MPI (“use mpi”) and I want to produce a module. The default location of the MPI .mod is write protected (and should be) and thus the only way to bypass this problem (unable to save the module that I want to produce) is to either copy all the mpi modules or symlink them in a directory I can write in.

Not a very satisfying solution…

Hi Sylvain K

Use “-I” to specify the location of the pre-exisiting mod files.

Hope this helps,
Mat

That works indeed – I should have thought of it…
To use MPI w/ F90 I thus need two -I:

-I/opt/pgi/linux86-64/9.0/mpi/mpich/include to see mpif.h
and
-I/opt/pgi/linux86-64/9.0/mpi/mpich/include/f90choice to get the .mod

Thanks again, Matt!
Cheers, Sylvain.