[Opm] Library dependency in building OPM

LEI TING leiting73 at 126.com
Thu Jul 22 07:59:11 UTC 2021


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" <markus.blatt at opm-op.com> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.make
Type: application/octet-stream
Size: 6702 bytes
Desc: not available
URL: <//opm-project.org/pipermail/opm/attachments/20210722/7a34c7cd/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: link.txt
URL: <//opm-project.org/pipermail/opm/attachments/20210722/7a34c7cd/attachment-0001.txt>


More information about the Opm mailing list