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

Compiling new BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2021, 19:31
Default Compiling new BC
  #1
New Member
 
Mehrshad Amini
Join Date: Sep 2017
Posts: 10
Rep Power: 8
mxa261 is on a distinguished road
Hello all,

I am trying to compile a new boundary condition on a supercomputer that I have access to it. Although it was compiled before on my personal laptop, it gives me an error here. Please see the error as below:
------------------------------------------------------------------------
ln: ./lnInclude
Making dependency list for source file turbulentKineticEnergyInletFvPatchScalarField.C
g++ -std=c++11 -m64 -pthread -DOPENFOAM=2006 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -Wl,-rpath,/storage/work/m/mxa261/sw7/spack/opt/spack/linux-rhel7-ivybridge/gcc-8.3.1/openfoam-2006_201012-c37dslk27grmp5gnwpoot22qb2g4wtus/platforms/linux64GccDPInt32-spack/lib -DNoRepository -ftemplate-depth-100 -I/storage/work/m/mxa261/sw7/spack/opt/spack/linux-rhel7-ivybridge/gcc-8.3.1/openfoam-2006_201012-c37dslk27grmp5gnwpoot22qb2g4wtus/src/finiteVolume/lnInclude -I/storage/work/m/mxa261/sw7/spack/opt/spack/linux-rhel7-ivybridge/gcc-8.3.1/openfoam-2006_201012-c37dslk27grmp5gnwpoot22qb2g4wtus/src/meshTools/lnInclude -iquote. -IlnInclude -I/storage/work/m/mxa261/sw7/spack/opt/spack/linux-rhel7-ivybridge/gcc-8.3.1/openfoam-2006_201012-c37dslk27grmp5gnwpoot22qb2g4wtus/src/OpenFOAM/lnInclude -I/storage/work/m/mxa261/sw7/spack/opt/spack/linux-rhel7-ivybridge/gcc-8.3.1/openfoam-2006_201012-c37dslk27grmp5gnwpoot22qb2g4wtus/src/OSspecific/POSIX/lnInclude -fPIC -c turbulentKineticEnergyInletFvPatchScalarField.C -o Make/linux64GccDPInt32-spack/turbulentKineticEnergyInletFvPatchScalarField.o
mkdir: cannot create directory '': No such file or directory
make: *** [/storage/work/m/mxa261/sw7/spack/opt/spack/linux-rhel7-ivybridge/gcc-8.3.1/openfoam-2006_201012-c37dslk27grmp5gnwpoot22qb2g4wtus/wmake/makefiles/general:182: /libturbulentKineticEnergyInlet.so] Error 1

---------------------------------------------------------------------------------

I could not figure it out yet. I would appreciate the help in advance. Please see the file/option as follow:

The files is as below:
--------------------------------------------------------------------------------
turbulentKineticEnergyInletFvPatchScalarField.C
LIB = $(FOAM_USER_LIBBIN)/libturbulentKineticEnergyInlet
--------------------------------------------------------------------------------

The option is as below:
--------------------------------------------------------------------------
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

LIB_LIBS = \
-lfiniteVolume \
-lmeshTools
-----------------------------------------------------------------------------


Best,
Mehrshad
mxa261 is offline   Reply With Quote

Old   January 16, 2021, 10:55
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Do you have writing rights to the directories you want to write your .so file
mAlletto is offline   Reply With Quote

Old   January 16, 2021, 13:04
Default
  #3
New Member
 
Mehrshad Amini
Join Date: Sep 2017
Posts: 10
Rep Power: 8
mxa261 is on a distinguished road
Hi Michael,

Actually I could compile the BC by changing the following in the file:

"FOAM_USER_LIBBIN" to "FOAM_LIBBIN"

In addition, when I run "echo $FOAM_USER_APPBIN" I got a blank line of output. I think it is not set here. I think the environment variable "FOAM_USER_APPBIN" is not recognized at all.

Do you know any solution for it?

Thank you in advance.

Best,
Mehrshad
mxa261 is offline   Reply With Quote

Old   January 16, 2021, 17:08
Default
  #4
New Member
 
Mehrshad Amini
Join Date: Sep 2017
Posts: 10
Rep Power: 8
mxa261 is on a distinguished road
I solved the issue.

First I source the bashrc file. Then, the "echo $FOAM_USER_APPBIN" worked. It gives me the corresponding address:

/storage/home/mxa261/OpenFOAM/mxa261-v2006/platforms/linux64GccDPInt32-spack/bin

However, I had to create the directories manually. I do not know why it was not already there! After that, the compilation worked by using wmake command.

Best,
Mehrshad
mxa261 is offline   Reply With Quote

Old   January 21, 2021, 06:11
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by mxa261 View Post
I solved the issue.

First I source the bashrc file. Then, the "echo $FOAM_USER_APPBIN" worked. It gives me the corresponding address:

/storage/home/mxa261/OpenFOAM/mxa261-v2006/platforms/linux64GccDPInt32-spack/bin

However, I had to create the directories manually. I do not know why it was not already there! After that, the compilation worked by using wmake command.

Best,
Mehrshad

In most cases the spack installation will use modules to setup the environment, which means that it may fail to set up somethings. Not entirely sure.
olesen 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
olaFlow - Errors in compiling and tutorial running GrivalszkiP OpenFOAM Running, Solving & CFD 1 October 14, 2020 17:50
[OpenFOAM.org] Compiling OpenFOAM 5.0 on the Titan Supercomputer wildfire230 OpenFOAM Installation 20 May 6, 2020 07:30
Getting error both interpreting and compiling serene6390 Fluent UDF and Scheme Programming 1 October 27, 2017 00:49
[OpenFOAM.org] Trouble Compiling OpenFOAM-dev using Intel Compiler 15 for use on Xeon Phi foamer123 OpenFOAM Installation 9 August 20, 2015 14:03
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40


All times are GMT -4. The time now is 01:16.