mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 14:15:30 -04:00
macos m1 updates
This commit is contained in:
parent
a93be7d5bd
commit
3f3a97d853
1 changed files with 7 additions and 1 deletions
|
|
@ -1,11 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
UNAME_S=$(uname -s)
|
||||
arch=`uname -m`
|
||||
if [[ ${UNAME_S} == Linux ]]; then
|
||||
CPU_FLAGS=$(cat /proc/cpuinfo | grep flags |tail -n 1)
|
||||
CPU_FLAGS_2=$(cat /proc/cpuinfo | grep flags |tail -n 1)
|
||||
elif [[ ${UNAME_S} == Darwin ]]; then
|
||||
CPU_FLAGS=$(/usr/sbin/sysctl -n machdep.cpu.features)
|
||||
CPU_FLAGS_2=$(/usr/sbin/sysctl -n machdep.cpu.leaf7_features)
|
||||
if [[ "$arch" == "x86_64" ]]; then
|
||||
CPU_FLAGS_2=$(/usr/sbin/sysctl -n machdep.cpu.leaf7_features)
|
||||
fi
|
||||
fi
|
||||
if [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx512f/{print "Y"}') == "Y" ]]; then
|
||||
echo "avx512"
|
||||
|
|
@ -19,6 +22,9 @@ elif [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /avx/ {print "Y"}') ==
|
|||
elif [[ $(echo ${CPU_FLAGS} | tr 'A-Z' 'a-z'| awk ' /sse2/ {print "Y"}') == "Y" ]]; then
|
||||
echo "sse2"
|
||||
exit 0
|
||||
elif [[ $arch == "arm64" || $arch == "aarch64" ]]; then
|
||||
echo "arm64"
|
||||
exit 0
|
||||
else
|
||||
echo "unknown"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue