CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compile OF2.1 with Intel Icc and Intel MPI (https://www.cfd-online.com/Forums/openfoam-installation/112919-compile-of2-1-intel-icc-intel-mpi.html)

hewei February 7, 2013 12:56

Compile OF2.1 with Intel Icc and Intel MPI
 
1 Attachment(s)
hi everyone,
I am trying to install OF on Linux Mint with Intel Icc and MPI, first I test that intel mpi works
then I set
66 export WM_COMPILER=Icc
85 export WM_MPLIB=INTELMPI

also I add the mpi path in settings.sh

549 INTELMPI)
550 export MPI_ROOT=/opt/intel/impi/4.1.0.024 # mpi installed path
551 lastCharID=$(( ${#MPI_ROOT} - 1 ))
552 if [ "${MPI_ROOT:$lastCharID:1}" == '/' ]
553 then
554 MPI_ROOT=${MPI_ROOT:0:$lastCharID}
555 fi
556
557 export FOAM_MPI=${MPI_ROOT##*/}
558 export MPI_ARCH_PATH=$MPI_ROOT
559
560 if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
561 then
562 echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
563 echo " MPI_ROOT not a valid mpt installation directory or ending in a '/'." 1>&2
564 echo " Please set MPI_ROOT to the mpt installation directory." 1> &2
565 echo " MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
566 fi
567
568 if [ "$FOAM_VERBOSE" -a "$PS1" ]
569 then
570 echo "Using INTEL MPI:"
571 echo " MPI_ROOT : $MPI_ROOT"
572 echo " FOAM_MPI : $FOAM_MPI"
573 fi
574
575 _foamAddPath $MPI_ARCH_PATH/bin64
576 _foamAddLib $MPI_ARCH_PATH/lib64
577 ;;
578 *)
579 export FOAM_MPI=$FOAM_LIBBIN/impi/4.0.024/bin64
580 #dummy
581 ;;
582 esac

/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib/openmpi-1.5.3/libPstream.so: could not read symbols: Invalid operation
make[3]: *** [/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/refineHexMesh] Error 1
make[3]: Leaving directory `/home/wei/OpenFOAM/OpenFOAM-2.1.1/applications/utilities/mesh/advanced/refineHexMesh'
make[2]: *** [refineHexMesh] Error 2

/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib/openmpi-1.5.3/libPstream.so: could not read symbols: Invalid operation
make[3]: *** [/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/selectCells] Error 1
make[3]: Leaving directory `/home/wei/OpenFOAM/OpenFOAM-2.1.1/applications/utilities/mesh/advanced/selectCells'
make[2]: *** [selectCells] Error 2
.............................

after I add #undef EIO in the readMechanicalProperties.H it still has erros
so what should I do?
Thanks you all
W.

wyldckat February 10, 2013 06:20

Greetings hewei,

I think you forgot to start a new terminal or at least to reset your OpenFOAM shell environment. I say this because it's still using the "openmpi-1.5.3" paths to Pstream!

If you have doubts about the "OpenFOAM shell environment", try this blog post of mine: Advanced tips for working with the OpenFOAM shell environment

Best regards,
Bruno

hewei February 10, 2013 14:21

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 406951)
Greetings hewei,

I think you forgot to start a new terminal or at least to reset your OpenFOAM shell environment. I say this because it's still using the "openmpi-1.5.3" paths to Pstream!

If you have doubts about the "OpenFOAM shell environment", try this blog post of mine: Advanced tips for working with the OpenFOAM shell environment

Best regards,
Bruno

thanks Bruno reply me, today I deleted all and re-install OF from the beginning and just change the etc/bashrc file. at beginning it seems running good but later there are many errors coming out. like
ld: note: '_ZN4Foam8UPstream9nRequestsEv' is defined in DSO /home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib/4.1.0.024/libPstream.so so try adding it to the linker command line
/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib/4.1.0.024/libPstream.so: could not read symbols: Invalid operation
make[2]: *** [/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/MRFMultiphaseInterFoam] Error 1


someone in this forums left a word "delate //front in settimes" but without more details. and what files should I add ,modified or delete? I really have no idea now, then what should I do? and how did other solve this problem? thanks for advance

wyldckat February 12, 2013 05:31

Hi hewei,

This is very strange... which exact version of Linux Mint are you using?

Best regards,
Bruno

hewei February 12, 2013 07:23

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 407350)
Hi hewei,

This is very strange... which exact version of Linux Mint are you using?

Best regards,
Bruno

hi Bruno
I use Linux Mint 13. its low temperature performance appears me the most

the above error doesn't appear yet, i found this

/usr/local/include/mpi.h(2087): catastrophic error: cannot open source file "openmpi/ompi/mpi/cxx/mpicxx.h"
#include "openmpi/ompi/mpi/cxx/mpicxx.h"


It seems my intel mpi setting has problems, why OF link to openmpi?

I test this
$echo $MPI_ROOT $MPI_HOME
/opt/intel/impi/4.1.0.024/intel64 /opt/intel/impi/4.1.0.024/intel64

$mpiicc -v
mpiicc for the Intel(R) MPI Library 4.1 for Linux*
Copyright(C) 2003-2012, Intel Corporation. All rights reserved.
icc version 13.1.0 (gcc version 4.6.0 compatibility)

and in the /home/.profile I also setted
PATH=$PATH:/opt/intel/impi/4.1.0.024/intel64/bin

is it enough?

this time I upload my setting.sh and the make log

thanks
wei

wyldckat February 12, 2013 07:30

OK, we're getting closer. Check the following:
  1. Run:
    Code:

    ls -la /opt/intel/impi/4.1.0.024/intel64/include64
    ls -la /opt/intel/impi/4.1.0.024/intel64/include64/mpi.h

    Do these two commands show anything? More specifically the second one.
  2. You should be able to change this path in "wmake/rules/linux64Icc/mplibINTELMPI", as shown here: https://github.com/OpenFOAM/OpenFOAM.../mplibINTELMPI

hewei February 12, 2013 09:08

Quote:

Originally Posted by wyldckat (Post 407389)
OK, we're getting closer. Check the following:
  1. Run:
    Code:

    ls -la /opt/intel/impi/4.1.0.024/intel64/include64
    ls -la /opt/intel/impi/4.1.0.024/intel64/include64/mpi.h

    Do these two commands show anything? More specifically the second one.
  2. You should be able to change this path in "wmake/rules/linux64Icc/mplibINTELMPI", as shown here: https://github.com/OpenFOAM/OpenFOAM.../mplibINTELMPI

what a good hints and good news! thank you very very much
OF cann't find the mpi location, so I change / wmake / rules / linux64Icc / mplibINTELMPI

PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi

into
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi


in my case

after that, the relevant errors disappeared and the left errors are about EIO and solidEquilibriumDisplacement

fPIC -c $SOURCE -o Make/linux64IccDPOpt/solidDisplacementFoam.o
readMechanicalProperties.H(78): error: expected an identifier
IOobject EIO
^

readMechanicalProperties.H(80): error: expected a type specifier
"E",
^

readMechanicalProperties.H(81): error: variable "runTime" is not a type name
runTime.timeName(0),
^

readMechanicalProperties.H(81): error: expected a ")"
runTime.timeName(0),
^

readMechanicalProperties.H(85): warning #12: parsing restarts here after previous syntax error
);
^

