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

Compiling own solver: 'libNULL.so' is up to date. but not executable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2012, 08:19
Default Compiling own solver: 'libNULL.so' is up to date. but not executable
  #1
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi All,

I wrote a slightly modified solver in OF1.6-ext which basically works. After I had problems compiling another solver, i "wcleaned" to working one (without any modifications) and ran wmake libso again.
The compiler says 'libNULL.so' is up to date. but the solver is not executable.

I have no idea where to dig for the error, as I made no changes! So I'm open for any ideas

Best wishes
lindstroem is offline   Reply With Quote

Old   July 2, 2012, 08:33
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings lindstroem,

Here's how to use wmake and wclean:
  • For applications (solvers, utilities, etc...):
    Code:
    wclean
    wmake
  • For libraries:
    Code:
    wclean libso
    wmake libso
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 2, 2012, 08:55
Default
  #3
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno,

thanks for that quick and helpful answer. With just wmake i get a bunch of errors i never so before, that's why I tried wmake libso (which I understand is not correct, but I was "desperate" )
They are all something like
libinterfaceProperties.so: undefined reference to 'FOAM::...
I just rebuilt all the transportmodels I use, but it did not help..

Best wishes and thanks again
lindstroem is offline   Reply With Quote

Old   July 2, 2012, 09:13
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
The trick is usually to add to the library list of the respective libraries for which you're using include folders. But some cases things get tricky...

Example: https://github.com/OpenFOAM/OpenFOAM...m/Make/options
Code:
EXE_INC = \
    -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
    -I$(LIB_SRC)/finiteVolume/cfdTools \
    -I$(LIB_SRC)/finiteVolume/lnInclude


EXE_LIBS = \
    -lbasicThermophysicalModels \
    -lspecie \
    -lcompressibleTurbulenceModel \
    -lcompressibleRASModels \
    -lfiniteVolume \
    -lmeshTools
The ones in bold are a bit trickier to know if we need to add them or not, since we don't (indirectly) reference them in "EXE_INC".
__________________
wyldckat is offline   Reply With Quote

Old   July 2, 2012, 09:41
Default
  #5
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi again,

thanks for that hint.. And here it gets weird, because I just copied the solver from my Laptop (where it compiles) to my local machine where I get the errors. So it seems not to be a problem of the solver or the missing libraries, correct? Most missing references refer to Foam::UIPstream or any other U**steam.

Best wishes!
Lindstroem
lindstroem is offline   Reply With Quote

Old   July 2, 2012, 10:01
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Lindstroem,

Ooooh... that's not very good news... the missing lib option would be "-lPstream", but when that happens, something might be misconfigured somewhere... without more specific information, it's complicated to identify the real issue.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 3, 2012, 12:19
Default
  #7
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno

Thanks for your hint again.

The error is now
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lPstream

so is the lib somehow missing?

./Allwmake for the whole OF reports everything is up to date...

One thing that came into my mind what i might have changed is that i wanted to compile paraview with the "python-filter feature". Maybe I missconfigured something that day..
If you have any idea, I'd be glad to hear it, otherwise I'll need to recompile I think...

Thanks!
lindstroem is offline   Reply With Quote

Old   July 3, 2012, 12:29
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Lindstroem,

I should've written this the other day... The following gives a trail of information about which MPI is configured to be used by your OpenFOAM installation:
Code:
which mpirun
echo $WM_MPLIB
echo $MPI_ARCH_PATH
echo $FOAM_MPI
ls -l $FOAM_LIBBIN/$FOAM_MPI
The last one should show you the contents of the folder that should have "libPstream.so".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 3, 2012, 12:47
Default
  #9
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno,

thanks for your help.
Code:
/local/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/openmpi-1.4.3/platforms/linux64GccDPOpt/bin/mpirun
OPENMPI
/local/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/openmpi-1.4.3/platforms/linux64GccDPOpt
so $FOAM_MPI is not properly defined? The last command shows several libs, but not the "libPstream.so"

Allwmake reports
Code:
'/local/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so' is up to date.
Edit: Just saw that FOAM_LIBBIN has a folder openmpi-1.4.3 which contains the libPstream.so but I cannot define FOAM_MPI to this directory - it says No such file or directory although I'm "in this folder"..

Thank you so much..
lindstroem is offline   Reply With Quote

Old   July 3, 2012, 13:20
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Very, very strange... looks like FOAM_MPI is not being kept around for some weird reason...

Do you have multiple OpenFOAM installations? If so, how are you keeping them apart?

Which commit of 1.6-ext are you using?
Code:
git log -1
__________________
wyldckat is offline   Reply With Quote

Old   July 3, 2012, 14:27
Default
  #11
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno,

its from
Date: Tue Feb 8 20:42:35 2011 +0000

