Compiling Elmer with MPI

Discussion about building and installing Elmer
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: Compiling Elmer with MPI

Post by Takala »

Thanks for the tips! I was able to make the configure work. In the end I had to delete everything and start the compiling again.

But now I faced a make problem:

Code: Select all

mpicc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -m64 -fPIC -fPIC -I/home/ettaka/elmer/include -I/opt/mpich2/gnu64//include -MT binio.o -MD -MP -MF .deps/binio.Tpo -c -o binio.o binio.c
mv -f .deps/binio.Tpo .deps/binio.Po
mpif90 -I.  -I.. -O -m64 -fPIC -fPIC -I. -Ibinio -I/opt/mpich2/gnu64//include -c -o kinds.o kinds.f90
pathf95 WARNING: -O3 conflicts with -O; using latter value (-O)
rm -f libbinio.a
ar cru libbinio.a binio.o kinds.o biniomod.o 
ranlib libbinio.a
make[4]: Leaving directory `/home/ettaka/trunk/fem/src/binio'
make[3]: Leaving directory `/home/ettaka/trunk/fem/src/binio'
make[3]: Entering directory `/home/ettaka/trunk/fem/src'
mpif90 -O -m64 -fPIC -fPIC -I. -Ibinio -I/opt/mpich2/gnu64//include -c iso_varying_string.f90
pathf95 WARNING: -O3 conflicts with -O; using latter value (-O)

module iso_varying_string
       ^                  
pathf95-855 pathf95: ERROR ISO_VARYING_STRING, File = iso_varying_string.f90, Line = 42, Column = 8 
  The compiler has detected errors in module "ISO_VARYING_STRING".  No module information file will be created for this module.

     character(LEN=1), dimension(:), allocatable :: chars
                       ^                                  
pathf95-190 pathf95: ERROR ISO_VARYING_STRING, File = iso_varying_string.f90, Line = 56, Column = 24 
  Component "CHARS" does not have a POINTER attribute so its dimension must be an explicit-shape array with constant bounds.
                                     ^                    
pathf95-197 pathf95: ERROR ISO_VARYING_STRING, File = iso_varying_string.f90, Line = 56, Column = 38 
  Unexpected syntax: "POINTER or DIMENSION" was expected but found "ALLOCATABLE".

  elemental function op_concat_VS_VS (string_a, string_b) result (concat_string)
                                                                  ^              
pathf95-287 pathf95: WARNING OP_CONCAT_VS_VS, File = iso_varying_string.f90, Line = 334, Column = 67 
  The result of function name "CONCAT_STRING" in the function subprogram is not defined.

  elemental function var_str_ (char) result (string)
                                             ^       
pathf95-287 pathf95: WARNING VAR_STR_, File = iso_varying_string.f90, Line = 1325, Column = 46 
  The result of function name "STRING" in the function subprogram is not defined.

pathf95: PathScale(TM) Fortran Version 2.2.1 (f14) Fri Sep 25, 2009  13:01:11
pathf95: 2453 source lines
pathf95: 3 Error(s), 2 Warning(s), 0 Other message(s), 0 ANSI(s)
pathf95: "explain pathf95-message number" gives more information about each message
make[3]: *** [iso_varying_string.o] Error 2
make[3]: Leaving directory `/home/ettaka/trunk/fem/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ettaka/trunk/fem/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ettaka/trunk/fem'
make: *** [all] Error 2
Do you know what is going on?

cheers,
Eelis
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: Compiling Elmer with MPI

Post by Takala »

Hi,

I just wanted to report that I was able to compile when I changed from trunk to release version...

Is there something that has been changed since the release that could have an effect on this? Since it is also possible that I did something differently.

cheers,
Eelis
mal
Site Admin
Posts: 54
Joined: 21 Aug 2009, 14:21

Re: Compiling Elmer with MPI

Post by mal »

The difference between trunk and release is in the ISO_VARYING_STRING module. This module has caused some problems with older compilers like gfortran <= 4.1.

Unfortunately I cannot check your issue, since I do not have access to pathscale 2.2. All I can say it compiles with 2.5, 3.0, 3.1 and 3.2.
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Run ElmerSover_mpi

Post by Takala »

Hi,

