Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fossils
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boman Romain
fossils
Commits
0a4f204c
Commit
0a4f204c
authored
2 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
fix runtime problem with MKL when mklvars are loaded
parent
d9519fd9
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cxxfem/CMakeLists.txt
+7
-11
7 additions, 11 deletions
cxxfem/CMakeLists.txt
envs/win-mingw64.cmd
+7
-9
7 additions, 9 deletions
envs/win-mingw64.cmd
envs/win-msvc.cmd
+6
-9
6 additions, 9 deletions
envs/win-msvc.cmd
run.py
+8
-8
8 additions, 8 deletions
run.py
with
28 additions
and
37 deletions
cxxfem/CMakeLists.txt
+
7
−
11
View file @
0a4f204c
...
...
@@ -59,17 +59,13 @@ IF(FEM_USE_MKL)
MESSAGE
(
STATUS
"MKL_INCLUDE_DIRS=
${
MKL_INCLUDE_DIRS
}
"
)
# library (mkl_rt.so) searched using LIBRARY_PATH (Linux/macOS) or LIB (windows)
FIND_LIBRARY
(
MKL_LIBRARIES mkl_rt PATHS ENV LIBRARY_PATH
)
IF
(
MINGW
)
FIND_LIBRARY
(
MKL_LIB1 mkl_intel_lp64_dll PATHS ENV LIBRARY_PATH
)
FIND_LIBRARY
(
MKL_LIB2 mkl_intel_thread_dll PATHS ENV LIBRARY_PATH
)
FIND_LIBRARY
(
MKL_LIB3 mkl_core_dll PATHS ENV LIBRARY_PATH
)
FIND_LIBRARY
(
MKL_LIB4 libiomp5md PATHS ENV LIBRARY_PATH
)
# MESSAGE(STATUS "MKL_LIB1=${MKL_LIB1}")
# MESSAGE(STATUS "MKL_LIB2=${MKL_LIB2}")
# MESSAGE(STATUS "MKL_LIB3=${MKL_LIB3}")
# MESSAGE(STATUS "MKL_LIB4=${MKL_LIB4}")
SET
(
MKL_LIBRARIES
${
MKL_LIB1
}
${
MKL_LIB2
}
${
MKL_LIB3
}
${
MKL_LIB4
}
)
ENDIF
()
# IF(MINGW)
# FIND_LIBRARY(MKL_LIB1 mkl_intel_lp64_dll PATHS ENV LIBRARY_PATH)
# FIND_LIBRARY(MKL_LIB2 mkl_intel_thread_dll PATHS ENV LIBRARY_PATH)
# FIND_LIBRARY(MKL_LIB3 mkl_core_dll PATHS ENV LIBRARY_PATH)
# FIND_LIBRARY(MKL_LIB4 libiomp5md PATHS ENV LIBRARY_PATH)
# SET(MKL_LIBRARIES ${MKL_LIB1} ${MKL_LIB2} ${MKL_LIB3} ${MKL_LIB4})
# ENDIF()
MESSAGE
(
STATUS
"MKL_LIBRARIES=
${
MKL_LIBRARIES
}
"
)
ENDIF
()
...
...
This diff is collapsed.
Click to expand it.
envs/win-mingw64.cmd
+
7
−
9
View file @
0a4f204c
...
...
@@ -57,15 +57,13 @@ IF NOT DEFINED COMPILERPATH (
EXIT
/B
)
:: Intel MKL/TBB
set
INTELPATH
=
"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows"
IF
NOT
EXIST
%INTELPATH%
(
ECHO
-
INTEL
libraries
NOT
found
in
%INTELPATH%!!
)
ELSE
(
ECHO
-
INTEL
libraries
found
.
call
%INTELPATH%
\mkl\bin\mklvars.bat
intel64
vs2019
call
%INTELPATH%
\tbb\bin\tbbvars.bat
intel64
vs2019
)
:: Intel MKL
set
"INTELPATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows"
set
LIB
=
%INTELPATH%
\mkl\lib\intel64_win
;
%INTELPATH%
\compiler\lib\intel64_win
;
%LIB%
set
INCLUDE
=
%INTELPATH%
\mkl\include
;
%INCLUDE%
:: does not always work
@REM call %INTELPATH%\mkl\bin\mklvars.bat intel64 vs2019
:: where is gmsh.exe and gmsh-**.dll ?
set
PATH
=
%GMSHSDK%
\bin
;
%GMSHSDK%
\lib
;
%PATH%
...
...
This diff is collapsed.
Click to expand it.
envs/win-msvc.cmd
+
6
−
9
View file @
0a4f204c
...
...
@@ -41,15 +41,12 @@ IF NOT EXIST %COMPILERPATH% (
ECHO
-
compiler
found
.
)
:: Intel MKL/TBB
set
INTELPATH
=
"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows"
IF
NOT
EXIST
%INTELPATH%
(
ECHO
-
INTEL
libraries
NOT
found
in
%INTELPATH%!!
)
ELSE
(
ECHO
-
INTEL
libraries
found
.
call
%INTELPATH%
\mkl\bin\mklvars.bat
intel64
vs2019
@REM call %INTELPATH%\tbb\bin\tbbvars.bat intel64 vs2019
)
:: Intel MKL
set
"INTELPATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows"
set
LIB
=
%INTELPATH%
\mkl\lib\intel64_win
;
%INTELPATH%
\compiler\lib\intel64_win
;
%LIB%
set
INCLUDE
=
%INTELPATH%
\mkl\include
;
%INCLUDE%
:: does not always work
@REM call %INTELPATH%\mkl\bin\mklvars.bat intel64 vs2019
:: where is gmsh.exe and gmsh-**.dll ?
set
PATH
=
%GMSHSDK%
\bin
;
%GMSHSDK%
\lib
;
%PATH%
...
...
This diff is collapsed.
Click to expand it.
run.py
+
8
−
8
View file @
0a4f204c
...
...
@@ -4,14 +4,14 @@
import
os
,
platform
if
'
Windows
'
in
platform
.
uname
():
# remove tbb from the PATH
# otherwise: "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll"
paths
=
os
.
environ
[
'
PATH
'
].
split
(
'
;
'
)
corr_path
=
[
p
for
p
in
paths
if
not
'
tbb
'
in
p
]
os
.
environ
[
'
PATH
'
]
=
'
;
'
.
join
(
corr_path
)
for
p
in
corr_path
:
print
(
p
)
#
if 'Windows' in platform.uname():
#
# remove tbb from the PATH
#
# otherwise: "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll"
#
paths = os.environ['PATH'].split(';')
#
corr_path = [ p for p in paths if not 'tbb' in p]
#
os.environ['PATH'] = ';'.join(corr_path)
#
for p in corr_path:
#
print(p)
if
__name__
==
"
__main__
"
:
import
sys
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment