CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM compile error (http://www.cfd-online.com/Forums/openfoam-installation/88952-openfoam-compile-error.html)

balkrishna May 31, 2011 05:08

OpenFOAM compile error
 
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.

wyldckat June 4, 2011 07:43

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

balkrishna June 13, 2011 04:42

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

wyldckat June 13, 2011 15:39

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

balkrishna June 14, 2011 01:29

1 Attachment(s)
Thanks for the response . I am attaching the file with this post .

wyldckat June 14, 2011 11:19

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

balkrishna June 15, 2011 05:16

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 .

wyldckat June 15, 2011 15:39

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 (Post 311404)
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

balkrishna June 16, 2011 00:40

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

wyldckat June 17, 2011 03:53

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


All times are GMT -4. The time now is 03:58.