Skip to content

Commit

Permalink
pragm/flag to vec hh with clang, addded gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
Castiglioni Giacomo committed May 27, 2021
1 parent 44d964f commit 7e1ff57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
5 changes: 3 additions & 2 deletions test/benchmark/kernels/hh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ void nrn_state_hh_ext(void* __restrict__ mech){
int id;
int node_id, ena_id, ek_id;
double v;
#pragma ivdep
for(id = 0; id<inst->node_count; id = ++id) {
#pragma ivdep // icpc vec helper
#pragma omp simd // clang vec helper
for(id = 0; id<inst->node_count; ++id) {
node_id = inst->node_index[id];
ena_id = inst->ion_ena_index[id];
ek_id = inst->ion_ek_index[id];
Expand Down
19 changes: 13 additions & 6 deletions test/benchmark/nmodl-llvm-time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ ext_lib="libextkernel.so"
# compilers
icpc_exe=icpc
declare -a icpc_flags=(
# "-O2"
"-O2 -march=skylake-avx512 -mtune=skylake-avx512 -prec-div -fimf-use-svml"
"-O2 -qopt-zmm-usage=high -xCORE-AVX512 -prec-div -fimf-use-svml"
"-O2 -mavx512f -prec-div -fimf-use-svml"
Expand All @@ -96,20 +95,28 @@ declare -a icpc_flags=(
clang_bin_path="/gpfs/bbp.cscs.ch/data/project/proj16/software/llvm/install/0521/bin"
clang_exe=${clang_bin_path}/clang++
declare -a clang_flags=(
# "-O3"
"-O3 -march=skylake-avx512 -fveclib=SVML"
"-O3 -march=skylake-avx512 -ffast-math -fveclib=SVML"
"-O3 -mavx512f -ffast-math -fopemp -fveclib=SVML"
"-O3 -mavx512f -ffast-math -fveclib=SVML"
"-O3 -mavx2 -ffast-math -fveclib=SVML"
"-O3 -msse2 -ffast-math -fveclib=SVML"
"-O3 -mavx512f -fveclib=SVML"
"-O3 -mavx2 -ffast-math -fopemp -fveclib=SVML"
"-O3 -msse2 -ffast-math -fopemp -fveclib=SVML"
)

gcc_bin_path="/gpfs/bbp.cscs.ch/ssd/apps/hpc/jenkins/deploy/compilers/2021-01-06/linux-rhel7-x86_64/gcc-4.8.5/gcc-9.3.0-45gzrp/bin"
gcc_exe=${gcc_bin_path}/g++
declare -a gcc_flags=(
"-O3 -mavx512f -ffast-math -ftree-vectorize -mveclibabi=svml"
"-O3 -mavx2 -ffast-math -ftree-vectorize -mveclibabi=svml"
"-O3 -msse2 -ffast-math -ftree-vectorize -mveclibabi=svml"
)

# loop over options
for kernel_target in compute-bound memory-bound hh; do
echo "kernel: "${kernel_target}

# loop over other compilers
for compiler in icpc clang; do
for compiler in icpc clang gcc; do
echo "| compiler: "${compiler}

compiler_exe=${compiler}_exe
Expand Down

0 comments on commit 7e1ff57

Please sign in to comment.