diff --git a/simtbx/diffBragg/__init__.py b/simtbx/diffBragg/__init__.py index eabeeacac72..fc80bd9341b 100644 --- a/simtbx/diffBragg/__init__.py +++ b/simtbx/diffBragg/__init__.py @@ -7,6 +7,10 @@ import numpy as np from simtbx_diffBragg_ext import * +import os +if os.environ.get("DIFFBRAGG_USE_CUDA") is not None and os.environ.get("DIFFBRAGG_USE_KOKKOS") is not None: + raise RuntimeError("Only set one of DIFFBRAGG_USE_CUDA, DIFFBRAGG_USE_KOKKOS.") + @bp.inject_into(ext.diffBragg) class _(): def get_derivative_pixels(self, refine_id): diff --git a/simtbx/diffBragg/src/diffBragg.cpp b/simtbx/diffBragg/src/diffBragg.cpp index c7b1e08bc30..b4146510346 100644 --- a/simtbx/diffBragg/src/diffBragg.cpp +++ b/simtbx/diffBragg/src/diffBragg.cpp @@ -2114,6 +2114,8 @@ void diffBragg::add_diffBragg_spots(const af::shared& panels_fasts_slows printf("DIFFBRAGG isotropic Ncells=%d\n", isotropic_ncells); if(use_cuda || getenv("DIFFBRAGG_USE_CUDA")!= NULL) printf("TIME TO RUN DIFFBRAGG -GPU- (%llu iterations): %3.10f ms \n",n_total_iter, time); + else if(getenv("DIFFBRAGG_USE_KOKKOS")!= NULL) + printf("TIME TO RUN DIFFBRAGG -KOKKOS- (%llu iterations): %3.10f ms \n",n_total_iter, time); else printf("TIME TO RUN DIFFBRAGG -CPU- (%llu iterations): %3.10f ms \n",n_total_iter, time); }