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

Environment variable for module path

Vivek_R_
Novice
886 Views

Ifort for Windows has a /module:path option to "specify path where mod files should be placed and first location to look for mod files". Is there an environment variable I can set to do the same thing, so that I don't need to use the /module:path option each time I compile? I don't want to store module files in the local directory, because they will overwrite the .mod files produced by gfortran. Thanks.

0 Kudos
3 Replies
Steve_Lionel
Honored Contributor III
874 Views

INCLUDE

0 Kudos
Vivek_R_
Novice
842 Views

Thanks. Setting INCLUDE will tell ifort where to look for module files, but when compiling, module files are still created in the local directory, which I want to avoid. Perhaps I should just use the /module:path option.

0 Kudos
Steve_Lionel
Honored Contributor III
835 Views

Sorry, I misunderstood. No, there isn't an environment variable for the module output (nor the object output). Why not set the default folder to where you want the output and compile the sources from elsewhere?

0 Kudos
Reply