• le configure cree le fichier Makefile.config depuis le template Makefile.config.in dans le répertoire config
  • après exécution de configure, on modifie le fichier Makefile.config pour qu'il prenne en compte la sunperf
  • et on modifie le script babel-runtime/libtool pour supprimer -z text à l'édition de liens
  • script pour recompiler hypre

détection architecture

  • fait par le script src/tarch, mais ne donne pas le meme resultat sur sparc et amd64. On fait la modif suivante:
> diff -u src/tarch.ori src/tarch
--- src/tarch.ori       2006-09-23 00:05:44.000000000 +0200
+++ src/tarch   2009-07-16 09:07:01.407215193 +0200
@@ -45,6 +45,13 @@
        IRIX64|IRIX) FARCH=$LARCH ; break ;;
        Linux|LINUX) FARCH=LINUX ; break ;;
        i586|i486|i86pc)
+               if [ $GARCH -eq solaris ] ; then
+                       FARCH=solaris
+               else
+                       GARCH=$LARCH
+               fi
+               break ;;
+       SunOS)
            GARCH=$LARCH ;;
        sun4*)
           Version=`$UNAME -r`

ld: fatal: relocations remain against allocatable but non-writable sections

on peut reproduire cette erreur avec les 2 lignes suivantes:

> pwd
/local/apps/src/hypre-2.0.0/src/babel-runtime/sidl

mpcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/libxml2 -I/usr/java/include -I/usr/java/include/solaris -I./../sidlx -dalign -xlic_lib=sunperf -I/opt/SUNWhpc/HPC6.0/include -xmodel=medium -m64 -D_REENTRANT -c sidl_BaseClass_Impl.c  -KPIC -DPIC -o .libs/sidl_BaseClass_Impl.o

/usr/ccs/bin/ld -G -z text -h libsidl-1.0.0.so -o .libs/libsidl-1.0.0.so    .libs/sidl_BaseClass_Impl.o \
 -R/opt/SUNWhpc/HPC6.0/lib/amd64 -R/usr/lib -L/opt/SUNWhpc/HPC6.0/lib/amd64 -ldl -L/usr/lib -lxml2 -lz -lm -lsocket -lnsl -lpthread -lc

Text relocation remains                         referenced
    against symbol                  offset      in file
sidl_BaseInterface_deleteRef        0x215       .libs/sidl_BaseClass_Impl.o
sidl_BaseInterface_deleteRef        0x651       .libs/sidl_BaseClass_Impl.o
sidl_BaseClass_deleteRef            0x558       .libs/sidl_BaseClass_Impl.o
sidl_BaseInterface_addRef           0x6e8       .libs/sidl_BaseClass_Impl.o
ld: fatal: relocations remain against allocatable but non-writable sections

et la faire disparaître si on supprime -z text, mais est ce normal? voir 3.4.182 –ztext

patch <code> > diff -u ../../../src/babel-runtime/m4/libtool.m4.ori ../../../src/babel-runtime/m4/libtool.m4 — ../../../src/babel-runtime/m4/libtool.m4.ori 2005-11-14 22:20:09.000000000 +0100 +++ ../../../src/babel-runtime/m4/libtool.m4 2009-07-16 13:43:50.839538559 +0200 @@ -5845,7 +5845,7 @@ ;; solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z textoff' if test “$GCC” = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo “{ global:” > $lib.exp~cat $export_symbols | $SED -e “s/\(.*\)/\1;/” » $lib.exp~$echo “local: *; };” » $lib.exp~ </code>

c'est un bug spécifique à la plateforme x86_64, il faut ajouter un flag d'optimisation (ou -fast par exemple)

checking for Fortran name-mangling scheme... unknown

cette erreur concerne l'interface C-Fortran. Le configure semble trouver que c'est correct 2 fois, et échoue 1 fois. \ Il faut ajouter l'option: -ext_names=plain pour que le programme de test compile. Mais est ce que c'est à faire tout le temps? voir 11.1.4 Underscores in Routine Names

