Closed abhyshr closed 11 months ago
I think it has to do something related to building with shared libraries. How do I build GridPACK with shared libraries?
@abhyshr To build the python wrapper you need to build GridPACK and all it's dependencies as shared libraries. Your build is trying to link to the static library /people/abhy245/software/GridPACK/src/build_no_progress_ranks/lib/libgridpack_hadrec_module.a
. You need to go back and rebuild GA w/ shared libraries.
I think it has to do something related to building with shared libraries. How do I build GridPACK with shared libraries?
-D BUILD_SHARED_LIBS=YES
should be sufficient when building GridPACK.
Ok. @bjpalmer: I am using PETSc and GridPACK that you've installed on pic. Do these build shared libraries? If not, can you update them to build shared libraries?
Ohh boyy....All dependencies; GA, PETSc, Boost; are built with static libraries. This is going to be a long one :-(
@wperkins: Do you have instructions on how to build GA and Boost as shared libraries? I know what to do with PETSc.
@abhyshr I e-mailed my notes to you. They are old. No guarantees.
I haven't done it in a while, but my recollection is that it goes through pretty smoothly. I will build shared object versions in the pic/projects area
Okay, I built shared object versions of petsc-3.8.4, boost-1.65.0 and ga-5.7 in /pic/projects/gridpack/software. Look for the -so extensions on the boost and petsc directories and for the build_pr_so and build_ts_so directories under ga-5.7. I tried running the gridpack test suite with these libraries and most of the applications pass, but there are a much higher number of failures than I see with static libraries. The environment I used is
module purge
module load gcc/6.1.0
module load openmpi/3.0.1
module load python/2.7.3
module load cmake/3.17.1
module load git
module load java
setenv CC gcc
setenv CFLAGS "-pthread"
setenv CXX g++
setenv CXXFLAGS "-pthread"
setenv FC gfortran
setenv FFLAGS "-pthread"
I used these command to install them and can find the *.so (their shared libs) respectively
Install shared lib: boost(1.65.0):
cd boost_1_65_0
sh ./bootstrap.sh --prefix="/home/lei/software/boost_1_65_0" --without-icu --with-toolset=gcc --without-libraries=python,log
# Add the following to the end of project-config.jam:
# MPI
using mpi ;
./b2 -a -d+2 link=shared stage
sudo ./b2 -a -d+2 link=shared install
# Add the boost lib path
sudo vi /etc/ld.so.conf
GA: (5.8)
git clone https://github.com/GlobalArrays/ga.git
cd ga
sudo ./autogen.sh
sudo ./configure --with-mpi-ts --enable-cxx --disable-f77 --without-blas --enable-i4 --enable-shared --prefix="/home/lei/software/ga"
sudo make
sudo make install
Petsc:
git clone -b release https://gitlab.com/petsc/petsc.git petsc-v3.8.4
cd petsc-v3.8.4
git checkout v3.8.4
./configure --with-mpi-dir=/usr/local --with-c++-support=1 --with-c-support=0 --with-fortran=0 --with-scalar-type=complex --download-superlu --download-superlu_dist --download-mumps --download-parmetis --download-metis --download-f2cblaslapack=1 --download-suitesparse --with-clanguage=c++ --with-shared-libraries=1 --with-x=0 --with-mpirun=mpirun --with-mpiexec=mpiexec --with-debugging=1 --download-scalapack --with-cxx-dialect=C++11
make PETSC_DIR=/home/lei/Install_package/petsc-v3.8.4 PETSC_ARCH=arch-linux2-cxx-debug all
make PETSC_DIR=/home/lei/Install_package/petsc-v3.8.4 PETSC_ARCH=arch-linux2-cxx-debug test
make PETSC_DIR=/home/lei/Install_package/petsc-v3.8.4 PETSC_ARCH=arch-linux2-cxx-debug streams
export PETSC_DIR=/home/lei/Install_package/petsc-v3.8.4
export PETSC_ARCH=arch-linux2-cxx-debug
In build_config.sh, add
-D BUILD_SHARED_LIBS=YES
Looks like this issue is resolved. Closing it.
I am getting an error installing the python wrapper on Constance. Any ideas what I am doing wrong here?