hypre

Ceci est une ancienne révision du document !


Site

Version 1.6.0

  • installée sur nemo
  • /usr/local/hypre-1.6.0 compilée avec Mpich 1.2.6
  • /local/henry/hypre-1.6.0-amd64/src/hypre compilé avec Sun MPI
  • les exemples et la doc sont accessibles: /local/henry/hypre-1.6.0/src et /local/henry/hypre-1.6.0/docs

Version 2.0.0

> module load ss12

Le path idéal devrait au moins contenir:

PATH=/opt/studio12/SUNWspro/bin:/usr/bin::/usr/local/wrapper/bin:/opt/SUNWhpc/bin
  • testé l'exemple ex1 dans le repertoire exemples:
nemo-henry% mprun -np 2 ex1
<C*b,b>: 1.800000e+01


Iters       ||r||_C     conv.rate  ||r||_C/||b||_C
-----    ------------    ---------  ------------
    1    2.509980e+00    0.591608    5.916080e-01
    2    9.888265e-01    0.393958    2.330686e-01
    3    4.572262e-01    0.462393    1.077693e-01
    4    1.706474e-01    0.373223    4.022197e-02
    5    7.473022e-02    0.437922    1.761408e-02
    6    3.402624e-02    0.455321    8.020061e-03
    7    1.214929e-02    0.357057    2.863616e-03
    8    3.533113e-03    0.290808    8.327628e-04
    9    1.343893e-03    0.380371    3.167586e-04
   10    2.968745e-04    0.220906    6.997400e-05
   11    5.329671e-05    0.179526    1.256215e-05
   12    7.308483e-06    0.137128    1.722626e-06
   13    7.411552e-07    0.101410    1.746920e-07
  • modifié le Makefile du répertoire exemples pour que ça marche:
nemo-henry% diff Makefile-dist Makefile 
4,6c4,6
< CC        = mpicc
< F77       = mpif77
< CXX       = mpiCC
---
> CC        = mpcc
> F77       = mpf77
> CXX       = mpCC
12c12
< COPTS     = -g -pedantic -Wall
---
> COPTS     = -g #-pedantic -Wall
27,28c27,28
< LIBS      = -L$(HYPRE_DIR)/lib -lHYPRE -lg2c -lm
< LFLAGS    = $(LINKOPTS) $(LIBS) -lstdc++
---
> LIBS      = -L$(HYPRE_DIR)/lib -lHYPRE -lm -lmpi_mt -lfsu -lsunmath -lm -lmtsk
> LFLAGS    = $(LINKOPTS) $(LIBS) 
36c36,38
<  -lsidl -ldl -lxml2
---
>  -lsidl -ldl -lxml2 \
>  -L/opt/SUNWhpc/lib \
>  -lmpi
37a40
> 

et en 64 bits:

> diff Makefile ~/src/hypre-2.0.0/src/examples/Makefile.ori 
4,7c4,7
< CC        = mpcc
< F77       = mpf77
< CXX       = mpCC
< HYPRE_DIR = /local/apps/lib/amd64
---
> CC        = mpicc
> F77       = mpif77
> CXX       = mpiCC
> HYPRE_DIR = ../hypre
12c12
< COPTS     = -g -m64 #-pedantic -Wall
---
> COPTS     = -g -pedantic -Wall
27,28c27,28
< LIBS      = -R/opt/SUNWhpc/lib/amd64 -L/opt/SUNWhpc/lib/amd64 -L$(HYPRE_DIR)/lib -lHYPRE -lm -lmpi_mt -lfsu -lsunmath -lm -lmtsk
< LFLAGS    = $(LINKOPTS) $(LIBS) 
---
> LIBS      = -L$(HYPRE_DIR)/lib -lHYPRE -lg2c -lm
> LFLAGS    = $(LINKOPTS) $(LIBS) -lstdc++
36,38c36
<  -lsidl -ldl -lxml2 \
<  -L/opt/SUNWhpc/lib/amd64 \
<  -lmpi
---
>  -lsidl -ldl -lxml2

dans le répertoire lapack:

> diff lapack/Makefile.ori lapack/Makefile 104c104,105
<  xerbla.c
---
>  xerbla.c\
>  dlamch.c
112c113
< all: ${OBJS} dlamch.o
---
> all: ${OBJS}
127,129d127
< dlamch.o : dlamch.c ${LAPACK_HEADERS}
<       ${CC} -c dlamch.c
<

Pour compiler avec l'interface babel, il suffit d'ajouter “–with-babel” sur la ligne configure, dans do_work.sk. Mais la compilation échoue à cause du problème suivant:

"/local/apps/src/hypre-2.0.0/src/babel-runtime/sidl/sidl_io_Serializer.h", line 1411: Error: 'sidl_io_Serializer__connectI' referenced in #pragma should be global and previously declared.

This error is due to these lines:

#pragma weak sidl_io_Serializer__connectI
struct sidl_io_Serializer__object*
sidl_io_Serializer__rmicast(...);

les hacks ont été par Yann!

Comme cela manque d'exemples, il faut fouiller dans les sources de hypre. On peut s'inspirer de:

  • src/test/f77_ij_b.f

if we invert the two preceding lines:

struct sidl_io_Serializer__object*
sidl_io_Serializer__rmicast(...);
#pragma weak sidl_io_Serializer__connectI

C'est ce qui est expliqué Error with #pragma weak , mais faire cette modification manuellement est trop long (plus de 20 fichiers!) Pour l'instant, pas d'in terface babel…

  • hypre.1207742481.txt.gz
  • Dernière modification : 2017/08/25 09:55
  • (modification externe)