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

Loading Libraries (e.g. new boundary conditions) Stored Locally in ControlDict

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By dancfd
  • 1 Post By vasava

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2014, 22:20
Default Loading Libraries (e.g. new boundary conditions) Stored Locally in ControlDict
  #1
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello all,

I compiled a new boundary condition that I would like to use on a server, where there is no "$FOAM_USER_LIBBIN" directory. I have compiled and run the case without difficulty when the .so (shared object library) file is in the $FOAM_USER_LIBBIN directory, however now I want to move the .so file to my case directory and somehow tell OpenFOAM to find it there so that I can use it on the server. I tried a couple of approaches:

1. Changing the reference in the controlDict to
Code:
libs ("/home/<path to .so file>/lib<BCname>.so");
2. Changing the environment variable for FOAM_USER_LIBBIN:
Code:
export FOAM_USER_LIBBIN=/home/<path to .so file>
In either case, I get the same error from decomposePar:
Code:
--> FOAM Warning : 
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : libtimeVaryingUniformInletOutlet.so: cannot open shared object file: No such file or directory
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libtimeVaryingUniformInletOutlet.so"
Where libtimeVaryingUniformInletOutlet.so is my library.

Any ideas on how to make this work? Thanks in advance.

Daniel
dancfd is offline   Reply With Quote

Old   April 27, 2014, 22:46
Default
  #2
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
It looks like my mistake was using a relative path in place of an absolute path in the libs ("<path goes here");

Works now.
Mahmoud Abbaszadeh likes this.
dancfd is offline   Reply With Quote

Old   October 15, 2014, 04:57
Default
  #3
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
I had similar problem and I could resolve it by simply copying relevant files from the lib folder in the FOAM_USER_LIBBIN to the lib folder inside the openFoam installation folder.
Mahmoud Abbaszadeh likes this.
vasava is offline   Reply With Quote

Old   May 15, 2022, 14:53
Default
  #4
Member
 
Mahmoud
Join Date: Nov 2020
Location: United Kingdom
Posts: 43
Rep Power: 6
Mahmoud Abbaszadeh is on a distinguished road
Quote:
Originally Posted by vasava View Post
I had similar problem and I could resolve it by simply copying relevant files from the lib folder in the FOAM_USER_LIBBIN to the lib folder inside the openFoam installation folder.
thank you for your comment. This saved me a lot of time
Mahmoud Abbaszadeh is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 06:05
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
inlet boundary conditions newOFuser OpenFOAM 1 January 10, 2013 09:08
Boundary Conditions Jan Ramboer Main CFD Forum 11 August 16, 1999 09:59


All times are GMT -4. The time now is 15:28.