Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
waves
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
Aerospace and Mechanical Engineering
waves
Commits
7ad50d31
Commit
7ad50d31
authored
5 years ago
by
Adrien Crovato
Browse files
Options
Downloads
Patches
Plain Diff
Update MKL init. Add Pardiso to benchmark. Add msys2 cmake file.
parent
3e54663e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!52
Feature eigen
Pipeline
#1095
passed
5 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/msys2.cmake
+20
-0
20 additions, 0 deletions
CMake/msys2.cmake
flow/benchmark/onera.py
+11
-6
11 additions, 6 deletions
flow/benchmark/onera.py
fwk/wutils.py
+12
-4
12 additions, 4 deletions
fwk/wutils.py
with
43 additions
and
10 deletions
CMake/msys2.cmake
0 → 100644
+
20
−
0
View file @
7ad50d31
# Copyright 2020 University of Liège
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# MSYS2 with MinGW (AC)
SET
(
CMAKE_GENERATOR
"MSYS Makefiles"
CACHE INTERNAL
""
FORCE
)
SET
(
WAVES_USE_MKL OFF CACHE BOOL
""
FORCE
)
SET
(
WAVES_USE_MUMPS OFF CACHE BOOL
""
FORCE
)
INCLUDE
(
disable-trilinos
)
This diff is collapsed.
Click to expand it.
flow/benchmark/onera.py
+
11
−
6
View file @
7ad50d31
...
...
@@ -40,12 +40,17 @@ except:
def
newton
(
pbl
):
from
fwk.wutils
import
parseargs
gmres
=
tbox
.
Gmres
()
gmres
.
setFillFactor
(
2
)
gmres
.
setDropTol
(
1e-6
)
gmres
.
setRestart
(
50
)
gmres
.
setTolerance
(
1e-5
)
newton
=
flo
.
Newton
(
pbl
,
gmres
)
# Pardiso should give similar perfs
# Pardiso and GMRES should give similar perfs
try
:
raise
Exception
()
newton
=
flo
.
Newton
(
pbl
,
tbox
.
Pardiso
())
except
:
gmres
=
tbox
.
Gmres
()
gmres
.
setFillFactor
(
2
)
gmres
.
setDropTol
(
1e-6
)
gmres
.
setRestart
(
50
)
gmres
.
setTolerance
(
1e-5
)
newton
=
flo
.
Newton
(
pbl
,
gmres
)
newton
.
nthreads
=
parseargs
().
k
newton
.
verbose
=
1
newton
.
relTol
=
1e-6
...
...
This diff is collapsed.
Click to expand it.
fwk/wutils.py
+
12
−
4
View file @
7ad50d31
...
...
@@ -116,7 +116,7 @@ def findbins(modname, dirB=['build','wavesB'], verb=False): # changer wavesB en
print
(
'
[findbins] loading
'
,
mod
.
__file__
)
# initialisations
initMKL
(
1
)
initMKL
(
parseargs
().
k
)
# attention! si waves and heat possedent des classes de mêmes noms,
# c'est celle du premier module qui sera chargée!
...
...
@@ -130,12 +130,20 @@ def initMKL(nthreads):
import
os
# we try to have full control over the threading environment
# => set MKL/OMP variables if (and only if) they are not set!
# number of "default" threads for MKL (available MKL domains: ALL, BLAS, VML, PARDISO)
if
not
'
MKL_NUM_THREADS
'
in
os
.
environ
:
os
.
environ
[
'
MKL_NUM_THREADS
'
]
=
'
%d
'
%
nthreads
if
not
'
MKL_DOMAIN_NUM_THREADS
'
in
os
.
environ
:
os
.
environ
[
'
MKL_DOMAIN_NUM_THREADS
'
]
=
'
MKL_BLAS=%d
'
%
nthreads
os
.
environ
[
'
MKL_DOMAIN_NUM_THREADS
'
]
=
'
MKL_DOMAIN_ALL=%d
'
%
nthreads
# threading interface
if
not
'
MKL_THREADING_LAYER
'
in
os
.
environ
:
os
.
environ
[
'
MKL_THREADING_LAYER
'
]
=
'
TBB
'
if
nthreads
==
1
:
os
.
environ
[
'
MKL_THREADING_LAYER
'
]
=
'
SEQUENTIAL
'
else
:
os
.
environ
[
'
MKL_THREADING_LAYER
'
]
=
'
TBB
'
# interface (32 or 64 bits)
if
not
'
MKL_INTERFACE_LAYER
'
in
os
.
environ
:
os
.
environ
[
'
MKL_INTERFACE_LAYER
'
]
=
'
LP64
'
# 32 bits (default), ILP64 for 64 bits
# we do not want to use OpenMP
if
not
'
OMP_NUM_THREADS
'
in
os
.
environ
:
os
.
environ
[
'
OMP_NUM_THREADS
'
]
=
'
1
'
if
not
'
MKL_DYNAMIC
'
in
os
.
environ
:
...
...
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