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

[OpenFOAM.com] Recompilation errors MPI related

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2006, 15:12
Default Recompilation errors MPI related
  #1
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Hi,

I try to recompile the development sources from prof. Jasak. Since I work on a RedHat EL4 machine , I had to work around the 'demangle.h' error by partially re-installing binutils.

At this moment, I am able to successfully compile the libraries in /src, but compilation of all applications give the following errors. It seems that there is a missing link to MPI from the applications sources.

================================================== =========================

make: Nothing to be done for `allFiles'.
make: `Make/linuxGcc4DPOpt/dependencies' is up to date.

/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/wmake/bashScripts/mkObjectDir /home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/applications/bin/linuxGcc4DPOpt/icoF oam
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/src/finiteVolume/lnInclude -I/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread Make/linuxGcc4DPOpt/icoFoam.o -L/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt \
-lfiniteVolume -lOpenFOAM -liberty -o /home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/applications/bin/linuxGcc4DPOpt/icoF oam
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `MPI::Is_initialized()'
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `MPI:p::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `MPI:p::Free()'
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `op_intercept'
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `PMPI::Intracomm::current_op'
/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/lib/linuxGcc4DPOpt/lam-7.1.1/libPstr eam.so: undefined reference to `PMPI::Comm::mpi_err_map'
collect2: ld returned 1 exit status
make: *** [/home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/applications/bin/linuxGcc4DPOpt/ico Foam] Error 1

================================================== =========================

Any ideas?

regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   August 29, 2006, 15:57
Default Hi Frank, Try this: Go t
  #2
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Hi Frank,

Try this:

Go to /home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/src/Pstream/

and execute ./Allwmake there. This will rebuild the libPstream.so library (I think).

Then try rebuilding icoFoam.
msrinath80 is offline   Reply With Quote

Old   August 30, 2006, 03:14
Default It tried that, but still the s
  #3
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
It tried that, but still the same errors.

