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

Compilation problem after modifying a solver.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2009, 08:12
Default Compilation problem after modifying a solver.
  #1
Member
 
Petri Sulasalmi
Join Date: Jul 2009
Location: Finland
Posts: 32
Rep Power: 17
PetSul is on a distinguished road
Hello,

I bumped into a following problem: I tried to compile a solver which made on an standard solver chtMultiRegionFoam. I copied the solver with a different name, made the changes to the solver as well as in the Make diretory etc, then removed old dependency and object files by using wclean and the tried to compile it by using wmake. It gives the following message:

Making dependency list for source file regionProperties/regionProperties.C
Making dependency list for source file derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C
Making dependency list for source file derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField .C
Making dependency list for source file fluid/compressibleCourantNo.C
Making dependency list for source file metsoFoam.C
SOURCE=regionProperties/regionProperties.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -Ifluid -Isolid -IregionProperties -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/compressible/turbulenceModel -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/regionProperties.o
/usr/local/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.3/cc1plus: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make: *** [Make/linux64GccDPOpt/regionProperties.o] Error 1

Then I tried the following: I just copied chtMultiRegionFoam with new name, then applied wclean, made the changes in the Make directory and also renamed the chtMultiRegion.C but didn't change anything inside the solver itselfand then applied wmake. And again it gives a similar error:

Making dependency list for source file regionProperties/regionProperties.C
Making dependency list for source file derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C
Making dependency list for source file derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField .C
Making dependency list for source file fluid/compressibleCourantNo.C
Making dependency list for source file NEWchtMultiRegionFoam.C
SOURCE=regionProperties/regionProperties.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -Ifluid -Isolid -IregionProperties -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/compressible/turbulenceModel -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/regionProperties.o
/usr/local/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.3/cc1plus: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make: *** [Make/linux64GccDPOpt/regionProperties.o] Error 1

Does anyone have any idea how to fix this?

Regards,

Petri
PetSul is offline   Reply With Quote

Old   October 1, 2009, 10:10
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

GCC is unable to find libmpfr.so.1

so in you .bashrc file add the following entry

export LD_LIBRARY_PATH=/path-to-folder-containing-libmpfr.so.1:$LD_LIBRARY_PATH

to locate libmpfr.so.1 use

find /search-path/ -name 'libmpfr.so.1'

where libmpfr.so.1 usually is located in /usr if it cant find it in /usr try just / as the path.

If it still cant locate libmpfr.so.1 you need to install mpfr or build it from source.

Regards
linnemann is offline   Reply With Quote

Old   October 1, 2009, 18:28
Default
  #3
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17
olwi is on a distinguished road
Hi,

My guess is that you don't HAVE the mpfr library installed. Messing with paths wont help you then.

Start the package manager of your Linux distribution, and look for the mpfr package. Install it. Then try again. In OpenSUSE 10.3, for example, this action is both necessary and sufficient. No other fix required.

Good luck,

Ola
olwi 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
Moving mesh problem with a FSI solver mathieu OpenFOAM Running, Solving & CFD 8 January 25, 2010 10:08
patching problem unsteady solver yellow-stuff Main CFD Forum 0 September 25, 2009 02:26
Problem with Phoenics solver Alan Phoenics 1 April 6, 2009 17:02
Problem in tesing the icoFoam solver liuzhw OpenFOAM Running, Solving & CFD 0 November 2, 2005 23:33
Compiled UDF / Compilation problem mikhail FLUENT 1 October 13, 2000 07:12


All times are GMT -4. The time now is 05:25.