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

OpenFOAM compile error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2011, 06:08
Default OpenFOAM compile error
  #1
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17
balkrishna is on a distinguished road
I am installing OpenFOAM on a cluster. The location of the source is in my home folder. On running ./Allwmake this is the first error i get:
Code:
SOURCE=global/global.Cver ; sed -e 's/VERSION_STRING/1.7.0/' -e 's/BUILD_STRING/1.7.0-21131bcbd876/' $SOURCE > Make/linux64GccDPOpt/global.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 -I/home1/ccc/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/home1/ccc/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home1/ccc/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude   -fPIC -c Make/linux64GccDPOpt/global.C -o Make/linux64GccDPOpt/global.o
SOURCE=global/argList/argList.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 -I/home1/ccc/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/home1/ccc/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home1/ccc/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/argList.o
lnInclude/dictionaryTemplates.C: In member function ‘T Foam::dictionary::lookupOrDefault(const Foam::word&, const T&, bool, bool) const [with T = Foam::Switch]’:
global/argList/argList.C:396:   instantiated from here
lnInclude/dictionaryTemplates.C:44: error: call of overloaded ‘Switch(Foam::pTraits<Foam::Switch>)’ is ambiguous
lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
lnInclude/Switch.H:134: note:                 Foam::Switch::Switch(bool)
lnInclude/Switch.H:62: note:                 Foam::Switch::Switch(const Foam::Switch&)
make: *** [Make/linux64GccDPOpt/argList.o] Error 1
How do i resolve this ?

Thanks , Balkrishna.
balkrishna is offline   Reply With Quote

Old   June 4, 2011, 08:43
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Balkrishna,

This is an old bug, as you can see in this thread: http://www.cfd-online.com/Forums/ope...n-problem.html

OK, so there are two points to be taken into account:
  1. Which gcc/g++ version are you using? To know this, run:
    Code:
    gcc --version
    You should at least be running gcc 4.3.x, where x>=0.
  2. It's better to at least install OpenFOAM 1.7.1, since some critical bugs have been fixed, although mainly related to working with gcc 4.5.x.
Another thing that might help us help you, is knowing which Linux distribution your cluster is running. It's possible that an OpenFOAM build ready to be used is already available in the wild for your Linux based cluster For example, CentFOAM for CentOS 5.x comes to mind: OpenFOAM-1.7.0 for CentOS/RHEL/SL 5.x 64bit released

If your cluster has a gcc version below 4.3.x, then you can either:
Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 13, 2011, 05:42
Default
  #3
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17
balkrishna is on a distinguished road
Thanks for the same .... the cluster was using an older version of gcc .... the sys admin asked me to use gcc44 instead of gcc .... I did as u mentioned in the following post . http://www.cfd-online.com/Forums/ope...hel-5-5-a.html .... However i still get the following error :
Code:
make[2]: *** [/home2/b.patankar/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/IFCLookUpTableGen] Error 1
make[1]: *** [IFCLookUpTableGen] Error 2
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make[2]: *** [/home2/b.patankar/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/mixtureAdiabaticFlameT] Error 1
make[1]: *** [mixtureAdiabaticFlameT] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.
Could u help me out ....

Thanks ,
Balkrishna

Last edited by balkrishna; June 15, 2011 at 06:47.
balkrishna is offline   Reply With Quote

Old   June 13, 2011, 16:39
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Balkrishna,

OK, there might various reasons why things are not working. So lets try going through this step by step:
  1. Run Allwmake like this:
    Code:
    ./Allwmake > make.log 2>&1
  2. If you want to omit sensitive data, edit the file make.log with a text editor and use the replace function to change the paths or names of your user name and so on.
  3. Save and close. Then compress the file; you can do it by running:
    Code:
    tar -czf make.tar.gz make.log
  4. Then attach the file make.tar.gz on your next post.
Basically, the first error our first couple of errors are the ones to blame.

Edit: You might also want to see this thread: http://www.cfd-online.com/Forums/ope...ar-dtu-dk.html

Best regards,
Bruno
__________________

Last edited by wyldckat; June 13, 2011 at 16:40. Reason: see "Edit:"
wyldckat is offline   Reply With Quote

