CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to change the $(FOAM_USER_LIBBIN) to other path? (https://www.cfd-online.com/Forums/openfoam-programming-development/216406-how-change-foam_user_libbin-other-path.html)

jiadongw April 6, 2019 02:52

How to change the $(FOAM_USER_LIBBIN) to other path?
 
Hello Foamers,

Usually I compiled a modified library in my PC by changing the /Make/files to:
Code:

LIB = $(FOAM_USER_LIBBIN)/libNew00
Everything works well. This will build a folder of /platforms on the Home directory.

Now I’m working on an HPC cluster and don’t have the permission to build a directory in /Home folder. Every single user has a personal directory, e.g. /Roy11 on other directory.

So if I want to compile a new library on this personal directory (/Roy11) of HPC cluster, how should I define the ‘LIB =’ in the /Make/files?

Thank you.

nsf April 7, 2019 01:54

Hi,

How about
Code:


$(LIB=$(FOAM_SITE_LIBBIN)/libNew

You could also replace the $(...) With an absolute path instead and include the lib in your system/controlDict with an absolute path or add your lib directory to LD_LIBRARY_PATH.

Code:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/Roy11/somepath

jiadongw April 7, 2019 21:01

Hello Nicolas,

Thank you very much for reply, it's definitely what I need.

I'll try that soon.

Best wishes.


All times are GMT -4. The time now is 20:51.