trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.21k stars 563 forks source link

Amesos: enable Pardiso #2770

Closed ghtina closed 6 years ago

ghtina commented 6 years ago

So, I am working with Amesos and the provided Examples. Now, I wanted to try PARDISO as a solver but am unsure how to properly enable this.

I have downloaded the .so file, the first question is, where do I have to save it? Is it important to save it somewhere special?

If I understood it correctly (Amesos Reference Guide), I must enable the lib during executing the config-file, but what should I do with --with-incdirs? It should be something like (as in the example in part 3:" The location of the header files should be specified using --with-incdirs, the location of the library with --with-ldflags, and the library to be linked by --with-libs "): $ ./config --enable-amesos-pardiso --with-incdirs="-I/home/username/ --with-ldflags="-L/home/username/pardiso" --with-libs"-lpardiso" What header files do they mean? Apparently, excluding the part didn't work. Everything compiles, but if I try the executable, the output is Specified solver is not available

Has anyone experiences regarding this?

Thanks in advance!

@trilinos/amesos

mhoemmen commented 6 years ago

@trilinos/amesos2 @trilinos/shylu @ndellingwood @srajama1

srajama1 commented 6 years ago

Trilinos has moved from a configure based system some years ago. We use CMake now.

A good starting point https://trilinos.org/getting-started/

A specific one for compiling https://trilinos.org/docs/files/TrilinosBuildReference.html

jhux2 commented 6 years ago

@freaklovesmango Just curious where you found the configure instructions. If there are out-of-date configure/compile instructions somewhere, please let us know so we can update or remove them.

ghtina commented 6 years ago

@srajama1 okay, thank you. I looked up the part with enabling third party libraries (is this correct?) and tried it with following:

EXTRA_ARGS=$@

cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D Trilinos_ENABLE_ALL_PACKAGES=FALSE \
-D Trilinos_ENABLE_Amesos=ON \
-D Trilinos_ENABLE_TESTS=ON \
-D Trilinos_ENABLE_OpenMP=ON \
-D TPL_ENABLE_PARDISO=ON \
-D TPL_ENABLE_BLAS=ON \
-D TPL_ENABLE_LAPACK=ON \
-D TPL_PARDISO_LIBRARIES="/home/freaklovesmango/pardiso/libpardiso600-GNU720-X86-64.so" \
-D CMAKE_INSTALL_PREFIX=/home/freaklovesmango/build-dir/install/Trilinos \
$EXTRA_ARGS \
../trilinos-12.12.1-Source

thereby the license is also in the build-dir. But it didn't work either...

@jhux2 I found it in the Amesos 2.0 Reference Guide, but I think it is outdated indeed, so I shouldn't have used it, sorry for that...

ghtina commented 6 years ago

I also unsuccessfully tried to build it with -D BUILD_SHARED_LIBS=ON instead of the TPL thing.

EXTRA_ARGS=$@

cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D Trilinos_ENABLE_ALL_PACKAGES=FALSE \
-D Trilinos_ENABLE_Amesos=ON \
-D Trilinos_ENABLE_TESTS=ON \
-D Trilinos_ENABLE_OpenMP=ON \
-D TPL_ENABLE_BLAS=ON \
-D TPL_ENABLE_LAPACK=ON \
-D BUILD_SHARED_LIBS=ON \
-D CMAKE_INSTALL_PREFIX=/home/freaklovesmango/build-dir/install/Trilinos \
$EXTRA_ARGS \
../trilinos-12.12.1-Source
srajama1 commented 6 years ago

@freaklovesmango Yes, you would need shared libraries and the TPL flags. What you have looks reasonable. What is the error ? When you enable Pardiso, Trilinos cofigure has to find Pardiso. This means it will check for the header and the library are available. Depending on the error you can set the correct Cmake options so it recognizes the library.

ghtina commented 6 years ago

@srajama1 thanks again. I figured it out, I had to adjust -D Amesos_ENABLE_PARDISO=ON \, after that it worked properly!

srajama1 commented 6 years ago

Great ! Good luck testing ...