Old   June 14, 2011, 02:29
Default
  #5
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17
balkrishna is on a distinguished road
Thanks for the response . I am attaching the file with this post .
Attached Files
File Type: gz make.tar.gz (32.8 KB, 8 views)
balkrishna is offline   Reply With Quote

Old   June 14, 2011, 12:19
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Balkrishna,

Ah, the infamous
Code:
cannot find -liberty
error...
The missing file library is named "libiberty.so". Usually it resides in the package binutils-devel (its the package name in Fedora, so I assume that in RHEL it will be the same). You'll have to ask your systems administrator to install that package as well

Ironically, by what I could figure out, the latest OpenFOAM 1.7.x no longer needs libiberty.so

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 15, 2011, 06:16
Default
  #7
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17
balkrishna is on a distinguished road
Thanks a lot .... the sysadmin installed the package and everything is running fine . However I face another error when i run it in parallel :
Code:
cn052.2077ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2077PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
--------------------------------------------------------------------------
PSM was unable to open an endpoint. Please make sure that the network link is
active on the node and the hardware is functioning. 

  Error: PSM Could not find an InfiniPath Unit
--------------------------------------------------------------------------
cn052.2081ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2081PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2079ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2079PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2078ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2078PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2084ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2084PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2083ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2083PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2088ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2088PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2080ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2080PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2086ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2086PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2087ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2087PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2085ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2085PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
cn052.2082ipath_wait_for_device: The /dev/ipath device failed to appear after 30.0 seconds: Connection timed out
cn052.2082PSM Could not find an InfiniPath Unit on device /dev/ipath (30s elapsed) (err=21)
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):

  PML add procs failed
  --> Returned "Error" (-1) instead of "Success" (0)
--------------------------------------------------------------------------
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2077] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2079] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2082] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2083] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2080] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2081] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 2077 on
node cn052 exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[cn052:02074] 23 more processes have sent help message help-mtl-psm.txt / unable to open endpoint
[cn052:02074] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
[cn052:02074] 7 more processes have sent help message help-mpi-runtime / mpi_init:startup:internal-failure
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2088] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
*** An error occurred in MPI_Init
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
[cn052:2087] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
Could you help me out ???

Thanks ,
Balkrishna .
balkrishna is offline   Reply With Quote

Old   June 15, 2011, 16:39
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Balkrishna,

I completely forgot about MPI... OK, I assume you didn't change the OpenFOAM MPI options to use your cluster's MPI toolbox!?

It's easier if I quote the post by Kasper Kærgaard that I mentioned in another post:
Quote:
Originally Posted by kaergaard View Post
Furthermore you must configure openfoam to use the system mpi instead of the one that ships with OpenFOAM.
First tell openfoam to use the system mpi: in OpenFOAM-1.7.1/etc/bashrc
set the variable WM_MPLIB to SYSTEMOPENMPI. The line you should edit ends up looking like this:
: ${WM_MPLIB:=SYSTEMOPENMPI}; export WM_MPLIB

Next tell openfoam where to find the system MPI. In etc/settings.sh right after these two lines:
SYSTEMOPENMPI)
# use the system installed openmpi, get library directory via mpicc
mpi_version=openmpi-system
add these two lines:
export MPI_HOME=/opt/SUNWhpc/HPC8.2.1c/gnu/
export MPI_ARCH_PATH=/opt/SUNWhpc/HPC8.2.1c/gnu/

In order to use the system mpi you must call:

module load mpi

at the beginning of your session, i.e. either interactive session, or in your run file.
You'll probably have to adapt to your cluster's MPI version!

Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 16, 2011, 01:40
Default
  #9
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17
balkrishna is on a distinguished road
I did read that post . One thing which bothered me was the difference which mpi is used makes , especially since both the mpi versions are identical in my case . Also regarding the post :
The command :
Code:
module load mpi
gives the following error :
Code:
module: command not found
How shd i tackle this ?

Thanks ,
Balkrishna
balkrishna is offline   Reply With Quote

Old   June 17, 2011, 04:53
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Balkrishna,

Sadly I have no experience with these types of cluster environments I can only assume that the job manager for the cluster has a module loading system, that is used strictly when launching the parallel cases. It's not meant to be used directly in .bashrc.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
clusters, compilation, openfoam


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
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
nonNewtonian viscosity model mhassani OpenFOAM Programming & Development 5 January 7, 2013 10:27
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38


All times are GMT -4. The time now is 10:46.