I am trying to use Hypre GPU version but I am running into the following issue when calling HYPRE_StructVectorSetConstantValues from Parflow. Everything works fine when compiling without the GPU support.
HYPRE_StructVectorCreate(MPI_COMM_WORLD, instance_xtra->hypre_grid,
&instance_xtra->hypre_x));
HYPRE_StructVectorSetNumGhost(instance_xtra->hypre_x, full_ghosts);
HYPRE_StructVectorInitialize(instance_xtra->hypre_x);
HYPRE_StructVectorSetConstantValues(instance_xtra->hypre_x, 0.0e0);
Program received signal SIGSEGV, Segmentation fault.
BoxLoopforall<__nv_hdl_wrapper_t<false, false, __nv_dl_tag<int (*)(hypre_StructVector_struct*, double), &hypre_StructVectorSetConstantValues, 1u>, void (int), hypre_Boxloop_struct, double*, double> >(int, int, __nv_hdl_wrapper_t<false, false, __nv_dl_tag<int (*)(hypre_StructVector_struct*, double), &hypre_StructVectorSetConstantValues, 1u>, void (int), hypre_Boxloop_struct, double*, double>) (
policy=0, length=length@entry=600000, loop_body=...)
at _hypre_struct_mv.h:802
802 HYPRE_CUDA_LAUNCH( forall_kernel, gDim, bDim, loop_body, length );
#0 BoxLoopforall<__nv_hdl_wrapper_t<false, false, __nv_dl_tag<int (*)(hypre_StructVector_struct*, double), &hypre_StructVectorSetConstantValues, 1u>, void (int), hypre_Boxloop_struct, double*, double> >(int, int, __nv_hdl_wrapper_t<false, false, __nv_dl_tag<int (*)(hypre_StructVector_struct*, double), &hypre_StructVectorSetConstantValues, 1u>, void (int), hypre_Boxloop_struct, double*, double>)
(policy=0, length=length@entry=600000, loop_body=...)
at _hypre_struct_mv.h:802
#1 0x00002aaaab0cb22c in hypre_StructVectorSetConstantValues ()
at nvcc_internal_extended_lambda_implementation:420
#2 0x000000000049be99 in SMGInitInstanceXtra (problem=0x0, grid=0x0,
problem_data=0x46a5b10, pf_matrix=0x2aaaf2299200, temp_data=0x0)
at /p/project/cesmtst/hokkanen1/pfdir/parflow/pfsimulator/parflow_lib/pf_smg.c:365