From 9f032ba7dc0ae83049d021d566a805d5f76e808b Mon Sep 17 00:00:00 2001 From: Incardona Pietro <incardon@mpi-cbg.de> Date: Mon, 6 Dec 2021 21:57:02 +0100 Subject: [PATCH] Fixing blitx and algoim configure options --- configure | 8 ++++++++ example/Performance/miniBUDE/main.cu | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 84e4db012..71ff09bff 100755 --- a/configure +++ b/configure @@ -109,6 +109,8 @@ with_parmetis enable_se_class1 enable_se_class2 enable_se_class3 +with_blitz +with_algoim with_alpaka with_action_on_error with_boost @@ -510,6 +512,12 @@ do vcdevel) conf_options="$conf_options -DVc_ROOT=$ac_optarg" ;; + blitz) + conf_options="$conf_options -DBLITZ_ROOT=$ac_optarg" + ;; + algoim) + conf_options="$conf_options -DALGOIM_ROOT=$ac_optarg" + ;; alpaka) conf_options="$conf_options -DALPAKA_ROOT=$ac_optarg" ;; diff --git a/example/Performance/miniBUDE/main.cu b/example/Performance/miniBUDE/main.cu index 408f5c554..cebbeabc4 100644 --- a/example/Performance/miniBUDE/main.cu +++ b/example/Performance/miniBUDE/main.cu @@ -282,7 +282,7 @@ __global__ void fasten_main(const int natlig, const float l_hphb = l_params.hphb * (phphb_gtz && lhphb_ltz ? -ONE : ONE); const float distdslv = (phphb_ltz ? (lhphb_ltz ? NPNPDIST : NPPDIST) : (lhphb_ltz ? NPPDIST : -FLT_MAX) ); - const float r_distdslv = (distdslv == -FLT_MAX)?0.0f:(1.0f/distdslv); + float r_distdslv = 1.0f/distdslv; const float chrg_init = l_params.elsc * p_params.elsc; const float dslv_init = p_hphb + l_hphb; @@ -294,7 +294,7 @@ __global__ void fasten_main(const int natlig, const float x = lpos_x[i] - p_atom.x; const float y = lpos_y[i] - p_atom.y; const float z = lpos_z[i] - p_atom.z; - const float distij = sqrt(x*x + y*y + z*z); + const float distij = sqrtf(x*x + y*y + z*z); // Calculate the sum of the sphere radii const float distbb = distij - radij; @@ -336,9 +336,6 @@ __global__ void fasten_main(const int natlig, void runCUDA(OpenFPM & _openfpm) { - printf("\nRunning CUDA\n"); - - _openfpm.d_protein.hostToDevice<pos,ind>(); _openfpm.d_ligand.hostToDevice<pos,ind>(); _openfpm.d_forcefield.hostToDevice<hbtype,radius,hphb,elsc>(); @@ -604,9 +601,14 @@ void loadParameters(int argc, char *argv[], OpenFPM & _openfpm) fclose(file); } +#include <fenv.h> +#include <xmmintrin.h> +#include <pmmintrin.h> int main(int argc, char *argv[]) { + _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); + _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); init_wrappers(); OpenFPM _openfpm; -- GitLab