diff --git a/lib/gpu/geryon/nvd_macros.h b/lib/gpu/geryon/nvd_macros.h index 731793895f..e0e29b4c6f 100644 --- a/lib/gpu/geryon/nvd_macros.h +++ b/lib/gpu/geryon/nvd_macros.h @@ -13,7 +13,12 @@ #ifdef MPI_GERYON #include "mpi.h" -#define NVD_GERYON_EXIT MPI_Abort(MPI_COMM_WORLD,-1) +#define NVD_GERYON_EXIT do { \ + int is_final; \ + MPI_Finalized(&is_final); \ + if (!is_final) \ + MPI_Abort(MPI_COMM_WORLD,-1); \ + } while(0) #else #define NVD_GERYON_EXIT assert(0==1) #endif diff --git a/lib/gpu/geryon/ocl_macros.h b/lib/gpu/geryon/ocl_macros.h index 4d5974337d..d4e27b6e71 100644 --- a/lib/gpu/geryon/ocl_macros.h +++ b/lib/gpu/geryon/ocl_macros.h @@ -12,7 +12,12 @@ #ifdef MPI_GERYON #include "mpi.h" -#define OCL_GERYON_EXIT MPI_Abort(MPI_COMM_WORLD,-1) +#define OCL_GERYON_EXIT do { \ + int is_final; \ + MPI_Finalized(&is_final); \ + if (!is_final) \ + MPI_Abort(MPI_COMM_WORLD,-1); \ + } while(0) #else #define OCL_GERYON_EXIT assert(0==1) #endif diff --git a/lib/gpu/lal_pppm.cu b/lib/gpu/lal_pppm.cu index 0ed5c6bad5..99fe655dfd 100644 --- a/lib/gpu/lal_pppm.cu +++ b/lib/gpu/lal_pppm.cu @@ -31,9 +31,16 @@ texture q_tex; #endif #else + #define pos_tex x_ #define q_tex q_ #pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics: enable +#if defined(cl_amd_fp64) +#pragma OPENCL EXTENSION cl_amd_fp64 : enable +#else +#pragma OPENCL EXTENSION cl_khr_fp64 : enable +#endif + #endif // Number of threads per pencil for charge spread