From e837f129966af29f97176aafb6533b733123d4e9 Mon Sep 17 00:00:00 2001 From: Eric Winter Date: Mon, 24 Jul 2023 09:17:33 -0400 Subject: [PATCH] Reverted asd branch merge. --- cmake/compilers.cmake | 9 ++++----- scripts/preproc/pinCpuCores.sh | 28 ---------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) delete mode 100755 scripts/preproc/pinCpuCores.sh diff --git a/cmake/compilers.cmake b/cmake/compilers.cmake index 2a05602c..de348bd0 100644 --- a/cmake/compilers.cmake +++ b/cmake/compilers.cmake @@ -57,11 +57,10 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES Intel) elseif( (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 17.0) AND (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) ) message(WARNING "Compiler has incomplete F2008 features, Git hash/compiler information won't be saved to H5 files") add_compile_definitions(__INTEL_COMPILER_OLD) - elseif( (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 20.0) ) - #message(WARNING "Setting default optimization to O2 to avoid certain Intel compiler bugs") - message(WARNING "You only live once so let's see what happens") - #set(CMAKE_DEFOPT "-O2") - endif() + elseif( (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 20.0) ) + message(WARNING "Setting default optimization to O2 to avoid certain Intel compiler bugs") + set(CMAKE_DEFOPT "-O2") +endif() elseif(CMAKE_Fortran_COMPILER_ID MATCHES GNU) if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0) message("Fortran compiler too old! What, were you gonna use punch cards?") diff --git a/scripts/preproc/pinCpuCores.sh b/scripts/preproc/pinCpuCores.sh deleted file mode 100755 index 3ac53503..00000000 --- a/scripts/preproc/pinCpuCores.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# usage: pinCpuCores.sh - -# THIS IS ONLY MEANT TO WORK ON DERECHO -# USE ON OTHER SYSTEMS AT YOUR OWN RISK - -if [[ ! -v PMI_LOCAL_SIZE ]] || [[ ! -v PMI_LOCAL_RANK ]]; then - echo "pinCpuCores.sh is only meant to be used on systems that set the" - echo " PMI_LOCAL_SIZE and PMI_LOCAL_RANK environment variables." - echo " One or both of these was not set. Please use the" - echo " correctOMPEnvironment.sh script in conjunction with omplace instead" - exit 1 -fi - -let numCpus=`lscpu | sed --quiet "s/^CPU(s): \\+\\([0-9]\\+\\)$/\\1/p"` -let threadsPerCore=`lscpu | sed --quiet "s/^Thread(s) per core: \\+\\([0-9]\\+\\)$/\\1/p"` -let numCores=$numCpus/$threadsPerCore -let newNumThreads=$numCores/$PMI_LOCAL_SIZE -let minThread=$newNumThreads*$PMI_LOCAL_RANK -let maxThread=$minThread+$newNumThreads-1 -export OMP_NUM_THREADS=$newNumThreads - -#echo "I am rank $PMI_LOCAL_RANK of $PMI_LOCAL_SIZE on this node using cpus $minThread to $maxThread" - -# call the arguments to this script -taskset --cpu-list $minThread-$maxThread $1 "${@:2}" -