readMechanicalProperties.H(94): error: no instance of constructor "Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField [with Type=Foam::scalar={Foam::doubleScalar={double}}, PatchField=Foam::fvPatchField, GeoMesh=Foam::volMesh]" matches the argument list
argument types are: (int, Foam::fvMesh, Foam::dimensionedScalar, const Foam::word)
(
^

readMechanicalProperties.H(109): error: expression must have class type
EIO.readOpt() = IOobject::MUST_READ;
^

readMechanicalProperties.H(114): error: no instance of constructor "Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField [with Type=Foam::scalar={Foam::doubleScalar={double}}, PatchField=Foam::fvPatchField, GeoMesh=Foam::volMesh]" matches the argument list
argument types are: (int, Foam::fvMesh)
(
^

compilation aborted for solidDisplacementFoam.C (code 2)
make[2]: *** [Make/linux64IccDPOpt/solidDisplacementFoam.o] Error 2
make[2]: Target `/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/solidDisplacementFoam' not remade because of errors.
make[2]: Leaving directory `/home/wei/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/stressAnalysis/solidDisplacementFoam'
make[1]: *** [solidDisplacementFoam] Error 2
make[2]: Entering directory `/home/wei/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'
SOURCE=solidEquilibriumDisplacementFoam.C ; icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -xSSE3 -O2 -no-prec-div -DNoRepository -I/home/wei/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -ItractionDisplacementCorrectionStress -I../solidDisplacementFoam -IlnInclude -I. -I/home/wei/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/wei/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/solidEquilibriumDisplacementFoam.o
../solidDisplacementFoam/readMechanicalProperties.H(78): error: expected an identifier
IOobject EIO
^


../solidDisplacementFoam/readMechanicalProperties.H(80): error: expected a type specifier
"E",
^

../solidDisplacementFoam/readMechanicalProperties.H(81): error: variable "runTime" is not a type name
runTime.timeName(0),
^

../solidDisplacementFoam/readMechanicalProperties.H(81): error: expected a ")"
runTime.timeName(0),
^

../solidDisplacementFoam/readMechanicalProperties.H(85): warning #12: parsing restarts here after previous syntax error
);
^

../solidDisplacementFoam/readMechanicalProperties.H(94): error: no instance of constructor "Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField [with Type=Foam::scalar={Foam::doubleScalar={double}}, PatchField=Foam::fvPatchField, GeoMesh=Foam::volMesh]" matches the argument list
argument types are: (int, Foam::fvMesh, Foam::dimensionedScalar, const Foam::word)
(
^

../solidDisplacementFoam/readMechanicalProperties.H(109): error: expression must have class type
EIO.readOpt() = IOobject::MUST_READ;
^

../solidDisplacementFoam/readMechanicalProperties.H(114): error: no instance of constructor "Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField [with Type=Foam::scalar={Foam::doubleScalar={double}}, PatchField=Foam::fvPatchField, GeoMesh=Foam::volMesh]" matches the argument list
argument types are: (int, Foam::fvMesh)
(
^

compilation aborted for solidEquilibriumDisplacementFoam.C (code 2)
make[2]: *** [Make/linux64IccDPOpt/solidEquilibriumDisplacementFoam.o] Error 2
make[2]: Target `/home/wei/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/solidEquilibriumDisplacementFoam' not remade because of errors.
make[2]: Leaving directory `/home/wei/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/wei/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/stressAnalysis'
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.

anyway this solver I am not using now, the others work very well, Thank you very much!!

wei

wyldckat February 12, 2013 16:18

Hi Wei,

The last two problems are already fixed in OpenFOAM 2.1.x.

Best regards,
Bruno


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