Tests avec programme hmm

nemo-henry% module unload hpc82 ss12u1 ; module load hpc ss12
nemo-henry% which mpcc
/opt/SUNWhpc/bin/mpcc
nemo-henry% make clean
Nettoyage
rm -f *.o *.mod *.fig *.vtk;
nemo-henry% make -f Makefile.hmm hmm
complete: Command not found
complete: Command not found
mpcc -g -O5 -m64  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -c mpi_sol_hypre.c
mpf90 -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -c mod_dessin.f90
mpf90 -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -c mod_maillage.f90
mpf90 -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -c mod_castests.f90
mpf90 -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -c mod_reslin.f90
mpf90 -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -c mod_interface_hypre.f90
mpf90 -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -I/local/apps/lib/amd64/opt0/include -DHAVE_CONFIG_H -DHYPRE_TIMING -g -m64 -O5  -C -Xlist -xcheck=init_local -e -fpp -DHypre  -c hmm.f90
complete: Command not found
complete: Command not found
complete: Command not found
echo /opt/SUNWhpc/bin
/opt/SUNWhpc/bin
mpf90 -o hmm mpi_sol_hypre.o mod_dessin.o mod_maillage.o mod_castests.o mod_reslin.o mod_interface_hypre.o hmm.o -L/local/apps/lib/amd64/opt0/lib -R/local/apps/lib/amd64/opt0/lib -L/local/apps/lib/amd64/opt0/../babel-runtime/sidl/.libs -lbHYPREClient-C -lbHYPREClient-CX -lbHYPREClient-F -lbHYPRE -lsidl -ldl -lxml2 -m64 -g -O5 -m64  -xlic_lib=sunperf -L/opt/SUNWhpc/bin/../lib/amd64 -L/local/apps/lib/amd64/opt0/lib -lHYPRE -lm -L/opt/SUNWhpc/bin/../lib/amd64 -lmpi -lfsu -lsunmath -lm -lmtsk
nemo-henry% mprun -np 4 hmm
  Paradigme HFV   (solveur: HYPRE, figures: aucun)
nutest=   1      typepoly=  -9
ndiv= 200      nb sommets=    40401      nb rectangles=    40000
          nb aretes=    80400      nb aretes internes=    79600
\nRenumerotation des aretes:  8 passages,   5.16E-02 secondes
\nzeta=  4.999999999999778E-01     aire totale= 1.000000000001004     pas=  7.07E-03

***Resolution HYPRE (PCG+AMG)*** Iterations = 8, Residu = 5.693808e-08

 pmin  4.185951532810916E-6 \t\t pmax  0.062498116067422324
 Erreurs relatives:\n\tL2 p= 4.257483975064142E-5 \t Linf p= 3.607706907963071E-5
 \tL2 gradp= 1.4012123382881934E-5
 \ntemps execution 7.2776513
