- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
hello,
i am new to computing on windows operating systems. i have pgfortran 18.4 installed and MKL 2018.3.210 installed, including the mkl_pgi_thread library.
i am trying to statically link to the libraries needed to use PARDISO_D_64 (mkl_intel_ilp64.lib mkl_pgi_thread.lib mkl_core.lib) but the best outcome i can get is:
pgfortran -i8 -pgf90libs -mp -o GEMINI GEMINI.obj MD.obj MR.obj M1.obj M2.obj MW.obj -I"C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\include" -LC:\Inte
lMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_intel_ilp64.lib -LC:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mk
l_pgi_thread.lib -LC:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_core.lib -LC:\IntelMKL\compilers_and_libraries_2018.3.210\windows\com
piler\lib\intel64_win
GEMINI.obj : error LNK2019: unresolved external symbol mkl_set_num_threads_ referenced in function MAIN_
GEMINI.obj : error LNK2019: unresolved external symbol mkl_set_dynamic_ referenced in function MAIN_
M1.obj : error LNK2019: unresolved external symbol pardiso_d_64_ referenced in function m1_s1_
GEMINI.exe : fatal error LNK1120: 3 unresolved externals
the main problem, i hope, is that i just don't know how to link to multiple libraries using pgfortran on windows. i previously compiled and executed this same code, without issue, on linux mint using gfortran.
i MKL link line advisor also states that MKL support in windows with pgi fortran is "limited." what does that mean? could it be that i just cannot use pgfortran to link to the pardiso routines? or, could it be that i need to add the "mkl service" to my code, which i found to not be necessary when i was working on linux with gfortran.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
Looks like the reason here is "-L" option used for linking MKL libraries.
You should just put required libs to your link line. I've modified it a bit for you, hope this will help!
pgfortran -i8 -pgf90libs -mp -o GEMINI GEMINI.obj MD.obj MR.obj M1.obj M2.obj MW.obj -I"C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\include" C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_intel_ilp64.lib C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_pgi_thread.lib C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_core.lib
Please, let us know if you have any other questions.
Best regards,
Maria
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
could you try to build sequential version? -i8 -I"%MKLROOT%"\include mkl_intel_ilp64.lib mkl_sequential.lib mkl_core.lib
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I just tried the sequential library and found the same answers.
I also tried "including" the MKL service in the main program--the compiler reports 31 "warnings" about "END" statements in internal procedures, but no "severes" or "fatals." There were also a few "unrecognized DEC directives."
Thanks
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I have not used the PGI/MKL combination recently; but, after reading your post, I tried the versions that I have from a year or two ago, namely, PGI 15.3 and Composer XE 2015. I ran the Pardiso symmetric equations example, using the command
pgfortran sym.f mkl_rt.lib
The resulting EXE ran and produced the expected output. You could start with this working case, and modify it bit by bit to suit your requirements. If you need more specific help, you may have to provide test source code, information regarding the PGI compiler and MKL versions, and the options used to build the EXE.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
What the exact header file did you include?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
hi maria k. (intel),
sorry for my delay--i had some other things that needed my attention.
in the module (subprogram) (called M1) that actually calls "pardiso_d_64," my file starts off:
INCLUDE 'mkl_pardiso.f90'
MODULE M1
USE OMP_LIB
USE MD
USE MKL_PARDISO
USE M2
CONTAINS
SUBROUTINE S1(F,E,WATCH,ROM,NRM)
and I instruct the compiler to halt after assembly:
pgfortran -i8 -mp -pgf90libs -c M1.f90 -IC:/IntelMKL/compilers_and_libraries_2018.3.210/windows/mkl/include
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
Looks like the reason here is "-L" option used for linking MKL libraries.
You should just put required libs to your link line. I've modified it a bit for you, hope this will help!
pgfortran -i8 -pgf90libs -mp -o GEMINI GEMINI.obj MD.obj MR.obj M1.obj M2.obj MW.obj -I"C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\include" C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_intel_ilp64.lib C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_pgi_thread.lib C:\IntelMKL\compilers_and_libraries_2018.3.210\windows\mkl\lib\intel64_win\mkl_core.lib
Please, let us know if you have any other questions.
Best regards,
Maria
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Zhukova, Maria (Intel),
Thank you very much--I can now properly link and execute my code.

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite