Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
amfe
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
amfe
Commits
f6971d23
Commit
f6971d23
authored
3 years ago
by
Adrien Crovato
Browse files
Options
Downloads
Patches
Plain Diff
Remove BLAS (not usefull with Eigen). Fix warnings on MSVC.
parent
600f04a6
No related branches found
No related tags found
1 merge request
!6
amfe v1.0.5
Pipeline
#5508
passed
3 years ago
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tbox/src/CMakeLists.txt
+4
-27
4 additions, 27 deletions
tbox/src/CMakeLists.txt
tbox/src/wDss.cpp
+5
-5
5 additions, 5 deletions
tbox/src/wDss.cpp
tbox/src/wGmres.h
+1
-1
1 addition, 1 deletion
tbox/src/wGmres.h
tbox/src/wMshDeform.cpp
+1
-0
1 addition, 0 deletions
tbox/src/wMshDeform.cpp
with
11 additions
and
33 deletions
tbox/src/CMakeLists.txt
+
4
−
27
View file @
f6971d23
...
@@ -30,7 +30,7 @@ IF(TBB_VERSION_INTERFACE LESS 11004)
...
@@ -30,7 +30,7 @@ IF(TBB_VERSION_INTERFACE LESS 11004)
ENDIF
()
ENDIF
()
TARGET_LINK_LIBRARIES
(
tbox
${
TBB_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
tbox
${
TBB_LIBRARIES
}
)
# -- MKL
/BLAS/LAPACK
--
# -- MKL --
# Do not forget to set your environement variables using: (default path)
# Do not forget to set your environement variables using: (default path)
# - "C:\Program Files (x86)\Intel\Composer XE\mkl\bin\intel64\mklvars_intel64.bat" (windows, check that VS is in x64 mode)
# - "C:\Program Files (x86)\Intel\Composer XE\mkl\bin\intel64\mklvars_intel64.bat" (windows, check that VS is in x64 mode)
# - source /opt/intel/mkl/bin/mklvars.sh intel64 (linux)
# - source /opt/intel/mkl/bin/mklvars.sh intel64 (linux)
...
@@ -45,40 +45,17 @@ IF(USE_MKL)
...
@@ -45,40 +45,17 @@ IF(USE_MKL)
MESSAGE
(
STATUS
"MKL_LIBRARIES=
${
MKL_LIBRARIES
}
"
)
MESSAGE
(
STATUS
"MKL_LIBRARIES=
${
MKL_LIBRARIES
}
"
)
IF
(
MKL_INCLUDE_DIRS AND MKL_LIBRARIES
)
IF
(
MKL_INCLUDE_DIRS AND MKL_LIBRARIES
)
MESSAGE
(
STATUS
"Found Intel MKL"
)
MESSAGE
(
STATUS
"Found Intel MKL"
)
SET
(
FOUND_MKL TRUE
)
TARGET_INCLUDE_DIRECTORIES
(
tbox PUBLIC
${
MKL_INCLUDE_DIRS
}
)
SET
(
LAPACK_INCLUDE_DIRS
${
MKL_INCLUDE_DIRS
}
)
TARGET_LINK_LIBRARIES
(
tbox
${
MKL_LIBRARIES
}
)
SET
(
LAPACK_LIBRARIES
${
MKL_LIBRARIES
}
)
ELSE
()
ELSE
()
MESSAGE
(
FATAL_ERROR
"Intel MKL not found!"
)
MESSAGE
(
FATAL_ERROR
"Intel MKL not found!"
)
ENDIF
()
ENDIF
()
# Find BLAS
ELSE
()
IF
(
${
BLA_VENDOR
}
MATCHES
"OpenBlas"
)
FIND_LIBRARY
(
LAPACK_LIBRARIES openblas
)
ELSE
()
FIND_PACKAGE
(
LAPACK REQUIRED
)
#FIND_LAPACK calls FIND_BLAS
ENDIF
()
IF
(
NOT LAPACK_LIBRARIES
)
MESSAGE
(
FATAL_ERROR
"BLAS/LAPACK not found!"
)
ENDIF
()
MESSAGE
(
STATUS
"LAPACK_LIBRARIES=
${
LAPACK_LIBRARIES
}
"
)
MESSAGE
(
STATUS
"LAPACK_LINKER_FLAGS=
${
LAPACK_LINKER_FLAGS
}
"
)
MESSAGE
(
STATUS
"BLA_VENDOR=
${
BLA_VENDOR
}
"
)
MESSAGE
(
STATUS
"BLA_STATIC=
${
BLA_STATIC
}
"
)
ENDIF
()
ENDIF
()
# -- Eigen --
# -- Eigen --
FIND_PACKAGE
(
EIGEN 3.3.4 REQUIRED
)
FIND_PACKAGE
(
EIGEN 3.3.4 REQUIRED
)
TARGET_INCLUDE_DIRECTORIES
(
tbox PUBLIC
${
EIGEN_INCLUDE_DIRS
}
${
LAPACK_INCLUDE_DIRS
}
)
TARGET_INCLUDE_DIRECTORIES
(
tbox PUBLIC
${
EIGEN_INCLUDE_DIRS
}
)
TARGET_COMPILE_DEFINITIONS
(
tbox PUBLIC EIGEN_DONT_PARALLELIZE
)
TARGET_COMPILE_DEFINITIONS
(
tbox PUBLIC EIGEN_DONT_PARALLELIZE
)
IF
(
FOUND_MKL
)
MESSAGE
(
STATUS
"Linking Eigen with MKL"
)
TARGET_COMPILE_DEFINITIONS
(
tbox PUBLIC EIGEN_USE_MKL_ALL
)
ELSE
()
MESSAGE
(
STATUS
"Linking Eigen with BLAS
${
BLA_VENDOR
}
"
)
TARGET_COMPILE_DEFINITIONS
(
tbox PUBLIC EIGEN_USE_BLAS
)
ENDIF
()
TARGET_LINK_LIBRARIES
(
tbox
${
LAPACK_LIBRARIES
}
)
# -- MUMPS --
# -- MUMPS --
IF
(
USE_MUMPS
)
IF
(
USE_MUMPS
)
...
...
This diff is collapsed.
Click to expand it.
tbox/src/wDss.cpp
+
5
−
5
View file @
f6971d23
...
@@ -46,11 +46,11 @@ void Dss::analyze(Eigen::SparseMatrix<double> const &A)
...
@@ -46,11 +46,11 @@ void Dss::analyze(Eigen::SparseMatrix<double> const &A)
AA
.
makeCompressed
();
AA
.
makeCompressed
();
// Build data structure
// Build data structure
MKL_INT
opt
=
MKL_DSS_NON_SYMMETRIC
;
// consider MKL_DSS_SYMMETRIC and MKL_DSS_SYMMETRIC_STRUCTURE
MKL_INT
opt
=
MKL_DSS_NON_SYMMETRIC
;
// consider MKL_DSS_SYMMETRIC and MKL_DSS_SYMMETRIC_STRUCTURE
MKL_INT
n
=
AA
.
rows
();
// matrix size (number of rows and columns)
MKL_INT
n
=
static_cast
<
int
>
(
AA
.
rows
());
// matrix size (number of rows and columns)
MKL_INT
nz
=
AA
.
nonZeros
();
// number of non-zero entries
MKL_INT
nz
=
static_cast
<
int
>
(
AA
.
nonZeros
());
// number of non-zero entries
const
MKL_INT
*
rStart
=
AA
.
outerIndexPtr
();
// starting index of non-zero entry for a row
const
MKL_INT
*
rStart
=
AA
.
outerIndexPtr
();
// starting index of non-zero entry for a row
const
MKL_INT
*
cIndex
=
AA
.
innerIndexPtr
();
// index of column of non-zero entry
const
MKL_INT
*
cIndex
=
AA
.
innerIndexPtr
();
// index of column of non-zero entry
print
(
dss_define_structure
(
handle
,
opt
,
rStart
,
n
,
n
,
cIndex
,
nz
));
print
(
dss_define_structure
(
handle
,
opt
,
rStart
,
n
,
n
,
cIndex
,
nz
));
// Define reordering
// Define reordering
...
...
This diff is collapsed.
Click to expand it.
tbox/src/wGmres.h
+
1
−
1
View file @
f6971d23
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
virtual
void
compute
(
Eigen
::
SparseMatrix
<
double
>
const
&
A
,
Eigen
::
Map
<
Eigen
::
VectorXd
>
const
&
b
,
Eigen
::
Map
<
Eigen
::
VectorXd
>
&
x
)
override
;
virtual
void
compute
(
Eigen
::
SparseMatrix
<
double
>
const
&
A
,
Eigen
::
Map
<
Eigen
::
VectorXd
>
const
&
b
,
Eigen
::
Map
<
Eigen
::
VectorXd
>
&
x
)
override
;
virtual
double
getError
()
override
{
return
solver
.
error
();
}
virtual
double
getError
()
override
{
return
solver
.
error
();
}
virtual
int
getIterations
()
override
{
return
solver
.
iterations
();
}
virtual
int
getIterations
()
override
{
return
static_cast
<
int
>
(
solver
.
iterations
()
)
;
}
virtual
void
write
(
std
::
ostream
&
out
)
const
override
;
virtual
void
write
(
std
::
ostream
&
out
)
const
override
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
tbox/src/wMshDeform.cpp
+
1
−
0
View file @
f6971d23
...
@@ -49,6 +49,7 @@ MshDeform::MshDeform(std::shared_ptr<MshData> _msh,
...
@@ -49,6 +49,7 @@ MshDeform::MshDeform(std::shared_ptr<MshData> _msh,
// Display configuration
// Display configuration
std
::
cout
<<
"--- Mesh morpher (linear elasticity) ---
\n
"
std
::
cout
<<
"--- Mesh morpher (linear elasticity) ---
\n
"
<<
"Inner solver: "
<<
*
linsol
<<
"Number of threads: "
<<
nthreads
<<
"
\n
"
<<
"Number of threads: "
<<
nthreads
<<
"
\n
"
<<
std
::
endl
;
<<
std
::
endl
;
}
}
...
...
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