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/)
-   -   Compiling own solver: 'libNULL.so' is up to date. but not executable (https://www.cfd-online.com/Forums/openfoam-programming-development/104037-compiling-own-solver-libnull-so-up-date-but-not-executable.html)

lindstroem July 2, 2012 07:19

Compiling own solver: 'libNULL.so' is up to date. but not executable
 
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

wyldckat July 2, 2012 07:33

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

lindstroem July 2, 2012 07:55

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

wyldckat July 2, 2012 08:13

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".

lindstroem July 2, 2012 08:41

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

wyldckat July 2, 2012 09:01

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

lindstroem July 3, 2012 11:19

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!

wyldckat July 3, 2012 11:29

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

lindstroem July 3, 2012 11:47

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..

wyldckat July 3, 2012 12:20

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

lindstroem July 3, 2012 13:27

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 July 4, 2012 11:42

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

akidess July 4, 2012 13:07

Quote:

Originally Posted by lindstroem (Post 369779)
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?

lindstroem July 4, 2012 13:32

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..

wyldckat July 4, 2012 18:32

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

lindstroem July 5, 2012 02:06

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

wyldckat July 5, 2012 18:17

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

lindstroem July 6, 2012 02:15

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 :D

PRATBHARAT November 30, 2020 05:32

Quote:

Originally Posted by wyldckat (Post 369548)
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 !


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