Problem starting ELMER with MPICH2 on 64 architecture

Discussion about building and installing Elmer
Post Reply
geleont
Posts: 2
Joined: 04 Mar 2010, 18:21

Problem starting ELMER with MPICH2 on 64 architecture

Post by geleont »

Hello!

I successfully builded Elmer with MPICH2, but I am getting a error when try to start ElmerSolver_mpi:
cd tests/heateq-par
mpirun -np 2 ../../bin/ElmerSolver_mpi

Fatal error in MPI_Comm_size: Invalid communicator, error stack:
MPI_Comm_size(111): MPI_Comm_size(comm=0x1, size=0xea3560) failed
MPI_Comm_size(69).: Invalid communicator
Fatal error in MPI_Comm_size: Invalid communicator, error stack:
MPI_Comm_size(111): MPI_Comm_size(comm=0x1, size=0xea3560) failed
MPI_Comm_size(69).: Invalid communicator
ELMER SOLVER (v 5.4.1) STARTED AT: 2010/03/04 18:15:31
ELMER SOLVER (v 5.4.1) STARTED AT: 2010/03/04 18:15:31
rank 0 in job 34 sgu20.se.ngrid.ru_49662 caused collective abort of all ranks
exit status of rank 0: return code 1

Non mpi version of Elmer works fine, and others program which use MPICH2 works good too.
I tried to compile both trunk and last release from svn and getting the same error.

Thank you for your help.
Attachments
config.log
(78.62 KiB) Downloaded 428 times
geleont
Posts: 2
Joined: 04 Mar 2010, 18:21

Re: Problem starting ELMER with MPICH2 on 64 architecture

Post by geleont »

Solution is simple you need to use last gcc. Using of gcc 4.4.3 solved problem.
waad
Posts: 8
Joined: 10 Feb 2010, 05:16
Location: Canada
Contact:

Re: Problem starting ELMER with MPICH2 on 64 architecture

Post by waad »

Did you compile MPICH2 with shared libraries enabled ?
waad
Posts: 8
Joined: 10 Feb 2010, 05:16
Location: Canada
Contact:

Re: Problem starting ELMER with MPICH2 on 64 architecture

Post by waad »

ELMER SOLVER (v 5.4.1) STARTED AT: 2010/03/04 18:15:31
ELMER SOLVER (v 5.4.1) STARTED AT: 2010/03/04 18:15:31
Fatal error in MPI_Comm_size: Invalid communicator, error stack:
MPI_Comm_size(111): MPI_Comm_size(comm=0x1, size=0xea3560) failed
MPI_Comm_size(69).: Invalid communicator
Fatal error in MPI_Comm_size: Invalid communicator, error stack:
MPI_Comm_size(111): MPI_Comm_size(comm=0x1, size=0xea3560) failed
MPI_Comm_size(69).: Invalid communicator

I faced this problem even with 32 architecture. This problem due to the use of non-mpich2 "mpi.h" header in compiling ELMER. Maybe there is more than one MPI implementations installed in the machine. This issue can be solved by using the absolute path of the mpi: lib, bin and include directories. This scrip might be useful:
  • #=============================================================================
    # Convenience script for getting and compiling Elmer
    # (run the script by using the "source" command, e.g., "source script")
    #=============================================================================

    #wget 'http://elmerfem.svn.sourceforge.net/vie ... z?view=tar'
    #tar xzf 'trunk.tar.gz?view=tar'

    MODULE="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem post elmerparam front"
    #---------------
    # For testing
    FEM="fem"

    #-----------------------------------------------------------------------------
    # Choose the installation directory:
    #-----------------------------------------------------------------------------
    export ELMER_HOME=/home/waad/soft/ELMER.MPI/ElmerInstall
    export MPIDIR=/home/waad/soft/MPICH2/mpich2-install
    export HYPRE=/home/waad/soft/HYPRE/hypre-2.0.0
    export CPPFLAGS="-I$HYPRE/include"
    #-----------------------------------------------------------------------------
    # Choose the compilers:
    #-----------------------------------------------------------------------------
    export CC=mpicc
    export CXX=mpicxx
    export FC=mpif90
    export F77=mpif90
    #=============================================================================
    # Compile:
    #---------

    for m in $MODULE; do
    cd $m
    chmod uog=rwx ./configure
    ./configure --prefix=$ELMER_HOME --with-mpi=yes --with-mpi-lib-dir=/home/waad/soft/MPICH2/mpich2-install/lib --with-mpi-inc-dir=/home/waad/soft/MPICH2/mpich2-install/include --with-mpi-bin-dir=/home/waad/soft/MPICH2/mpich2-install/bin --with-hypre="-L$HYPRE/lib -lHYPRE" --with-64bits=no
    make clean
    make -j 2
    make install
    cd ..
    done
    #=============================================================================
    # Finally "cd fem" and "make check" to test the installation
    #=============================================================================
    cd $FEM
    make check
    cd ..
Just to be save, make sure you have mpilib in your LD_LIBRARY as:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/waad/soft/MPICH2/mpich2-install/lib
Post Reply