Welcome, Guest
Username: Password: Remember me

TOPIC: Generating default parallel executables (*_MP.exe)

Generating default parallel executables (*_MP.exe) 14 years 4 months ago #304

  • jeremie
  • jeremie's Avatar
  • OFFLINE
  • Junior Boarder
  • Hydro-Quebec
  • Posts: 39
  • Thank you received: 7
Hello all,

We have successfully compiled and linked telemac2d V6P0 on linux, except for the default parallel executables (ex. telemac2dv6p0_MP.exe).

Errors such as this one are produced during the linking step of makepar90:
~/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_dmax.o): In function `p_dmax_':
p_dmax.f:(.text+0x37): undefined reference to `mpi_allreduce_'

This error message is printed for every function inside parallelv6p0.a. It looks as if the impi lib is not seen by the linker. It is however clearly indicated in the systel.ini file as follows:
FC_MPI="ifort "
LK_MPI="mpiifort -o <EXE>  <OBJS>  <LIBS>"
LIBS_MPI=" -L/opt/intel/impi/3.2.2/lib64/libmpi.a"

and variable LD_LIBRARY_PATH as outlined in the installation guide is set to:
/opt/intel/impi/3.2.2/lib64


The weird part, is that we can still workaround this by running telemac2d in parallel without the *_MP.exe as long as a user fortran file is provided. In that case, an exe is successfully generated at runtime using the right impi library that was provided in the systel.ini. Sample output looks like this:
 - FICHIER FORTRAN                                  : princi.f              
______________________________________________________________________________
*** COMPILATION *** 

 ifort -c -O3 -convert big_endian   -I /home/jeremie/telemac/V6P0/telemac2d/tel2d_v6p0/linux -I /home/jeremie/telemac/V6P0/sisyphe/sisyphe_v6p0/linux -I /home/jeremie/telemac/V6P0/special/special_v6p0/linux -I /home/jeremie/telemac/V6P0/bief/bief_v6p0/linux -I /home/jeremie/telemac/V6P0/damocles/damo_v6p0/linux -I /home/jeremie/telemac/V6P0/paravoid/paravoid_v6p0/linux -I /home/jeremie/telemac/V6P0/mpi/linux/include t2dfort.f 
______________________________________________________________________________
*** BIBLIOTHEQUES ***
 
 - /home/jeremie/telemac/V6P0/telemac2d/tel2d_v6p0/linux/telemac2dv6p0.a
 - /home/jeremie/telemac/V6P0/sisyphe/sisyphe_v6p0/linux/sisyphev6p0.a
 - /home/jeremie/telemac/V6P0/special/special_v6p0/linux/specialv6p0.a
 - /home/jeremie/telemac/V6P0/bief/bief_v6p0/linux/biefv6p0.a
 - /home/jeremie/telemac/V6P0/damocles/damo_v6p0/linux/damov6p0.a
 - /home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a
 - -L/opt/intel/impi/3.2.2/lib64/libmpi.a
 - /home/jeremie/telemac/V6P0/mumpsvoid/mumpsvoid_v6p0/linux/mumpsvoidv6p0.a


It would however be nice to have that spare *_MP.exe for those users that want to run simple cases in parllel without custom fortran.

Any help appreciated!





As some might know, this is the default executable file that is copied to a project
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.exe) 14 years 3 months ago #397

  • lmthk
  • lmthk's Avatar
Hi, Jeremie,

I also met some problems during compiling telemacv6p0 on linux. I compile telemac on my computer with the command makeall90. I have to report the following part of screen show

.....
fortcom: Warning: p_mpi_alltoallv_toma1.f, line 29: The structure contains one or more misaligned fields. [CHARAC_TYPE]
TYPE CHARAC_TYPE
^
fortcom: Warning: p_mpi_alltoallv_toma3.f, line 29: The structure contains one or more misaligned fields. [FONCTION_TYPE]
TYPE FONCTION_TYPE
^
.....
make: *** [telemac2dv6p0.exe] error 1
fortcom: Error: point_artemis.f, line 499: This name has not been declared as an array or a function. [NDS]
nds(1,5)= MESH%NPTFR
^
compilation aborted for point_artemis.f (code 1)
make: *** [point_artemis.o] error 1
fortcom: Warning: tomawac_mpi.f, line 11: The structure contains one or more misaligned fields. [CHARAC_TYPE]
TYPE CHARAC_TYPE
^
fortcom: Warning: tomawac_mpi.f, line 38: The structure contains one or more misaligned fields. [FONCTION_TYPE]
TYPE FONCTION_TYPE
^
.....

I can't see any executables after my running this command! Some problems may be caused by the compiler and mpi, because many warning messages are related with mpi. And for the moment I have no MPI.

But there is one error message: in point_artemis.f the variable nds has not been declared. I checked this file. Indeed, this variable is not declared in this file or in any modules it included!! Is this a bug?

Woohoo...

