# Determine number of physical cores (not hyperthread) and set OMP to cores value
if [ -e /usr/bin/lscpu ]
then
numanodes=$(/usr/bin/lscpu | grep "NUMA node(s):" |cut -d":" -f2)
coresocket=$(/usr/bin/lscpu | grep "Core(s) per socket:" |cut -d":" -f2)
cores=$((numanodes*coresocket))
else
procs=$(grep "physical id" /proc/cpuinfo | sort -u | wc -l)
pcores=$(grep "cpu cores" /proc/cpuinfo |sort -u |cut -d":" -f2)
cores=$((procs*pcores))
fi
export OMP_NUM_THREADS=$cores
export GOMP_CPU_AFFINITY=0-$((cores-1))
echo $GOMP_CPU_AFFINITY
#!/bin/bash
cores=$(grep "processor" /proc/cpuinfo | wc -l)
wget https://dl.dropboxusercontent.com/u/124184/NAMD_2.9_Linux-x86_64-multicore.tar.gz
wget https://dl.dropboxusercontent.com/u/124184/apoa1.tar.gz
tar xvfz NAMD_2.9_Linux-x86_64-multicore.tar.gz
tar xvfz apoa1.tar.gz
echo "Using" $cores "threads"
echo "Running benchmark... (will take a while)"
cd NAMD_2.9_Linux-x86_64-multicore
timeperstep=$(./namd2 +p$cores +setcpuaffinity ../apoa1/apoa1.namd | grep "Benchmark time" | tail -1 | cut -d" " -f6)
echo "Time per step" $timeperstep
Ha! Good point. Just was going to report back that one too./usr/tmp/ does not exists on Ubuntu systems by default.
Honestly....no need to even modify the source, just a add a mkdir -p /usr/tmp/ to the Debian install function.Ha! Good point. Just was going to report back that one too.
Chuckleb - if we stick in the main script, it gets run as su so that should help. Compiling may also be good though.
Honestly....no need to event modify the source, just a add a mkdir -p /usr/tmp/ to the Debian install function.
Ok will add to Dev010. I ran Dev009 on CentOS and (not) surprisingly it ran all the way through without crashing. Good sign.Honestly....no need to even modify the source, just a add a mkdir -p /usr/tmp/ to the Debian install function.
#!/bin/bash
# NAMD Benchmark http://www.ks.uiuc.edu/Research/namd/performance.html
cores=$(grep "processor" /proc/cpuinfo | wc -l)
wget http://forums.servethehome.com/pjk/NAMD_2.9_Linux-x86_64-multicore.tar.gz
wget http://forums.servethehome.com/pjk/124184/apoa1.tar.gz
tar xvfz NAMD_2.9_Linux-x86_64-multicore.tar.gz
tar xvfz apoa1.tar.gz
echo "Using" $cores "threads"
echo "Running benchmark... (will take a while)"
cd NAMD_2.9_Linux-x86_64-multicore
timeperstep=$(./namd2 +p$cores +setcpuaffinity ../apoa1/apoa1.namd | grep "Benchmark time" | tail -1 | cut -d" " -f6)
echo "Time per step" $timeperstep