NWChem/travis/cpuinfo.sh
2025-10-23 22:26:36 -07:00

15 lines
521 B
Bash
Executable file

#!/usr/bin/env bash
git clone -q https://github.com/pytorch/cpuinfo
cd cpuinfo
mkdir build && cd build
CC=gcc CMAKE_POLICY_VERSION_MINIMUM=3.5 cmake .. >& cmake.log
tail -20 cmake.log
make -j3 >& make.log
tail -3 make.log
./isa-info
./cpu-info
./cpu-info |grep -A 1 Microa|tail -1 |cut -d ' ' -f 2-3 | sed -e "s/ //"
rm -f /tmp/microarch_$(id -u).txt
./cpu-info |grep -A 1 Microa|tail -1 |cut -d ' ' -f 2-3 | sed -e "s/ //"> /tmp/microarch_$(id -u).txt
cd ../..
if [[ $(uname -s) == Linux ]]; then /usr/bin/lscpu ; fi