hypre-space / hypre

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

HYPRE Struct error: segmentation fault with ONLY some HYPRE versions #286

Open samratrao opened 3 years ago

samratrao commented 3 years ago

Hi,

I'm testing a Fortran 90 code with the STRUCT interface. I'm using openSUSE 15.2 on my i7 laptop. There are several versions of HYPRE provided by openSUSE community. I've taken care to ensure that the community repositories are correctly installed with proper priorities.

I have attached a zip folder HYPRE_test.zip containing the minimal code required to reproduce the error.

I don't know the options used to compile the packages provided by openSUSE.

If i use hypre-devel provided by openSUSE, the code runs but depending on the number of processes used HYPRE blurts more information (each process seems to be blurting information) such as:

=============================================
Iters     resid.norm     conv.rate  rel.res.norm
-----    ------------    ---------- ------------
Iters     resid.norm     conv.rate  rel.res.norm
-----    ------------    ---------- ------------
    1    1.312772e+00    0.034471   3.447119e-02
    1    1.325308e+00    0.034800   3.480038e-02
    1    1.314150e+00    0.034507   3.450737e-02
    1    1.325020e+00    0.034793   3.479282e-02
    2    5.487574e-02    0.041801   1.440945e-03
    2    4.787747e-02    0.036126   1.257182e-03
    2    4.786708e-02    0.036126   1.256909e-03
    2    5.518048e-02    0.041989   1.448947e-03
    3    4.231558e-03    0.077112   1.111136e-04
    3    1.734307e-03    0.036232   4.554001e-05
    3    1.735297e-03    0.036245   4.556600e-05
    3    4.289560e-03    0.077737   1.126367e-04
    4    2.336151e-04    0.055208   6.134342e-06
    4    7.373786e-05    0.042517   1.936233e-06
    4    7.378682e-05    0.042521   1.937518e-06
    4    2.384680e-04    0.055593   6.261772e-06
    5    1.635285e-05    0.069999   4.293986e-07
    5    2.892186e-06    0.039223   7.594395e-08
    5    1.668675e-05    0.069975   4.381661e-07
    5    2.893297e-06    0.039212   7.597314e-08

Final L2 norm of residual: 1.635285e-05

Final L2 norm of residual: 2.892186e-06

Final L2 norm of residual: 2.893297e-06

Final L2 norm of residual: 1.668675e-05

==========================================

If i use openSUSE provided HYPRE such as hypre_2_20_0-gnu-openmpi3-hpc-devel then the same code gives a segmentation fault just after the call to HYPRE_StructGridAssemble.

So i compiled openMPI-4 and the latest version of HYPRE, and i still got the same segmentation fault as above.

The minimal codes required to reproduce the error are in HYPRE_test.zip. It contains the following files:

  1. Minimal Fortran 90 code to reproduce the error.
  2. Makefile used to compile the code (i adopted this Makefile from elsewhere)
  3. Bash script to run the code.

I would greatly appreciate any inputs from you. Thanks.

HYPRE_test.zip

samratrao commented 3 years ago

Update: The minimal F90 code runs with MVAPICH2 from the repository of openSUSE 15.2. It doesn't work with openMPI 3 & 4 versions (from repository or compiled by me). The entire F90 code (from which i took the minimal code) also works with MVAPICH2.

I have a C version of the same code. This runs with the same openMPI and MVAPICH2 versions.