Welcome, Guest
Username: Password: Remember me

TOPIC: run telemac2d on linux with openmpi and gfortran

run telemac2d on linux with openmpi and gfortran 14 years 2 months ago #531

  • rduda
  • rduda's Avatar
Hello,

maybe here is somebody who had run telemac2d on linux with openmpi and is so helpful to show me the way out the darkness.

In short:
I had tryed the cavity example with the selfcompiled telemac2d version and it works. :)

Next I tryed the same with mpi support but:
---8<---
*** COMPILATION ***

gfortran -c -O3 -fconvert=big-endian -frecord-marker=4 -I /opt/telemac/telemac2d/tel2d_v6p0/gFortran -I /opt/telemac/sisyphe/sisyphe_v6p0/gFortran -I /opt/telemac/special/special_v6p0/gFortran -I /opt/telemac/bief/bief_v6p0/gFortran -I /opt/telemac/damocles/damo_v6p0/gFortran -I /opt/telemac/paravoid/paravoid_v6p0/gFortran -I /opt/telemac/mpi/gFortran/include t2dfort.f

*** BIBLIOTHEQUES ***

- /opt/telemac/telemac2d/tel2d_v6p0/gFortran/telemac2dv6p0.a
- /opt/telemac/sisyphe/sisyphe_v6p0/gFortran/sisyphev6p0.a
- /opt/telemac/special/special_v6p0/gFortran/specialv6p0.a
- /opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a
- /opt/telemac/damocles/damo_v6p0/gFortran/damov6p0.a
- /opt/telemac/parallel/parallel_v6p0/gFortran/parallelv6p0.a
- -I/usr/lib/openmpi/include
- -pthread
- -I/usr/lib/openmpi/lib
- -L/usr/lib/openmpi/lib
- -lmpi_f90
- -lmpi_f77
- -lmpi
- -lopen-rte
- -lopen-pal
- -ldl
- -Wl,--export-dynamic
- -lnsl
- -lutil
- -lm
- -ldl
- /opt/telemac/mumpsvoid/mumpsvoid_v6p0/gFortran/mumpsvoidv6p0.a

*** EDITION DE LIENS ***

/opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a(lump.o): In function `lump_':
lump.f:(.text+0xe6): undefined reference to `plante_'
/opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a(matrix.o): In function `matrix_':
matrix.f:(.text+0xd2d): undefined reference to `plante_'
/opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a(matriy.o): In function `matriy_':
matriy.f:(.text+0x3647): undefined reference to `plante_'
/opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a(matvec.o): In function `matvec_':
matvec.f:(.text+0x12a4): undefined reference to `plante_'
/opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a(mt02aa.o): In function `mt02aa_':
mt02aa.f:(.text+0x738): undefined reference to `plante_'
/opt/telemac/bief/bief_v6p0/gFortran/biefv6p0.a(mt02aa_2.o):mt02aa_2.f:(.text+0x420): more undefined references to `plante_' follow
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x26): undefined reference to `MAIN__'
collect2: ld returned 1 exit status
ERREUR A L'EDITION DE LIEN

________________________________________________________
Execution terminee: telemac2d.bat
________________________________________________________
Compilation/linking/file errors detected.
Please see messages in: stdout above, stderr,
and/or file /var/tmp/TELEMAC/cavity/cas.txt3292_error.log
No execution errors detected.

Returning exit status 1
...
...stopping.
---8<---

The cas error File say:
*** ERREUR A L'EDITION DE LIEN princi.f ***

My System:
Ubuntu 10.04 64Bit
gfortran 4.4
openmpi 1.4.1

My telemac-dir:
artemis
bief
bin
config
damocles
mumpsvoid
parallel
paravoid
sisyphe
special
telemac2d
tomawac

? No mpi-Folder is this correct?
I had downloaded the sources direct from the telemac server (2010-08-18).

The MP files in the telemac-dir:
./artemis/arte_v6p0/gFortran/artemisv6p0_MP.exe
./artemis/arte_v6p0/sources/artemisv6p0_MP.exe
./tomawac/toma_v6p0/gFortran/tomawacv6p0_MP.exe
./tomawac/toma_v6p0/sources/tomawacv6p0_MP.exe
./sisyphe/sisyphe_v6p0/gFortran/sisyphev6p0_MP.exe
./sisyphe/sisyphe_v6p0/sources/sisyphev6p0_MP.exe
./telemac2d/tel2d_v6p0/gFortran/telemac2dv6p0_MP.exe
./telemac2d/tel2d_v6p0/sources/telemac2dv6p0_MP.exe

? There is no bief MP. Is this correct ?

The MPI Part in the systel.ini file:
---8<---
FC_MPI="/usr/bin/mpif90 "
LK_MPI="/usr/bin/mpif90 -o <EXE> <OBJS> <LIBS> "
LIBS_MPI="-I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -L/usr/lib/openmpi/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl"
RUN_MPI="/usr/bin/mpirun -machinefile mpirun.txt -np <N> <EXE>"

The cas.txt file in the cavity-dir:
---8<---
PARALLEL PROCESSORS = 2
---8<---

The mpi_telemac.conf in the cavity-dir:
# Number of processors :
4
#
# For each host :
#
# hostname number_of_processors_on_the_host
#
localhost 1
localhost 1
localhost 1
localhost 1

? Any hint what is missing or wrong?
? Is id possible at all, running telemac2d on linux with openmpi and gfortran?

Thank's a lot for any kind of help. :)
With best regards,
Ralf
The administrator has disabled public write access.

Re:run telemac2d on linux with openmpi and gfortran 14 years 2 months ago #532

  • jmhervouet
  • jmhervouet's Avatar
Hi,

You have to tell the compiler that in case of unresolved reference it must loop again over the libraries. For MAIN_ a partial solution will consist of adding the main program homere_telemac2d.f in your FORTRAN FILE. I'll tell you tomorrow morning the compiler directive for gfortran (I don't have it here at home).

Regards,

JMH
The administrator has disabled public write access.

Re:run telemac2d on linux with openmpi and gfortran 14 years 2 months ago #533

  • jmhervouet
  • jmhervouet's Avatar
Now the command for the gfortran compiler (we discovered that only recently) :

In file systel.ini in the section dedicated to gfortran :

LK_MPI="mpif90 -o <EXE> <OBJS> -Xlinker --start-group <LIBS> --end-group "

instead of:

LK_MPI="mpif90 -o <EXE> <OBJS> <LIBS> "

Hope this works,

Regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Re:run telemac2d on linux with openmpi and gfortran 14 years 2 months ago #534

  • rduda
  • rduda's Avatar
Dear Jean-Michel,

> Hope this works?
You make my day! :lol:

Thanks a lot, it works.

I had changed the LK_MPI line as you told me and run the cfgmak. Than I recompiled the whole telemac and surprise mpi used both cores.

Voici un baiser pour te remercier. ;)
(It is from www.leo.org)

with best regards,
Ralf
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.