Hi, Marcus, Thanks for your reply. I'll try to explain what I did, and please find the attached 2 files from cmake.
Since it's a remote server and I don't have root access, I use source codes of OPM to compile from source. For all dependencies, I use binary packages from the OPM site: https://www.opm-project.org/package/redhat/7/, including dune, suitesparse, and trilinos. These 3 packages also depend on other packages, so I use yum to download all dependencies. I can't use 'yum install' because it requires root access. So I use yumdownloader to download all rpm packages, then use rpm2cpio and cpio to uncompress all the rpm packages to my home directory, like: rpm2cpio dune-common.rpm | cpio -div. I guess maybe some packages depend on /usr/lib64/libopenblas.so. That is why cmake want to link with libopenblas.so. But I don't know which one depends on it and what I should do. I tried to modify the file build.make and link.txt to fix the path, like: origin: bin/ebos: /usr/lib64/libopenblas.so fixed: bin/ebos: /public/home/leiting/exec/usr/lib64/libopenblas.so "/public/home/leiting/exec" is the folder I put all dependencies. It can work, but every time I run cmake, I have to fix a lot of files. So I want to find a way to solve the problem. Or do you have a better way to compile the OPM source? Thanks again. Regards, -- Lei Ting At 2021-07-22 14:59:57, "Markus Blatt" <[email protected]> wrote: >Hi, > >On Wed, Jul 21, 2021 at 11:53:25PM +0800, LEI TING wrote: >>I'm building OPM 2021.04 in CentOS 7.4 on a remote server. When building the >>module opm-simulator, in the file CMakeFiles/ebos.dir/build.make, it says: >>bin/ebos: /usr/lib64/libopenblas.so. And in the file link.txt, it has the >>line -lopenblas. And many other files have the same pattern. >>Because the server doesn't have libopenblas.so in the folder /usr/lib64, I >>have to put this file in my home directory. But the make will only link with >>/usr/lib64/libopenblas.so. > >I am a bit puzzeled. If you execute cmake on your remote server, it sure never >find libraries that are not there. What is CMake telling your and what exactly >are your doing? > >Have run CMake elsewhere and copied stuff. Have you copied libraries needed >from somewhere else? > >>I'm new to the cmake system, could anyone tell me how to change the cmake >>file so that it will link the libopenblas.so from my home directory? > >Please don't even think about this. It will not work. > >Markus >-- > >Markus Blatt >CTO @ OPM-OP AS, Heyerdahlsvei 12b, 0777 Oslo, Norway >https://opm-op.com | +4916097590858
build.make
Description: Binary data
/public/home/leiting/exec/opt/rh/devtoolset-8/root/usr/bin/c++ -pipe -Wall -Wextra -Wshadow -pthread -fopenmp -O2 -DNDEBUG -mtune=native CMakeFiles/ebos.dir/ebos/ebos_main.cc.o CMakeFiles/ebos_libblackoil.dir/ebos/ebos_blackoil.cc.o -o bin/ebos -L/public/home/leiting/src/opm2021.04/opm-common/build/lib -L/public/home/leiting/src/opm2021.04/opm-grid/build/lib -L/public/home/leiting/exec/opt/nvidia/cuda-11.0/targets/x86_64-linux/lib/stubs -Wl,-rpath,/public/home/leiting/src/opm2021.04/opm-common/build/lib:/public/home/leiting/src/opm2021.04/opm-grid/build/lib: lib/libopmsimulators.a /public/home/leiting/src/opm2021.04/opm-grid/build/lib/libopmgrid.a /public/software/mathlib/boost/1.55.0gnu/lib/libboost_date_time.a /public/home/leiting/exec/usr/lib64/libdunegrid.so /public/home/leiting/exec/usr/lib64/libdunegeometry.so /public/home/leiting/exec/usr/lib64/libugS2.so /public/home/leiting/exec/usr/lib64/libugS3.so /public/home/leiting/exec/usr/lib64/libugL.so /public/home/leiting/exec/usr/lib64/libdunecommon.so -lopenblas /public/software/mpi/openmpi/gnu/2.1.2/lib/libmpi_cxx.so /public/software/mpi/openmpi/gnu/2.1.2/lib/libmpi.so /public/home/leiting/exec/usr/lib64/libumfpack.so /public/home/leiting/exec/usr/lib64/libamd.so -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core /public/software/compiler/intel/intel-compiler-2017.5.239/compiler/lib/intel64_lin/libiomp5.so -lpthread -lm -ldl /usr/lib64/libm.so /public/home/leiting/exec/usr/lib64/libsuitesparseconfig.so -lrt /public/home/leiting/src/opm2021.04/opm-common/build/lib/libopmcommon.a -lstdc++fs -lgomp -lpthread /public/software/mathlib/boost/1.55.0gnu/lib/libboost_system.a /public/home/leiting/exec/opt/nvidia/cuda-11.0/lib64/libcusparse.so /public/home/leiting/exec/opt/nvidia/cuda-11.0/lib64/libcublas.so -lcudadevrt -lcudart_static -lrt -lpthread -ldl
_______________________________________________ Opm mailing list [email protected] https://opm-project.org/cgi-bin/mailman/listinfo/opm