nemo-henry% module unload hpc ss12; module load hpc82 ss12u1
nemo-henry% make clean
nemo-henry% make -f Makefile.hmm hmm
nemo-henry% mpirun -np 4 hmm
[nemo:28041] *** Process received signal ***
[nemo:28041] Signal: Segmentation Fault (11)
[nemo:28041] Signal code: Address not mapped (1)
[nemo:28041] Failing at address: 6e65706f6c64
[nemo:28044] *** Process received signal ***
[nemo:28044] Signal: Segmentation Fault (11)
[nemo:28044] Signal code: Address not mapped (1)
[nemo:28044] Failing at address: 6e65706f6c64
[nemo:28047] *** Process received signal ***
[nemo:28047] Signal: Segmentation Fault (11)
[nemo:28047] Signal code: Address not mapped (1)
[nemo:28047] Failing at address: 6e65706f6c64
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x4b9a2
/lib/amd64/libc.so.1:0xd71b6
/lib/amd64/libc.so.1:0xcbab2
0x6e65706f6c64 [ Signal 11 (SEGV)]
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x2bcd4
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:lt_dlopenadvise+0x9e
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33a8b
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33292
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_component_find+0x2c7
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_components_open+0x193
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_paffinity_base_open+0xc1
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_init+0x57
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-rte.so.0.0.0:orte_init+0x2a
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:ompi_mpi_init+0x110
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:PMPI_Init+0xcd
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi_f77.so.0.0.0:pmpi_init_+0x28
/local/henry/droniou_hypre/hmm:MAIN_+0xab
/local/henry/droniou_hypre/hmm:main+0x3d
/local/henry/droniou_hypre/hmm:0x2c5dc
[nemo:28041] *** End of error message ***
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x4b9a2
/lib/amd64/libc.so.1:0xd71b6
/lib/amd64/libc.so.1:0xcbab2
0x6e65706f6c64 [ Signal 11 (SEGV)]
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x2bcd4
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:lt_dlopenadvise+0x9e
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33a8b
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33292
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_component_find+0x2c7
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_components_open+0x193
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_paffinity_base_open+0xc1
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_init+0x57
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-rte.so.0.0.0:orte_init+0x2a
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:ompi_mpi_init+0x110
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:PMPI_Init+0xcd
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi_f77.so.0.0.0:pmpi_init_+0x28
/local/henry/droniou_hypre/hmm:MAIN_+0xab
/local/henry/droniou_hypre/hmm:main+0x3d
/local/henry/droniou_hypre/hmm:0x2c5dc
[nemo:28044] *** End of error message ***
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x4b9a2
/lib/amd64/libc.so.1:0xd71b6
/lib/amd64/libc.so.1:0xcbab2
0x6e65706f6c64 [ Signal 11 (SEGV)]
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x2bcd4
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:lt_dlopenadvise+0x9e
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33a8b
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33292
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_component_find+0x2c7
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_components_open+0x193
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_paffinity_base_open+0xc1
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_init+0x57
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-rte.so.0.0.0:orte_init+0x2a
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:ompi_mpi_init+0x110
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:PMPI_Init+0xcd
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi_f77.so.0.0.0:pmpi_init_+0x28
/local/henry/droniou_hypre/hmm:MAIN_+0xab
/local/henry/droniou_hypre/hmm:main+0x3d
/local/henry/droniou_hypre/hmm:0x2c5dc
[nemo:28047] *** End of error message ***
[nemo:28050] *** Process received signal ***
[nemo:28050] Signal: Segmentation Fault (11)
[nemo:28050] Signal code: Address not mapped (1)
[nemo:28050] Failing at address: 6e65706f6c64
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x4b9a2
/lib/amd64/libc.so.1:0xd71b6
/lib/amd64/libc.so.1:0xcbab2
0x6e65706f6c64 [ Signal 11 (SEGV)]
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x2bcd4
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:lt_dlopenadvise+0x9e
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33a8b
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:0x33292
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_component_find+0x2c7
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:mca_base_components_open+0x193
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_paffinity_base_open+0xc1
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-pal.so.0.0.0:opal_init+0x57
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libopen-rte.so.0.0.0:orte_init+0x2a
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:ompi_mpi_init+0x110
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi.so.0.0.0:PMPI_Init+0xcd
/opt/SUNWhpc/HPC8.2/sun/lib/amd64/libmpi_f77.so.0.0.0:pmpi_init_+0x28
/local/henry/droniou_hypre/hmm:MAIN_+0xab
/local/henry/droniou_hypre/hmm:main+0x3d
/local/henry/droniou_hypre/hmm:0x2c5dc
[nemo:28050] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 28041 on node nemo exited on signal 11 (Segmentation Fault).
--------------------------------------------------------------------------
3 total processes killed (some possibly by mpirun during cleanup)