[Opm] Library dependency in building OPM

Kai Bao Kai.Bao at sintef.no
Thu Jul 22 08:47:51 UTC 2021


Hi, Lei,

I have tried to compile OPM on a remote server using locally complied openblas.

When I complied the OpenBlas, I make install​ it to a directory.

Then I use `-DCMAKE_PREFIX_PATH=` to add the directory to the installed OpenBlas when cmake​ OPM.

Part of the scripts to compile OpenBLAS looks like as follows,


old_location=`pwd`
install_fix="$old_location/openblas"

unzip -q OpenBLAS-0.3.10.zip
cd OpenBLAS-0.3.10
# make libs shared
make USE_OPENMP=0 -j ${parallel_build_tasks} VERBOSe=1 2>&1 | tee log
make install PREFIX=../openblas
cd ${old_location}


Part of the scripts to add it to the OPM cmake looks like follows,

cmake  -DCMAKE_PREFIX_PATH="${zoltan_dir};${openblas_dir}; ......

I hope you can find helpful information from the above and sorry for not cleaning up the message very well.


Sincerely,
Kai


________________________________
From: Opm <opm-bounces at opm-project.org> on behalf of LEI TING <leiting73 at 126.com>
Sent: Wednesday, July 21, 2021 5:53 PM
To: opm at opm-project.org <opm at opm-project.org>
Subject: [Opm] Library dependency in building OPM

Hi,
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'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?
Thanks a lot.


I'm using CMake 3.17.5, gcc 8.3.1.













--

     Lei Ting

_______________________________________________
Opm mailing list
Opm at opm-project.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopm-project.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fopm&data=04%7C01%7Ckai.bao%40sintef.no%7Ce6d0e16213d24e688e2d08d94c5fb0bd%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C1%7C637624796132581855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=XA7fhC4P3IqDHoz%2FgdU1%2BwEGM6WcMg4SZwD23N4Cbyg%3D&reserved=0


More information about the Opm mailing list