hypre-space / hypre

Parallel solvers for sparse linear systems featuring multigrid methods.
https://www.llnl.gov/casc/hypre/
Other
697 stars 192 forks source link

Compiling Hypre with mpich-4.0.2 and access to hypre2.10 release #747

Open roshan4325 opened 2 years ago

roshan4325 commented 2 years ago

Hi, I am Roshan, a graduate student at UConn. I am running Flash 4.6 software and would need a hypre version between 2.13 and 2.7.0b.

When running the latest version, 2.25.0, it showed an error on compilation, src/hypre/lib -lHYPRE /usr/bin/ld: cannot find -lHYPRE

but there is libHYPRE.a file present in the lib64 folder instead of the lib folder. We then added a new lib folder in the same directory and copied the libHYPRE.a file.

However, the code was asking for libHYPRE.so file, which was absent in the directory. I am using mpich-4.0.2 in the HPC to run Flash4.6.

The error statement showed indications that the hypre version needed openmpi modules. But the flash requires mpich versions for better execution.

Error-

/home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_amg.c.o): In function hypre_BoomerAMGDestroy': par_amg.c:(.text+0x5408): undefined reference toompi_mpi_comm_null' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_amg.c.o): In function hypre_BoomerAMGCreate': par_amg.c:(.text+0x5ff8): undefined reference toompi_mpi_comm_null' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_amg_setup.c.o): In function hypre_BoomerAMGSetup': par_amg_setup.c:(.text+0xbd8): undefined reference toompi_mpi_comm_null' par_amg_setup.c:(.text+0xbfd): undefined reference to ompi_mpi_comm_null' par_amg_setup.c:(.text+0x1835): undefined reference toompi_mpi_int' par_amg_setup.c:(.text+0x24e5): undefined reference to ompi_mpi_int' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_coarsen.c.o): In functionhypre_BoomerAMGCoarsenPMISHost': par_coarsen.c:(.text+0x51e): undefined reference to ompi_mpi_op_sum' par_coarsen.c:(.text+0x523): undefined reference toompi_mpi_int' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_coarsen.c.o): In function hypre_BoomerAMGCoarsen': par_coarsen.c:(.text+0x445c): undefined reference toompi_mpi_op_sum' par_coarsen.c:(.text+0x4461): undefined reference to ompi_mpi_int' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_cgc_coarsen.c.o): In functionhypre_AmgCGCGraphAssemble': par_cgc_coarsen.c:(.text+0xc13): undefined reference to ompi_mpi_int' par_cgc_coarsen.c:(.text+0xc3b): undefined reference toompi_mpi_int' par_cgc_coarsen.c:(.text+0xcf3): undefined reference to ompi_mpi_int' par_cgc_coarsen.c:(.text+0xd2f): undefined reference toompi_mpi_int' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_cgc_coarsen.c.o):par_cgc_coarsen.c:(.text+0x1480): more undefined references to ompi_mpi_int' follow /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_cgc_coarsen.c.o): In functionhypre_AmgCGCPrepare': par_cgc_coarsen.c:(.text+0x1489): undefined reference to ompi_mpi_op_sum' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_cgc_coarsen.c.o): In functionhypre_BoomerAMGCoarsenCGC': par_cgc_coarsen.c:(.text+0x16fd): undefined reference to ompi_mpi_int' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_coarse_parms.c.o): In functionhypre_BoomerAMGCoarseParmsHost': par_coarse_parms.c:(.text+0xf4): undefined reference to ompi_mpi_op_sum' par_coarse_parms.c:(.text+0xf9): undefined reference toompi_mpi_int' /home/ros21018/hypre-master/src/hypre/lib/libHYPRE.a(par_coarse_parms.c.o): In function hypre_BoomerAMGCoarseParms': par_coarse_parms.c:(.text+0x224): undefined reference toompi_mpi_op_sum' par_coarse_parms.c:(.text+0x229): undefined reference to `ompi_mpi_int'

liruipeng commented 2 years ago

Hi @roshan4325 these seem to be mpi linking issues. How did you link with hypre library? Did you use mpi compilers, like mpicc? Thanks

roshan4325 commented 2 years ago

We had the hypre version custom installed in my home folder and then linked it using the mpich-4.0.2 module; for flash, they prefer mpich versions over openmpi.

When we tried an openmpi module (openmpi/4.1.2-ics-2019u3), we had further issues- -L/home/ros21018/hypre-master/src/hypre/lib -lHYPRE /usr/bin/ld: warning: libmpi.so.12, needed by /apps2/hdf5/1.8.17-ics-impi/lib/libhdf5.so, may conflict with libmpi.so.40 /usr/bin/ld: warning: libquadmath.so.0, needed by /apps2/mpi/openmpi/4.1.2-ics-2019u3/lib/libmpi_usempi.so, not found (try using -rpath or -rpath-link) /apps2/mpi/openmpi/4.1.2-ics-2019u3/lib/libmpi.so: undefined reference to `memcpy@GLIBC_2.14' collect2: ld returned 1 exit status

divdomo2 commented 1 year ago

Did you ever find the issue I have a similar problem based on not being able to find the HYPRE_CONFIG.h file when running the make command on the flash object