Even when I'm in /home/frankl/OpenFOAM/OpenFOAM-1.3.27_06_06/src and conduct ./Allwmake no errors occur at all. So something strange is happening during compilation of the applications (solvers and utilities).

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   August 30, 2006, 03:27
Default Obvious (sorry I didin't spot
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Obvious (sorry I didin't spot it earlier): your directory is at the wrong place. You either need to adjust the location or put the stuff into:

/home/frankl/OpenFOAM/OpenFOAM-1.3

throwing away the date bit.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 30, 2006, 03:40
Default Thanks, I will try that. What
  #5
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Thanks, I will try that. What is the reason for this? I thought the date extension gives the opportunity to test different development versions next to each other. Now I have to keep track of changes using CVS for example.

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   August 30, 2006, 04:24
Default No you don't. Make multiple c
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
No you don't. Make multiple copies of the source (if this is what you are after) with date or similar extensions and then make OpenFOAM-1.3 a link that points to the one you wish to use. Another alternative would be to call your stuff 1.3.1, 1.3.2 etc and then code in the version you wish to use. This would allow you to move between versions simply by sourcing a different file into your environment. Most places where I've worked use something similar so I don't see a problem.

The reason for the setup is a large number of paths and variables that are managed by the release.

As for the CVS, I have been playing with this idea. I personally rather enjoy working under CVS and there already exists a publicly accessible CVS for OpenFOAM. If I get enough response (and people really want access to my development on a daily basis), I don't mind using it. (Anyone else keen to contribute?)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 30, 2006, 08:27
Default I now copied the sources to Op
  #7
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
I now copied the sources to OpenFOAM-1.3.1. Then I made the link OpenFOAM-1.3 -> OpenFOAM-1.3.1. All bash setting are the same as for a standard OpenFOAM-1.3 installation.

Unfortunately the same errors occur during ./Allwmake in OpenFOAM-1.3/applications:

================================================== =========================

make: `Make/linuxGcc4DPOpt/dependencies' is up to date.

/home/frankl/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /home/frankl/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/icoFoam
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/frankl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/home/frankl/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread Make/linuxGcc4DPOpt/icoFoam.o -L/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt \
-lfiniteVolume -lOpenFOAM -liberty -o /home/frankl/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/icoFoam
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `MPI::Is_initialized()'
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `MPI:p::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `MPI:p::Free()'
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `op_intercept'
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `PMPI::Intracomm::current_op'
/home/frankl/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.1/libPstream.so: undefined reference to `PMPI::Comm::mpi_err_map'
collect2: ld returned 1 exit status
make: *** [/home/frankl/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/icoFoam] Error 1

================================================== =========================

Any more ideas?

regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   August 30, 2006, 08:57
Default all right, I think that I solv
  #8
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
all right, I think that I solved this problem. I copied the library libPstream.so from the standard OpenFOAM-1.3 version to the approriate location in my modified version: OpenFOAM-1.3.1/lib/linuxGcc4DPOpt/dummy and OpenFOAM-1.3.1/lib/linuxGcc4DPOpt/lam-7.1.1

Any ideas why this works? Prof. Jasak, did you make any important changes to this library libPstream.so?

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   August 31, 2006, 04:54
Default Sounds like your LAM is either
  #9
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Sounds like your LAM is either configured to include the C++ MPI bindings or when compiling Pstream/mpi the C++ bindings were included.
mattijs is offline   Reply With Quote

Old   August 31, 2006, 04:58
Default allright. Do you now how to so
  #10
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
allright. Do you now how to solve that?
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   March 6, 2007, 14:37
Default Finally, someone solved this p
  #11
New Member
 
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17
dauptain is on a distinguished road
Finally, someone solved this pb?
Any help would be greatly appreciated.
Antoine
dauptain is offline   Reply With Quote

Old   March 7, 2007, 12:36
Default So, a small reminder. OPenFOA
  #12
New Member
 
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17
dauptain is on a distinguished road
So, a small reminder.
OPenFOAM sources compiles and runs perfectly with the original lam-7.1.1 installation.
Libraries libPstream.a and libPstream.so are OK.
I can recompile Icofoam or any other application.

If I try to generate the same libraries with a local installation of lam-7.1.2, i get some warnings " use of old-style cast" during the wmake of Pstream/mpi, but no error.

Then, the compilation of applications like icoFoam are saying:
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `MPI::Is_initialized()'
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `PMPI::Comm::mpi_comm_map'
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `MPI:p::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `MPI:p::Free()'
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `op_intercept'
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `PMPI::Intracomm::current_op'
/d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .so: undefined reference to `PMPI::Comm::mpi_err_map'

while the command nm gives :
nm -C /d1/users/dauptain/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream .a > ! tmp
flubio03:~/OpenFOAM/OpenFOAM-1.3/src/Pstream/mpi % grep Is_initialized tmp
U MPI::Is_initialized()
U MPI::Is_initialized()
U MPI::Is_initialized()
flubio03:~/OpenFOAM/OpenFOAM-1.3/src/Pstream/mpi % grep PMPI::Comm::mpi_comm_map tmp
U PMPI::Comm::mpi_comm_map
U PMPI::Comm::mpi_comm_map
U PMPI::Comm::mpi_comm_map
and so on...

Any idea is welcome

Cordially.
Ant.
dauptain is offline   Reply With Quote

Old   March 8, 2007, 03:40
Default Do you want to compile with th
  #13
Member
 
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17
fabianpk is on a distinguished road
Do you want to compile with the local lam? I take it it's for some cluster.

I had a similar problem when being forced to run mpich instead of lam on a cluster. There wasn't an mpich with the -fPIC option available, thus forcing me to link in mpich when compiling the executable instead of linking it when compiling Pstream. I remember that for mpich, if it isn't compiled with -fPIC it's not possible to link it to a dynamic library like Pstream, you have to link it to the executable. I see no trace of this error message for you however.

Do you have a static library libPstream.a? I think if you have both present, it will pick the dynamically linked one, the .so file.
fabianpk is offline   Reply With Quote

Old   March 8, 2007, 03:45
Default Did you check that the correct
  #14
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Did you check that the correct lam version is referenced in the .bashrc?

eg.
if [ .$WM_MPLIB = .LAM ]; then
export LAM_VERSION=7.1.2
...

And then re-source the .OpenFOAM-<version>/bashrc
before rebuilding lam or libPstream.

BTW: you might also want to try openmpi. The first 1.2 release candidate is available. I've been using 1.2b3 without problems. We use GridEngine and the openmpi boot proceedure does everything for you.

If you do try openmpi, compile *without* threads:

./configure \
--prefix=$OPENMPI_ARCH_PATH \
--enable-shared \
--disable-static \
--disable-mpi-f77 \
--disable-mpi-f90 \
--disable-mpi-profile \
--disable-mpi-cxx
olesen is offline   Reply With Quote

Old   March 8, 2007, 05:36
Default Thank you for your fast replie
  #15
New Member
 
Antoine Dauptain
Join Date: Mar 2009
Location: Genova, Liguria, Italy
Posts: 7
Rep Power: 17
dauptain is on a distinguished road
Thank you for your fast replies.

First of all, i need to use lam-7.1.2, because a coupler and some applications are already validated and running under this one, and i want OF in the whole coupled application.

I built the libPstream.so to see if the compilation of vanilla solvers (e.g. icoFoam) was still possible using lam-7.1.2 : answer is not for the moment.

Il buidled the libPstream.a to put it in a big static independant library that will be used by
the coupler.

After some tests:
- The nm command is giving the same results with libPstream.so and libPstream.a.
- The lam version in my .cshrc is indeed 7.1.2
setenv LAM_VERSION 7.1.2
setenv LAM_ARCH_PATH $LAMHOME/platforms/$WM_OPTIONS
- lam-7.1.2 is built on my system with gcc-4.1.0, as the whole OpenFOAM stuff

Any ideas to compile Pstream with lam-7.1.2 in a way icoFoam is still compiling?
Cordially.
Ant.
dauptain is offline   Reply With Quote

Old   March 8, 2007, 15:22
Default >include the C++ MPI bindings
  #16
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
>include the C++ MPI bindings

Just make sure you include mpi.h before any other OF include file in all the files in the mpi Pstream. Or probably undefine the LAM_WANT_MPI2CPP in mpi.h.
mattijs is offline   Reply With Quote

Old   July 7, 2016, 22:21
Default
  #17
New Member
 
Sam Bazgi
Join Date: Jul 2016
Location: USA
Posts: 7
Rep Power: 10
Manyway is on a distinguished road
Frank, just recompile the mpi library separately.
Smthg like:
Quote:
user@ubuntu:~/OpenFOAM/OpenFOAM-v1606+/src/Pstream/mpi$ wmake
libPstream.so will be rebuilt. Then
Quote:
./Allwmake
openfoam again
Manyway 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
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
Sgimpi pere OpenFOAM 27 September 24, 2011 08:57
Is Testsuite on the way or not lakeat OpenFOAM Installation 6 April 28, 2008 12:12


All times are GMT -4. The time now is 15:56.