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

Error in compiling pisoFoam after some changes

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2014, 06:05
Default Error in compiling pisoFoam after some changes
  #1
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 13
Man Yue is on a distinguished road
I have installed openfoam 1.7.0 into ubuntu 12.04 LTS to perform LES. To allow timesteps to be determined by CFL number (maxCo), I modify the file:

/opt/openfoam170/applications/solvers/incompressible/pisoFoam/pisoFoam

to add the lines:

Code:
#include "readTimeControls.H"
below #include "readTimeControls.H"

Code:
#include "setDeltaT.H"
below #include "CourantNo.H"

And then compile pisoFoam with the following inputs in the terminal:
Code:
cd $FOAM_SOLVERS/incompressible/pisoFoam
sudo bash
wmake
However, error message comes:

Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/opt/openfoam170/src/turbulenceModels/incompressible/turbulenceModel     -I/opt/openfoam170/src/transportModels     -I/opt/openfoam170/src/transportModels/incompressible/singlePhaseTransportModel     -I/opt/openfoam170/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam170/src/OpenFOAM/lnInclude -I/opt/openfoam170/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPOpt/pisoFoam.o -L/opt/openfoam170/lib/linux64GccDPOpt \
         -lincompressibleRASModels     -lincompressibleLESModels     -lincompressibleTransportModels     -lfiniteVolume     -lmeshTools -lOpenFOAM -liberty -ldl   -lm -o /opt/openfoam170/applications/bin/linux64GccDPOpt/pisoFoam
/usr/bin/ld: Make/linux64GccDPOpt/pisoFoam.o: undefined reference to symbol 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)'
/usr/bin/ld: note: 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)' is defined in DSO /opt/openfoam170/lib/linux64GccDPOpt/openmpi-system/libPstream.so so try adding it to the linker command line
/opt/openfoam170/lib/linux64GccDPOpt/openmpi-system/libPstream.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [/opt/openfoam170/applications/bin/linux64GccDPOpt/pisoFoam] Error 1
Any ideas as to what happened? I read some people suggesting a change in Gcc used in the compilation. Does it work? If yes, then how?

Thank you
Man Yue is offline   Reply With Quote

Old   July 24, 2014, 03:47
Default I have got the answer
  #2
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 13
Man Yue is on a distinguished road
The material here works for me:

http://www.cfd-online.com/Forums/openfoam-installation/78360-openfoam-1-7-x-fedora-13-a.html

In the file: wmake/rules/linux64Gcc/general, I do

Code:
 
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl $(FOAM_MPI_LIBBIN)/libPstream.so $(FOAM_LIBBIN)/libcompressibleTurbulenceModel.so
, to include both $(FOAM_MPI_LIBBIN)/libPstream.so and $(FOAM_LIBBIN)/libcompressibleTurbulenceModel.so, then in the EXE_LIBS option in the file ./Make/options in the solver directory, I add:
-lincompressibleTurbulenceModel

Then I can compile. For curiousity, I have a question. The drive for this change is for Fedora 13 (and in fact fixed as seen in their discussion), however, I need this change for installing openfoam-1.7.0 in ubuntu 12.04 LTS. Why?
Man Yue is offline   Reply With Quote

Old   July 24, 2014, 06:09
Default does not recognize turbulence model due to compilation problem
  #3
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 13
Man Yue is on a distinguished road
After I compile pisoFoam with wmake and run, I found:

Code:
 
--> FOAM FATAL ERROR: 
Unknown turbulenceModel type RASModel

Valid turbulenceModel types:

1
(laminar)
I then follow http://www.cfd-online.com/Forums/ope...ype-error.html and http://www.openfoam.org/mantisbt/view.php?id=316#c751

I've changed the link lines in wmake/rules/linux64Gcc/c++ to

Code:
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed 
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
and changed the link lines in wmake/rules/linux64Gcc/c to
Code:
 
 
LINKLIBSO = $(CC) -shared -Xlinker --add-needed -Xlinker --no-as-needed 
LINKEXE = $(CC) -Xlinker --add-needed -Xlinker --no-as-needed
and then re-compile pisoFoam with wmake. Problem solved.

However, my way of changing pisoFoam is still problematic, such that the time step does not change correctly. I am still finding a way.
Man Yue is offline   Reply With Quote

Reply

Tags
compile, error, openfoam-1.7.0, ubuntu 12.04, wmake

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
Differences in solution method for pisoFoam and buoyantBoussinesqPisoFoam mchurchf OpenFOAM 6 September 11, 2013 00:24
pisoFoam, pimpleFoam - Fluent user's questions RodriguezFatz OpenFOAM Running, Solving & CFD 0 September 4, 2013 05:26
Error compiling pisoFOAM EVBUCF OpenFOAM Programming & Development 6 January 25, 2012 20:00
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 06:40


All times are GMT -4. The time now is 06:23.