Chun
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.exe) 14 years 3 months ago #400

  • ails
  • ails's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 17
Hi Jeremie,

You should try to add -lpthread to your "LIBS_MPI" flags.

LIBS_MPI=" -L/opt/intel/impi/3.2.2/lib64/ -lmpi -lpthread"
and then "maktel parallel" in the sources directory (or makepar90)

This option is indicated in the default "systel.ini" provided in the tar files (but not in the installation guide:-(

Best regards,
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.exe) 14 years 3 months ago #403

  • jeremie
  • jeremie's Avatar
  • OFFLINE
  • Junior Boarder
  • Hydro-Quebec
  • Posts: 39
  • Thank you received: 7
Thank you for your input.

The INCMPI include path in parallel/parallel_v6p0/sources/makefile is set to /opt/intel/impi/3.2.2/include64. Unless, there is another place where this include has to be specified, this has not fixed the problem so far.

In response to ails:
I have added the additional flags to no avail. What do you think of my compiler block?
[linux]
DIRLIB=linux
#
FC_NAM="ifort"
FC_OPT_OBJEXT="o"
FC_OPT_COMPIL=" -c -O3 -convert big_endian -no-vec"
FC_OPT_DEBUG=" -g "
FC_OPT_PROFILE=" -O3 -w=obs -v -pg -c "
FC_OPT_INCLUDE="-I "
FC_OPT_OTHERS=" -extend-source 132 "
#
LK_NAM="ifort"
LK_OPT_NORMAL= 
LK_OPT_DEBUG=
LK_OPT_PROFILE=
LK_OPT_OUTNAME=" -o "
LK_OPT_OTHERS=
#
LIB_NAM=ar
LIB_OPT_LIBEXT="a"
LIB_OPT_OUTNAME="cru"
LIB_OPT_OTHERS=
LIB_RANLIB="ranlib"
#
RUN_DEBUG=
RUN_PROFILE=
#
#---- IMPI
#
FC_MPI="ifort "
LK_MPI="mpiifort -o <EXE>  <OBJS>  <LIBS>"
#LIBS_MPI=" -L/opt/intel/impi/3.2.2/lib64/libmpi.a"
LIBS_MPI=" -L/opt/intel/impi/3.2.2/lib64/ -lmpi -lpthread"
#RUN_MPI="mpiexec  -machinefile mpirun.txt -n <N> ./<EXE>"
RUN_MPI="mpirun -r ssh -f mpirun.txt -env I_MPI_DEBUG 2 -n <N> ./<EXE>"

This is a sample output of maktel parallel on sisyphe:
========== sisyphe/sisyphe_v6p0/sources :

===== Making : /home/jeremie/telemac/V6P0/sisyphe/sisyphe_v6p0/sources
Link parallel executable par defaut ...
/home/jeremie/telemac/V6P0/bief/bief_v6p0/linux/biefv6p0.a(solve.o): In function `solve_':
solve.f:(.text+0x3be7): undefined reference to `pre4_mumps_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_dmax.o): In function `p_dmax_':
p_dmax.f:(.text+0x37): undefined reference to `mpi_allreduce_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_dmin.o): In function `p_dmin_':
p_dmin.f:(.text+0x37): undefined reference to `mpi_allreduce_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_dsum.o): In function `p_dsum_':
p_dsum.f:(.text+0x37): undefined reference to `mpi_allreduce_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_exit.o): In function `p_exit_':
p_exit.f:(.text+0xfc): undefined reference to `mpi_barrier_'
p_exit.f:(.text+0x10b): undefined reference to `mpi_finalize_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_imax.o): In function `p_imax_':
p_imax.f:(.text+0x37): undefined reference to `mpi_allreduce_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_imin.o): In function `p_imin_':
p_imin.f:(.text+0x37): undefined reference to `mpi_allreduce_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_init.o): In function `p_init_':
p_init.f:(.text+0x46): undefined reference to `mpi_init_'
p_init.f:(.text+0x14e): undefined reference to `mpi_comm_rank_'
p_init.f:(.text+0x256): undefined reference to `mpi_comm_size_'
p_init.f:(.text+0xbf5): undefined reference to `mpi_barrier_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_isum.o): In function `p_isum_':
p_isum.f:(.text+0x37): undefined reference to `mpi_allreduce_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_alltoall.o): In function `p_mpi_alltoall_':
p_mpi_alltoall.f:(.text+0x1c): undefined reference to `mpi_alltoall_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_alltoallv.o): In function `p_mpi_alltoallv_':
p_mpi_alltoallv.f:(.text+0x2a): undefined reference to `mpi_alltoallv_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_type_commit.o): In function `p_mpi_type_commit_':
p_mpi_type_commit.f:(.text+0xe): undefined reference to `mpi_type_commit_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_type_extent.o): In function `p_mpi_type_extent_':
p_mpi_type_extent.f:(.text+0xe): undefined reference to `mpi_type_extent_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_type_free.o): In function `p_mpi_type_free_':
p_mpi_type_free.f:(.text+0xe): undefined reference to `mpi_type_free_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_type_lb.o): In function `p_mpi_type_lb_':
p_mpi_type_lb.f:(.text+0xe): undefined reference to `mpi_type_lb_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_type_struct.o): In function `p_mpi_type_struct_':
p_mpi_type_struct.f:(.text+0xc): undefined reference to `mpi_type_struct_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_mpi_type_ub.o): In function `p_mpi_type_ub_':
p_mpi_type_ub.f:(.text+0xe): undefined reference to `mpi_type_ub_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_iread.o): In function `p_iread_':
p_iread.f:(.text+0x29): undefined reference to `mpi_irecv_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_wait_paraco.o): In function `p_wait_paraco_':
p_wait_paraco.f:(.text+0x2f): undefined reference to `mpi_waitall_'
/home/jeremie/telemac/V6P0/parallel/parallel_v6p0/linux/parallelv6p0.a(p_iwrit.o): In function `p_iwrit_':
p_iwrit.f:(.text+0x29): undefined reference to `mpi_isend_'
make: *** [sisyphev6p0_MP.exe] Error 1
===== /home/jeremie/telemac/V6P0/sisyphe/sisyphe_v6p0/sources : maktel parallel
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.exe) 14 years 3 months ago #405

  • ccoulet
  • ccoulet's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 23
  • Thank you received: 2
