Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including ButterflyPACK #106

Open
mh1git opened this issue Sep 19, 2023 · 2 comments
Open

Including ButterflyPACK #106

mh1git opened this issue Sep 19, 2023 · 2 comments

Comments

@mh1git
Copy link

mh1git commented Sep 19, 2023

Hello,

I have built BLAS, LAPACK, SCALAPACK, ButterflyPACK. I am able to get STRUMPACK to recognize BLAS, LAPACK, SCALAPACK but it can't find ButterflyPACK. Here are my build scripts.

Can you please help?

NOTE1 : I built SCALAPACK as a static library. As a result I had to build ButterflyPACK as a static library as well.
NOTE2 : I am not certain where ButterflyPACK_DIR needs to point due to the fact there are actually 4 ButterflyPACK precision based static libraries. I tried several places. The path set below causes a CMake configuration error. I tried pointing to the actual static library location (commented out and also given at the end of this log) and STRUMPACK doesn't find ButterflyPACK at all then.

STRUMPACK my_build.sh

#############################
#!/bin/bash

rm -rf build
rm -rf install
mkdir build
mkdir install

cd build

export METIS_DIR=$(HOME)/local
export ButterflyPACK_DIR=/home/mark.horn/Development/ButterflyPACK/ButterflyPACK/install

$(HOME)/Development/CMake/cmake-3.26.3-linux-x86_64/bin/cmake ../
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=../install
-DSTRUMPACK_USE_OPENMP=ON
-DTPL_BLAS_LIBRARIES="$(HOME)/Development/LAPACK/lapack-3.11/build/lib/libblas.so"
-DTPL_LAPACK_LIBRARIES="$(HOME)/Development/LAPACK/lapack-3.11/build/lib/liblapack.so"
-DTPL_SCALAPACK_LIBRARIES="$(HOME)/Development/ScaLAPACK/scalapack-2.2.0/build/lib/libscalapack.a"
-DTPL_ENABLE_BPACK=ON \

make -j all
make install

make examples -j all
make tests -j all
make test # can fail on login nodes

make install -j all
make examples -j all
#############################

Here is my ButterflyPACK build script which appears to work (produces 4 precision based static libraries in build/lib64

ButterflyPACK my_build.sh

#############################
#!/bin/bash

sh PrecisionPreprocessing.sh

rm -rf build
rm -rf install
mkdir build
mkdir install

cd build

$(HOME)/Development/CMake/cmake-3.26.3-linux-x86_64/bin/cmake ../
-DCMAKE_Fortran_FLAGS=""
-DCMAKE_CXX_FLAGS=""
-DTPL_BLAS_LIBRARIES="$(HOME)/Development/LAPACK/lapack-3.11/build/lib/libblas.so"
-DTPL_LAPACK_LIBRARIES="$(HOME)/Development/LAPACK/lapack-3.11/build/lib/liblapack.so"
-DTPL_SCALAPACK_LIBRARIES="$(HOME)/Development/ScaLAPACK/scalapack-2.2.0/build/lib/libscalapack.a"
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_Fortran_COMPILER=mpif90
-DCMAKE_CXX_COMPILER=mpicxx
-DCMAKE_C_COMPILER=mpicc
-DCMAKE_INSTALL_PREFIX=../install
-DCMAKE_BUILD_TYPE=Release

make -j all
make install -j all
#############################

ButterflyPACK Libraries built

~/Development/ButterflyPACK/ButterflyPACK/build/lib64/libcbutterflypack.a ~/Development/ButterflyPACK/ButterflyPACK/build/lib64/libdbutterflypack.a ~/Development/ButterflyPACK/ButterflyPACK/build/lib64/libsbutterflypack.a ~/Development/ButterflyPACK/ButterflyPACK/build/lib64/libzbutterflypack.a

@mh1git
Copy link
Author

mh1git commented Sep 19, 2023

I found the issue. I fixed my scripts in the above comment so that others may find it useful.

No further help needed.

@pghysels
Copy link
Owner

Indeed, to get STRUMPACK to find ButterflyPACK, you set ButterflyPACK_DIR to the directory specified as CMAKE_INSTALL_PREFIX while configuring ButterflyPACK, and then make sure to do a make install for ButterflyPACK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants