Skip to content

Commit

Permalink
Hypre: add version check (#2865)
Browse files Browse the repository at this point in the history
These HYPRE_SetSp* are only available in hypre >= 22500.
  • Loading branch information
WeiqunZhang authored Jul 1, 2022
1 parent 8fb23ec commit be813d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Src/Base/AMReX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,13 @@ amrex::Initialize (int& argc, char**& argv, bool build_parm_parse,
HYPRE_SetGPUMemoryPoolSize( mempool_bin_growth, mempool_min_bin,
mempool_max_bin, mempool_max_cached_bytes );
#endif
/* This API below used to be HYPRE_SetSpGemmUseCusparse(). This was changed in commit
Hypre master commit dfdd1cd12f */
#if (HYPRE_RELEASE_NUMBER >= 22500)
HYPRE_SetSpGemmUseVendor(hypre_spgemm_use_vendor);
HYPRE_SetSpMVUseVendor(hypre_spmv_use_vendor);
HYPRE_SetSpTransUseVendor(hypre_sptrans_use_vendor);
#elif (HYPRE_USING_CUDA)
HYPRE_SetSpGemmUseCusparse(hypre_spgemm_use_vendor);
#endif
HYPRE_SetMemoryLocation(HYPRE_MEMORY_DEVICE);
HYPRE_SetExecutionPolicy(HYPRE_EXEC_DEVICE);
HYPRE_SetUseGpuRand(true);
Expand Down

0 comments on commit be813d0

Please sign in to comment.