CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OF 2.2 installation on cluster HELP. (https://www.cfd-online.com/Forums/openfoam-installation/118978-2-2-installation-cluster-help.html)

Luchini June 7, 2013 09:12

OF 2.2 installation on cluster HELP.
 
hello,

it is some time that i am trying to install OF 2.2 on a cluster ( i am not administrator) .

And something always go wrong. one of the errors is similar to
http://www.cfd-online.com/Forums/ope...xx-h-file.html
but can not completely understand what to do. So i was looking for some extra help.
I tried both OpenMPI or SYSTEMOPENMPI.

Do you have any suggestion?
thank you a lot
francesco


So if I use SYSTEMOPENMPI option the first error is :
================================================== ================================================== ============
wmake libso ptscotchDecomp
/usr/lib/gcc/x86_64-redhat-linux6E/4.4.6/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
SOURCE=ptscotchDecomp.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/include -I/home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/scotch_6.0.0/include/openmpi-system -I/usr/include/scotch -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOptSYSTEMOPENMPI/ptscotchDecomp.o
In file included from /opt/parastation/mpi2/include/mpi.h:1188:0,
from ptscotchDecomp.C:125:
/opt/parastation/mpi2/include/mpicxx.h:2698:34: error: declaration of C function ‘void MPI::Init(int&, char**&)’ conflicts with
/opt/parastation/mpi2/include/mpicxx.h:2697:13: error: previous declaration ‘void MPI::Init()’ here
/opt/parastation/mpi2/include/mpicxx.h:2700:45: error: declaration of C function ‘int MPI::Init_thread(int&, char**&, int)’ conflicts with
/opt/parastation/mpi2/include/mpicxx.h:2699:12: error: previous declaration ‘int MPI::Init_thread(int)’ here
ptscotchDecomp.C: In member function ‘Foam::label Foam::ptscotchDecomp::decompose(const Foam::fileName&, int, const int*, int, const int*, const scalarField&, Foam::List<int>&) const’:
ptscotchDecomp.C:551:39: warning: use of old-style cast [-Wold-style-cast]
make: *** [Make/linux64GccDPOptSYSTEMOPENMPI/ptscotchDecomp.o] Error 1
================================================== ================================================== ===============



If instead i use the option OPENMPI, I have :
================================================== ================================================== ===============
+ wmake all utilities
/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.3/libPstream.so: undefined reference to `pthread_getspecific'
/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.3/libPstream.so: undefined reference to `pthread_key_create'
/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.3/libPstream.so: undefined reference to `pthread_atfork'
/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.3/libPstream.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make[3]: *** [/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/bin/autoRefineMesh] Error 1
make[2]: *** [autoRefineMesh] Error 2
================================================== ================================================== ==============

linnemann June 7, 2013 14:10

Hello there

I can see that you are running a RHEL cluster version 6.x

Here is the official statement from openfoam.com

http://www.openfoam.org/download/git.php

Quote:

Checking the System
To check your system is ready to build the sources, execute the foamSystemCheck script (in the OpenFOAM-2.2.x/bin directory). If any critical software is missing, or needs updating to a newer version, please contact the system administrator to install the required software before proceeding to the build.
In particular your system will need to include a recent version of a C++ compiler. Compilation has been tested with the following compilers and versions:

GCC: 4.5.0 and above
LLVM Clang: 3.1
Intel ICC: 12.1.0 and 13.1.0
The default compiler for OpenFOAM is GCC. OpenFOAM 2.2.0 will only compile with versions of GCC above 4.5.0. Administrators and users can check the version of GCC running on their system by typing
As you can see it says you need GCC 4.5 or above.

You can have a check and see if centFOAM works for you.
http://sourceforge.net/projects/centfoam/?source=navbar

Luchini June 7, 2013 17:14

Thank you,

yes I was aware of the gcc problem, so I had already loaded the gcc 4.6.4 module. The system passed also the SystemCheck(see below). Sorry for not stating that clearly from the beginning.

But i noticed that in the error i had :
/usr/lib/gcc/x86_64-redhat-linux6E/4.4.6/../../../../lib64/crt1.o: In function `_start':

DOes it means that the 4.6.4 module has some wrong link?

thank you a lot for your help...
francesco



[flucci@ipazia ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/apps/gcc/4.6.4/libexec/gcc/x86_64-unknown-linux-gnu/4.6.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.4/configure --prefix=/home/apps/gcc/4.6.4
Thread model: posix
gcc version 4.6.4 (GCC)
[flucci@ipazia ~]$ foamSystemCheck

Checking basic system...
-----------------------------------------------------------------------
Shell: /bin/bash
Host: ipazia
OS: Linux version 2.6.18-194.8.1.el5
User: flucci


System check: PASS
==================
Continue OpenFOAM installation.

wyldckat June 9, 2013 06:39

Greetings to all!

@Luca: you should also check if g++ is also 4.6.4 or just 4.4.6:
Code:

g++ --version
If by any chance you don't have the module for g++ 4.6.4, you can try the following instructions: http://openfoamwiki.net/index.php/In...HEL#CentOS_6.4

Best regards,
Bruno

Luchini June 11, 2013 03:22

Hi Bruno,
Thank you for the reply. Also g++ seems ok (is it?) ...

[flucci@ipazia ~]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/apps/gcc/4.6.4/libexec/gcc/x86_64-unknown-linux-gnu/4.6.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.4/configure --prefix=/home/apps/gcc/4.6.4
Thread model: posix
gcc version 4.6.4 (GCC)


I have done the procedure again with SYSTEMOPENMPI, load the module for 4.6.4 ,run wcleanAll, wcleanLnIncludeAll, and Allwmake. The error is still there but before i may have overlooked a problem that I am surprised i haven't seen it since usually i do a grep 'error'.

But I have some :
gcc: error: unrecognized option ‘--showme:compile’
preatty early in the installation.

below there is the beginning of the log file.

Any idea? Should i try again with the procedure that Bruno suggested me for the case that i did not had g++ ?

Thank you a lot for the help.
francesco




make: Nothing to be done for `all'.

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

========================================
Build Scotch decomposition library scotch_6.0.0
/home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/scotch_6.0.0
scotch header in /home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/scotch_6.0.0/include
scotch libs in /home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64GccDPOpt/lib

========================================
Build PTScotch decomposition library scotch_6.0.0 (uses MPI)
/home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/scotch_6.0.0

ptscotch header in /home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/scotch_6.0.0/include/openmpi-system
ptscotch libs in /home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64GccDPOpt/lib/openmpi-system

========================================
Build Tecio
optional component was not found

========================================
Done ThirdParty Allwmake
========================================

+ wmakePrintBuild -check
same version as previous build
+ wmakeLnInclude OpenFOAM
wmakeLnInclude: linking include files to OpenFOAM/lnInclude
+ wmakeLnInclude OSspecific/POSIX
wmakeLnInclude: linking include files to OSspecific/POSIX/lnInclude
+ Pstream/Allwmake
+ wmake libso dummy
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file UPstream.C
Making dependency list for source file UIPread.C
Making dependency list for source file UOPwrite.C
SOURCE=UPstream.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/UPstream.o
SOURCE=UIPread.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/UIPread.o
SOURCE=UOPwrite.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/UOPwrite.o
'/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/dummy/libPstream.so' is up to date.
+ case "$WM_MPLIB" in
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers

wclean mpi
wmake libso mpi
wmakeLnInclude: linking include files to ./lnInclude
gcc: error: unrecognized option ‘--showme:compile’
Making dependency list for source file UOPwrite.C
could not open file mpi.h for source file UOPwrite.C
gcc: error: unrecognized option ‘--showme:compile’
Making dependency list for source file UIPread.C
could not open file mpi.h for source file UIPread.C
gcc: error: unrecognized option ‘--showme:compile’
Making dependency list for source file UPstream.C
could not open file mpi.h for source file UPstream.C
gcc: error: unrecognized option ‘--showme:compile’
Making dependency list for source file PstreamGlobals.C
could not open file mpi.h for source file PstreamGlobals.C
gcc: error: unrecognized option ‘--showme:compile’
SOURCE=UOPwrite.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -IlnInclude -I. -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOptSYSTEMOPENMPI/UOPwrite.o
In file included from /opt/parastation/mpi2/include/mpi.h:1188:0,
from UOPwrite.C:29:
/opt/parastation/mpi2/include/mpicxx.h: In constructor ‘MPI::Datatype::Datatype()’:
/opt/parastation/mpi2/include/mpicxx.h:161:47: warning: use of old-style cast [-Wold-style-cast]
/opt/parastation/mpi2/include/mpicxx.h: In member function ‘virtual void MPI::Datatype::Commit()’:



=================================================
If It is of help i add also the error that come later in the compilation .... :
=================================================


wclean ptscotchDecomp
wmake libso ptscotchDecomp
wmakeLnInclude: linking include files to ./lnInclude
gcc: error: unrecognized option ‘--showme:compile’
Making dependency list for source file ptscotchDecomp.C
could not open file mpi.h for source file ptscotchDecomp.C
gcc: error: unrecognized option ‘--showme:compile’
SOURCE=ptscotchDecomp.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/include -I/home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/scotch_6.0.0/include/openmpi-system -I/usr/include/scotch -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/flucci/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOptSYSTEMOPENMPI/ptscotchDecomp.o
In file included from /opt/parastation/mpi2/include/mpi.h:1188:0,
from ptscotchDecomp.C:125:
/opt/parastation/mpi2/include/mpicxx.h:2698:34: error: declaration of C function ‘void MPI::Init(int&, char**&)’ conflicts with
/opt/parastation/mpi2/include/mpicxx.h:2697:13: error: previous declaration ‘void MPI::Init()’ here
/opt/parastation/mpi2/include/mpicxx.h:2700:45: error: declaration of C function ‘int MPI::Init_thread(int&, char**&, int)’ conflicts with
/opt/parastation/mpi2/include/mpicxx.h:2699:12: error: previous declaration ‘int MPI::Init_thread(int)’ here
ptscotchDecomp.C: In member function ‘Foam::label Foam::ptscotchDecomp::decompose(const Foam::fileName&, int, const int*, int, const int*, const scalarField&, Foam::List<int>&) const’:
ptscotchDecomp.C:551:39: warning: use of old-style cast [-Wold-style-cast]
make: *** [Make/linux64GccDPOptSYSTEMOPENMPI/ptscotchDecomp.o] Error 1
+ wmake libso decompositionMethods
wmakeLnInclude: linking include files to ./lnInclude

Luchini June 13, 2013 03:54

Hi All,

i still have problems with this installation.

Do you think i can proceed with this instructions :
http://openfoamwiki.net/index.php/In...HEL#CentOS_6.4

even though i do not have administrator privileges? So i can not perform point 1:
================================================== ===========
su -
yum groupinstall 'Development Tools'
yum install openmpi openmpi-devel qt-devel zlib-devel texinfo
#This one is useful, but not crucial
yum upgrade
exit
================================================== ============

Does anybody knows a work around?

thank you for the help

wyldckat June 15, 2013 11:16

Hi Luca,

Sorry, long week at work and couldn't reply sooner.

The error you got is because "mpicc" was unable to provide a good answer to these lines of code at "mplibSYSTEMOPENMPI": https://github.com/OpenFOAM/OpenFOAM...bSYSTEMOPENMPI
Quote:

Originally Posted by wmake/rules/General/mplibSYSTEMOPENMPI
Code:

PINC = $(shell mpicc --showme:compile)
PLIBS = $(shell mpicc --showme:link)


In your system, it looks like "mpicc" is linked directly to "gcc", which leads to the problem you're getting.

I took a look at your first post on this thread and it looks like you're using a specific MPI toolbox, possibly MPICH2?
Code:

/opt/parastation/mpi2/
So, for using this, here's what I can figure out:
  1. You need to change the initial source command from:
    Code:

    WM_MPLIB=SYSTEMOPENMPI
    To:
    Code:

    WM_MPLIB=MPICH
    Check step #4 from the following link see what I mean: http://openfoamwiki.net/index.php/In...HEL#CentOS_6.4
  2. Then edit the file "$WM_PROJECT_DIR/etc/config/settings.sh". To know where this points to, run:
    Code:

    echo $WM_PROJECT_DIR/etc/config/settings.sh
  3. Look for the line that has this:
    Code:

    MPICH)
    And adapt the code below it.
    • If I'm not mistaken, change this code:
      Code:

          export FOAM_MPI=mpich2-1.1.1p1
          export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
          export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI

      To this:
      Code:

          export FOAM_MPI=ParaStationMPI2
          export MPI_HOME=/opt/parastation/mpi2
          export MPI_ARCH_PATH=/opt/parastation/mpi2

  4. Then start a new terminal, just to make sure you start with a clean shell environment.
  5. To check if the environment is well defined, run:
    Code:

    echo $MPI_HOME
    echo $MPI_ARCH_PATH

    and confirm if the paths above are being used.
  6. If all OK, then run:
    Code:

    ./Allwmake > make.log 2>&1
    once again! Hopefully it will finally build as intended.
Best regards,
Bruno

Luchini June 17, 2013 08:11

Dear Bruno,

Thank you a lot for your help. I have followed your suggestions
and it seems the installation went much better. I still have some errors ( see attachment) but i guess that with a clean installation they will go away.

the /foamInstallationTest gives me :
Summary
-------------------------------------------------------------------------------
Base configuration ok.
Critical systems ok.

Done

Tonight i will to a clean up and run a clean installation. Hope that this will the end of it.

Thank you a lot

Luchini June 18, 2013 04:17

1 Attachment(s)
Hello everybody.

So i have finished the clean installation. I think the installation it was successful but i still have the same errors as before. In attachment there is a summary of the make.log.
All major applications seem installed correctly.
To me the errors seems kind of minor but i would be grateful if somebody can comment on them to give me an idea of their criticality and eventually an hint on how to solve them.

Summarizing even further the attachment i have :

A) could not open file zoltanRenumber.H for source file renumberMesh.C

B) /usr/lib/../lib64/libreadline.so: undefined reference to `PC'
/usr/lib/../lib64/libreadline.so: undefined reference to `tgetflag'
collect2: ld returned 1 exit status
make[3]: *** [/home/flucci/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/bin/setSet] Error 1
make[3]: Leaving directory `/home/flucci/OpenFOAM/OpenFOAM-2.2.x/applications/utilities/mesh/manipulation/setSet'

C) ERROR: ParaView not found in /home/flucci/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0

D)make[1]: Leaving directory `/home/flucci/OpenFOAM/OpenFOAM-2.2.x/applications/utilities/thermophysical'
make: Target `application' not remade because of errors.

Anything to be warried of?

Thank you a lot for the HELP.
francesco

wyldckat June 20, 2013 16:26

Hi Luca,

Based on the summary of errors you've provided:
  1. Not a problem.
  2. This is a tough one to replicate. The problem seems to be due to an inconsistency between the library and the header file for the library "readline".
  3. This is normal to happen, if you didn't follow the build instructions for building ParaView, which were also on the wiki. But my guess is that on the cluster, you don't need ParaView, so in that case, no problem here.
  4. It's a reference to setSet not building due to the problems with "readline".
So, in essence: nothing much to worry about. If you don't have setSet (command line based control of creating sets), you can still use topoSet (dictionary based creation of sets).


If you do want to have setSet up and running, it'll be necessary to figure out which header file it's using and if it's related to the same version as the library file itself.

Best regards,
Bruno


All times are GMT -4. The time now is 00:08.