when I try to run ElmerSolver_mpi I get errors:

Code: Select all

mpiexec -np 2 ElmerSolver_mpi
/home/ettaka/elmer/bin/ElmerSolver_mpi: error while loading shared libraries: libmpich.so: cannot open shared object file: No such file or directory
/home/ettaka/elmer/bin/ElmerSolver_mpi: error while loading shared libraries: libmpich.so: cannot open shared object file: No such file or directory
I have tried to include the libmpich.so -file's path in LD_LIBRARY_PATH variable, but without better results.

do you know what is the problem?

/Eelis
mal
Site Admin
Posts: 54
Joined: 21 Aug 2009, 14:21

Re: Compiling Elmer with MPI

Post by mal »

Are you able to run simple MPI programs with your setup?

Check also the -envall switch from mpich user guide.
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: Compiling Elmer with MPI

Post by Takala »

Hi,

It works now. I tried with the envall -switch, but it was not implemented (I guess they have very old mpich2 in the machine..) but I was able to pass the LD_LIBRARY_PATH with -genvlist switch.

Thank you a lot for your help !!!

/Eelis
martijn
Posts: 25
Joined: 05 Oct 2009, 21:30

Re: Compiling Elmer with MPI

Post by martijn »

Hi I have problems with the compilation of Elmer in combination with mpi. I call configure with: --enable-mpi --with-mpi-dir=/usr/lib/openmpi
I am running Ubuntu 9.10 with the openmpi 1.3 package shipped with the distro.

Compilation of the fem module with mpi fails. The config.log says:

Code: Select all

/usr/local/fem/lib/libparpack.a(pdmout.o): In function `pdmout_': pdmout.f:(.text+0x46): undefined reference to `mpi_comm_rank_'
/usr/local/fem/lib/libparpack.a(pdvout.o): In function `pdvout_': pdvout.f:(.text+0x35): undefined reference to `mpi_comm_rank_'
/usr/local/fem/lib/libparpack.a(pivout.o): In function `pivout_': pivout.f:(.text+0x35): undefined reference to `mpi_comm_rank_'
/usr/local/fem/lib/libparpack.a(pdlamch.o): In function `pdlamch_': pdlamch.f:(.text+0xca): undefined reference to `mpi_allreduce_'
pdlamch.f:(.text+0x143): undefined reference to `mpi_allreduce_'
So apparently some mpi options are missing from parpack.
Parpack did compile fine. When I look to its config.log is see:

Code: Select all

Compiler:
  Fortran compiler          gfortran
  Fortran flags             -O -m64 -fPIC -I/usr/lib/openmpi/include
  MPI (compile parpack)     yes
To me this suggests that parpack has be compiled with mpi support.
Why does compilation of the fem module fail?
Attachments
config.log
config.log of the mathlibs
(17.3 KiB) Downloaded 361 times
config.log
config.log of the fem module
(89.43 KiB) Downloaded 349 times
Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: Compiling Elmer with MPI

Post by Juha »

Hi,

i might have broken this few days ago, fix will have to wait until monday.
In the meantime try adding --with-mpi-library="-lmpi" to your fem-module
configure, possibly other librararies are needed (like -lpthreads?), don't
recall openmpi configuration by heart...

Sorry 'bout the breakage, Juha
Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: Compiling Elmer with MPI

Post by Juha »

Hi,

as it happens i hadn't broken anything. Elmer/openmpi just requires
a few librararies specified, i.e. the following works for me:

--with-mpi-library="-/../openmpi/lib -lmpi_f77 -lmpi -lopen-rte -lopen-pal"

Perhaps easier would be to use the mpif77, mpif90, etc.. compiler
wrappers instead, as you then you don't have to know the link libraries.
That said you can usually find the link libraries by using the --verbose
(or -v) option to mpi90, for example.

Hope it works for you, Juha
Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: Compiling Elmer with MPI

Post by Juha »

Hi,

>--with-mpi-library="-/../openmpi/lib -lmpi_f77 -lmpi -lopen-rte -lopen-pal"

Small typo in the above, should of course read

--with-mpi-library="-L/../openmpi/lib -lmpi_f77 -lmpi -lopen-rte -lopen-pal"

-Juha
Post Reply