CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Compile openfoam solver into standalone executable file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2018, 17:44
Default Compile openfoam solver into standalone executable file
  #1
New Member
 
Qi Yang
Join Date: Oct 2017
Posts: 6
Rep Power: 9
qiyang is on a distinguished road
Hi,

I am using ErminePro_trial on Ubuntu16.04 to compile the OpenFOAM solver(strangSplitFoam) into a standalone executable, I added "/opt/openfoam5/etc/bashrc internal" in configure file and added "ld_preload=`echo /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/" .

The whole paragraph is: "ld_preload=`echo /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/*.so` && ErmineProTrial.x86_64 strangSplitFoam --config=config --ld_preload="$ld_preload" --output=strangSplitFoam-static"

I got strangSplitFoam-static , but when I run it, it shows

"error while loading shared libraries: libfiniteVolume.so: cannot open shared object file: No such file or directory. "

However, libfiniteVolume.so is already in the ld_preload path.

I am asking that could anyone help me with this.
qiyang is offline   Reply With Quote

Old   October 5, 2018, 17:45
Default
  #2
New Member
 
Qi Yang
Join Date: Oct 2017
Posts: 6
Rep Power: 9
qiyang is on a distinguished road
This is needed dynamic library and path of my program: strangSplitFoam

How can I add them into the config file

ldd strangSplitFoam
linux-vdso.so.1 => (0x00007ffc95d26000)
libfiniteVolume.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so (0x00007f8bd71f7000)
libfvOptions.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libfvOptions.so (0x00007f8bd6de4000)
libmeshTools.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so (0x00007f8bd676b000)
libsampling.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libsampling.so (0x00007f8bd6122000)
libturbulenceModels.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libturbulenceModels.so (0x00007f8bd5ccc000)
libcompressibleTurbulenceModels.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so (0x00007f8bd5802000)
libreactionThermophysicalModels.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so (0x00007f8bd4ee5000)
libspecie.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libspecie.so (0x00007f8bd49e7000)
libcompressibleTransportModels.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libcompressibleTransportModels.so (0x00007f8bd47e3000)
libfluidThermophysicalModels.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libfluidThermophysicalModels.so (0x00007f8bd4299000)
libchemistryModel.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libchemistryModel.so (0x00007f8bd37ef000)
libODE.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libODE.so (0x00007f8bd35a5000)
libcombustionModels.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libcombustionModels.so (0x00007f8bd320d000)
libmixCanteraFoam.so => /root/OpenFOAM/root-5.0/platforms/linux64GccDPInt32Opt/lib/libmixCanteraFoam.so (0x00007f8bd2c36000)
libOpenFOAM.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so (0x00007f8bd20e0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8bd1edc000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8bd1b5a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8bd1851000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8bd163b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8bd1271000)
libPstream.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so (0x00007f8bd1061000)
libtriSurface.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libtriSurface.so (0x00007f8bd0dc2000)
libsurfMesh.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libsurfMesh.so (0x00007f8bd0ab1000)
libfileFormats.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libfileFormats.so (0x00007f8bd0826000)
liblagrangian.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/liblagrangian.so (0x00007f8bd05fc000)
libdynamicMesh.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libdynamicMesh.so (0x00007f8bcfe9b000)
libconversion.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libconversion.so (0x00007f8bcfc18000)
libsolidThermo.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libsolidThermo.so (0x00007f8bcf91d000)
libsolidSpecie.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libsolidSpecie.so (0x00007f8bcf6ee000)
libthermophysicalProperties.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libthermophysicalProperties.so (0x00007f8bcf3d6000)
libsundials_cvodes.so.2 => /usr/lib/libsundials_cvodes.so.2 (0x00007f8bcf1a3000)
libsundials_nvecserial.so.0 => /usr/lib/libsundials_nvecserial.so.0 (0x00007f8bcef9f000)
liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f8bce7a7000)
libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f8bce538000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8bce31b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8bce101000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8bd901d000)
libmpi.so.12 => /usr/lib/libmpi.so.12 (0x00007f8bcde2b000)
libextrudeModel.so => /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libextrudeModel.so (0x00007f8bcdc0b000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f8bcd8e0000)
libibverbs.so.1 => /usr/lib/libibverbs.so.1 (0x00007f8bcd6d1000)
libopen-rte.so.12 => /usr/lib/libopen-rte.so.12 (0x00007f8bcd457000)
libopen-pal.so.13 => /usr/lib/libopen-pal.so.13 (0x00007f8bcd1ba000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f8bccf7b000)
libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007f8bccd41000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8bccb39000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f8bcc936000)
libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f8bcc72b000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f8bcc521000)

Thanks
qiyang is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
wmake compiling new solver mksca OpenFOAM Programming & Development 14 June 22, 2018 07:29
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 18:34
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 06:18


All times are GMT -4. The time now is 03:21.