But I think i'll just recompile it, because as I said, it has worked before.. And the time we (especially you) invested here is maybe already too much. I somehow messed it up..

Thank you again for your help!!

Lindstroem
lindstroem is offline   Reply With Quote

Old   July 4, 2012, 12:42
Default
  #12
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno,

just want to let you know, that it works now..
I recompiled it, and had exactly the same problems as before.
The foamInstallationTest showed, that the $MPI_ARCH_PATH was not set. I'm wondering what went wrong, but I think, the path has been unset somehow.. So i basically did not change anything, but it works now, sourcing the etc/bashrc as usual..

One question arises although. The new OF-Version also provided a new Paraview (3.12). In this Version I cannot switch "decompose polyhedron" as before, do you know, where I can get this option back?

Thanks in advance!

Lindstroem
lindstroem is offline   Reply With Quote

Old   July 4, 2012, 14:07
Default
  #13
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Quote:
Originally Posted by lindstroem View Post
One question arises although. The new OF-Version also provided a new Paraview (3.12). In this Version I cannot switch "decompose polyhedron" as before, do you know, where I can get this option back?
This is untrue, pv312 is able to decompose polyhedra. Are you maybe using paraFoam?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   July 4, 2012, 14:32
Default
  #14
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Sorry, I did not want to say, that paraview does not offer this anymore, but I just cannot find the option.

Yes I am using paraFoam..
lindstroem is offline   Reply With Quote

Old   July 4, 2012, 19:32
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
OK, time for a lesson on "which OpenFOAM reader am I using now?"
  1. When opening a dummy file "case.foam", probably means that you're using the internal OpenFOAM reader.
    I think the option for using polyhedron decomposition is turned on by default and is in the check list at the bottom of the "Object Inspector" widget.
  2. When opening a dummy file "case.OpenFOAM" (default for paraFoam), probably means that you're using OpenFOAM's official plugin for ParaView. The situation here is a bit trickier:
    • OpenFOAM 2.0 brought this capability for the first time to the official plugin reader. The option is on the top part of the "Object Inspector" widget.
    • OpenFOAM 1.6-ext might not have this option, since it derives from OpenFOAM 1.6.x. And I didn't build ParaView in my installations of 1.6-ext... so I don't know for sure.
So Lindstroem, which one are you using now?


Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 5, 2012, 03:06
Default
  #16
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno,

thanks for your patience..

I was used to have it in the Object Inspector as you wrote. And I am using option No. 2 so I run paraFoam which creates the case.OpenFOAM file. My Object Inspector has only
Extrapolate Patches, Include Zones, Include Sets, Show Patch Names, Cache Mesh, Update GUI.

best wishes

Lindstroem
lindstroem is offline   Reply With Quote

Old   July 5, 2012, 19:17
Default
  #17
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Lindstroem,

You've got several possibilities, such as:
  • Hack the paraFoam script and change references from "OpenFOAM" to "foam".
  • Get the latest paraFoam script from OpenFOAM 2.1, so you can use the "-builtin" option.
  • Or even:
    Code:
    touch case.foam
    paraview -data=case.foam
    If I'm not mistaken on the last line...
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 6, 2012, 03:15
Default
  #18
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 16
lindstroem is on a distinguished road
Hi Bruno,

thank you very much, it works again I copied the 2.0 paraFoam script and made an alias for paraFoam with the builtin command.

Thanks!! Back in business
lindstroem is offline   Reply With Quote

Old   November 30, 2020, 06:32
Default
  #19
New Member
 
Pratyush Kumar
Join Date: Jun 2019
Location: Mumbai
Posts: 19
Rep Power: 7
PRATBHARAT is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Lindstroem,

I should've written this the other day... The following gives a trail of information about which MPI is configured to be used by your OpenFOAM installation:
Code:
which mpirun
echo $WM_MPLIB
echo $MPI_ARCH_PATH
echo $FOAM_MPI
ls -l $FOAM_LIBBIN/$FOAM_MPI
The last one should show you the contents of the folder that should have "libPstream.so".

Best regards,
Bruno
Hi Bruno,
I am facing the same issue of -o libNULL.so while compiling. However, in my case I am getting "libPstram.so" while running the last command. Can you tell me why am I facing this problem ?
Thanks in advance !
PRATBHARAT 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
different results between serial solver and parallel solver wlt_1985 FLUENT 11 October 12, 2018 09:23
OpenCL linear solver for OpenFoam 1.7 (alpha) will come out very soon qinmaple OpenFOAM Announcements from Other Sources 4 August 10, 2012 12:00
CFX 5.5 Roued CFX 1 October 2, 2001 17:49
Setting a B.C using UserFortran in 4.3 tokai CFX 10 July 17, 2001 17:25
Error during Solver cfd guy CFX 4 May 8, 2001 07:04


All times are GMT -4. The time now is 09:45.