Hi Jeremie

In your compiler block, on the LIBS_MPI the reference to "libmpi.a" disappear!
I remember that i met such similar message on windows with the parallel compilation of sisyphe and it's always problems with the MPI library.
Maybe you can try to add libmpi.a or the equivalent name for impi.

Good luck
Christophe
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.e 14 years 3 months ago #407

  • ails
  • ails's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 17
Hi Jeremie,

As Christophe noticed, the problem is in your LIBS_MPI settings.

1 -
First of all, we didn't try the INTEL MPI library but you can get the appropriate flags with:
> mpiifort -showme
As you can see, the syntax is a bit different than with open-mpi (see open-mpi configuration in recent posts)

For example, the flags I found on one of our cluster :
-L/home/logiciels/impi/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker $libdir -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/3.2.2 -lmpi -lmpiif -lmpigi -lrt -lpthread -ldl

2 -
You didn't choose mpiifort as FC_MPI in your MPI compiler block. Any reason? $FC_MPI is used in the parallel library.

FC_MPI="ifort " ?
LK_MPI="mpiifort -o <EXE> <OBJS> <LIBS>"

3 -
And, it's not relevant here but I suspect that the sequence in your first settings might be wrong :
LIBS_MPI=" -L/opt/intel/impi/3.2.2/lib64/libmpi.a"
You should try :
LIBS_MPI=" -L/opt/intel/impi/3.2.2/lib64/ -lmpi"
or
LIBS_MPI=" /opt/intel/impi/3.2.2/lib64/libmpi.a"

Please let us know.

Best regards,

PS : yeah, "-lpthread" is out of scope here (POSIX threads). But it's one of the mandatory flags when compiling with the maktel parallel command.
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.e 14 years 3 months ago #415

  • jeremie
  • jeremie's Avatar
  • OFFLINE
  • Junior Boarder
  • Hydro-Quebec
  • Posts: 39
  • Thank you received: 7
Hello all,

As suggested by Christophe and "ails", I took some time to look into the LIBS_MPI settings and it has paid off. I first retrieved the appropriate flags with:
> mpiifort -show
The following include and lib flags are set for our system:
-I/opt/intel/impi/3.2.2.006/include64 -I/opt/intel/impi/3.2.2.006/include64 -L/opt/intel/impi/3.2.2.006/lib64 -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker $libdir -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/3.2.2 -lmpi -lmpiif -lmpigi -lrt -lpthread -ldl

I used these in my LIBS_MPI statement.

Compilation and linking with makepar90 is now successful and all *MP.exe are generated correctly.

Thanks a lot

j
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.exe) 14 years 3 months ago #409

  • jmhervouet
  • jmhervouet's Avatar
Hello Chun,

The misaligned fields are a normal consequence of the use of the command SEQUENCE that was required by the Nag compiler. It is not a bug, just a warning.

Regarding NDS in Artemis, you can remove the line with NDS(1,5) in point_artemis.f, this has been corrected in more recent versions.

Regards,

JMH
The administrator has disabled public write access.

Re:Generating default parallel executables (*_MP.exe) 14 years 3 months ago #399

  • ccoulet
  • ccoulet's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 23
  • Thank you received: 2
Hi Jeremie

About your problem in the parallel compilation, you should have a look into the makefile. I know there is a reference to an incude MPI that you should modify in accordance to your configuration.

Let me know if it works!

Good luck

Christophe
The administrator has disabled public write access.
Moderators: borisb

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