- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The test.f90 below contains an Intel MKL fortran 95 subroutine.
program test
use mkl95_lapack, only: sterf
......
call sterf(d,e)
end
I can compile test.f90 by entering:
ifort test.f90 -L$(LD_LIBRARY_PATH) -lmkl_lapack95 -lguide -lpthread -lmkl -o test.exe
But mkl95_lapack.mod MUST be placed in the current working directory.
How can I compile test.f90 without copying mkl95_lapack.mod into $PWD?
Thanks in advance!
BTW: I have mkl95_lapack.mod installed in
/opt/intel/mkl/10.0.1.014/interfaces/lapack95/obj/mkl95_lapack.mod
/opt/intel/mkl/10.0.1.014/lib/em64t/mkl95_lapack.mod
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Try:
ifort -I/opt/intel/mkl/10.0.1.014/interfaces/lapack95/obj test.f90 -L$(LD_LIBRARY_PATH) -lmkl_lapack95 -lguide -lpthread -lmkl -o test.exe
As described in the Intel Compiler documentation:
Some programs require modules located in multiple directories. You can use the -I (Linux* and Mac OS*) or /I compiler (Windows*) option when you compile the program to specify the location of the .mod files that should be included in the program.
You can use the -module path (Linux and Mac OS) or /module:path (Windows) option to specify the directory in which to create the module files. If you don't use this option, module files are created in the current directory.
Directories are searched for .mod files in this order:
- Directory of the source file that contains the USE statement
- Directories specified by the -module path (Linux and Mac OS) or /module:path (Windows) option
- Current working directory
- Directories specified by the -Idir (Linux and Mac OS) or /include (Windows) option
- Directories specified with the FPATH (Linux and Mac OS) or INCLUDE (Windows) environment variable
- Standard system directories
Thanks,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Try:
ifort -I/opt/intel/mkl/10.0.1.014/interfaces/lapack95/obj test.f90 -L$(LD_LIBRARY_PATH) -lmkl_lapack95 -lguide -lpthread -lmkl -o test.exe
As described in the Intel Compiler documentation:
Some programs require modules located in multiple directories. You can use the -I (Linux* and Mac OS*) or /I compiler (Windows*) option when you compile the program to specify the location of the .mod files that should be included in the program.
You can use the -module path (Linux and Mac OS) or /module:path (Windows) option to specify the directory in which to create the module files. If you don't use this option, module files are created in the current directory.
Directories are searched for .mod files in this order:
- Directory of the source file that contains the USE statement
- Directories specified by the -module path (Linux and Mac OS) or /module:path (Windows) option
- Current working directory
- Directories specified by the -Idir (Linux and Mac OS) or /include (Windows) option
- Directories specified with the FPATH (Linux and Mac OS) or INCLUDE (Windows) environment variable
- Standard system directories
Thanks,
Vladimir
I am reading Chapter 5 of Intel MKL User's Guide. It explains most of the stuff and quite helpful!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page