Can you confirm with me on the settings in .petscrc for Summit with -pc_type hypre? We were using
-mat_type aijcusparse
which worked a few months ago and now is not working.
I don't know the difference between cusparse, aijcusparse and hypre as -mat_type
cusparse is not a matrix type. The other two are and they both should work.
I tested the builds that I just sent in another email (eg, PETSC_DIR=/gpfs/alpine/world-shared/geo127/petsc/arch-summit-dbg-gcc-cuda PETSC_ARCH="")
$ make PETSC_DIR=$PWD PETSC_ARCH=arch-summit-opt-gnu-hypre-cuda -f gmakefile test search='ksp_ksp_tutorials-ex55_hypre_device'
Using MAKEFLAGS: -- search=ksp_ksp_tutorials-ex55_hypre_device PETSC_ARCH=arch-summit-opt-gnu-hypre-cuda PETSC_DIR=/gpfs/alpine/csc314/scratch/adams/petsc2
CC arch-summit-opt-gnu-hypre-cuda/tests/ksp/ksp/tutorials/ex55.o
CLINKER arch-summit-opt-gnu-hypre-cuda/tests/ksp/ksp/tutorials/ex55
TEST arch-summit-opt-gnu-hypre-cuda/tests/counts/ksp_ksp_tutorials-ex55_hypre_device.counts
ok ksp_ksp_tutorials-ex55_hypre_device
ok diff-ksp_ksp_tutorials-ex55_hypre_device
So this work. In this file (attached) you will see an example of a construction a matrix that we have gone over before:
/* create stiffness matrix */
ierr = MatCreate(comm,&Amat);CHKERRQ(ierr);
ierr = MatSetSizes(Amat,m,m,M,M);CHKERRQ(ierr);
ierr = MatSetType(Amat,MATAIJ);CHKERRQ(ierr);
ierr = MatSetOption(Amat,MAT_SPD,PETSC_TRUE);CHKERRQ(ierr);
ierr = MatSetFromOptions(Amat);CHKERRQ(ierr);
ierr = MatSetBlockSize(Amat,2);CHKERRQ(ierr);
ierr = MatSeqAIJSetPreallocation(Amat,18,NULL);CHKERRQ(ierr);
ierr = MatMPIAIJSetPreallocation(Amat,18,NULL,18,NULL);CHKERRQ(ierr);
#if defined(PETSC_HAVE_HYPRE)
ierr = MatHYPRESetPreallocation(Amat,18,NULL,18,NULL);CHKERRQ(ierr);
#endif
At the end of the file you will what is executed with this test for "hypre_device":
# command line options match GPU defaults
test:
suffix: hypre_device
nsize: 4
requires: hypre !complex
args: -mat_type hypre -ksp_view -ne 29 -alpha 1.e-3 -ksp_type cg -pc_type hypre -pc_hypre_type boomeramg -ksp_monitor_short -pc_hypre_boomeramg_relax_type_all l1scaled-Jacobi -pc_hypre_boomeramg_interp_type ext+i -pc_hypre_boomeramg_coarsen_type PMIS -pc_hypre_boomeramg_no_CF
All you need is -mat_type hypre and -pc_type hypre. You could also add these hypre arguments.
If this is not working please send me a description of the problem, like any error output on your screen and your petsc.history file.