Merge pull request #1183 from edoapra/releasetags-7-3-0

cmake versions
This commit is contained in:
NWChem: Open Source High-Performance Computational Chemistry 2025-10-23 23:44:14 -07:00 committed by GitHub
commit 147e96faa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 33 additions and 37 deletions

View file

@ -487,6 +487,7 @@ jobs:
run: |
./travis/cpuinfo.sh
echo "simd=$(./travis/guess_simd.sh)" >> $GITHUB_ENV
echo "microarch=$(cat /tmp/microarch_$(id -u).txt)" >> $GITHUB_ENV
shell: bash
- name: Setup cache
id: setup-cache
@ -494,7 +495,7 @@ jobs:
with:
path: |
~/cache
key: ${{ matrix.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-blas_size${{ matrix.blas_size}}-libxc${{matrix.use_libxc}}-tblite${{matrix.use_tblite}}-simd${{ env.simd }}-nwchemcache-v003
key: ${{ matrix.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-blas_size${{ matrix.blas_size}}-libxc${{matrix.use_libxc}}-tblite${{matrix.use_tblite}}-simd${{ env.simd }}${{ env.microarch}}-nwchemcache-v003
- name: build environment
run: |
pwd

View file

@ -9,9 +9,6 @@
#
mysimpwd=`pwd`
source ../../../libext/libext_utils/cmake.sh
ls -lrt /tmp/cmakepath_$(id -u).txt
cat /tmp/cmakepath_$(id -u).txt
export PATH=$(cat /tmp/cmakepath_$(id -u).txt):$PATH
echo PATH is $PATH
cd $mysimpwd
if [ -z "$(command -v python3)" ]; then
@ -130,9 +127,11 @@ fi
CMAKE_VER_MAJ=$(${CMAKE} --version|cut -d " " -f 3|head -1|cut -d. -f1)
CMAKE_VER_MIN=$(${CMAKE} --version|cut -d " " -f 3|head -1|cut -d. -f2)
echo CMAKE_VER is ${CMAKE_VER_MAJ} ${CMAKE_VER_MIN}
if ((CMAKE_VER_MAJ < 3)) || (((CMAKE_VER_MAJ > 2) && (CMAKE_VER_MIN < 21))); then
if ((CMAKE_VER_MAJ < 3)) || (((CMAKE_VER_MAJ == 3) && (CMAKE_VER_MIN < 24))); then
cmake_instdir=../../../libext/libext_utils/
get_cmake_release $cmake_instdir
echo PATH is $PATH
echo @@@@
status=$?
if [ $status -ne 0 ]; then
echo cmake 3.21 required to build simint

View file

@ -2,11 +2,10 @@ get_cmake_release(){
UNAME_S=$(uname -s)
CPU=$(uname -m)
CMAKE_VER=3.26.0
echo pwd is `pwd` > /tmp/cmake.log
orgdir=`pwd`
cmake_instdir=$1
echo "Parameter #1 is $1" >> /tmp/cmake.log
echo cmake_instdir is $cmake_instdir >> /tmp/cmake.log
echo "Parameter #1 is $1"
echo cmake_instdir is $cmake_instdir
rm -f cmake-${CMAKE_VER}.tar.gz
if [[ ${UNAME_S} == "Linux" ]]; then
if [[ ${CPU} == "x86_64" || ${CPU} == "aarch64" || ${CPU} == "i686" ]] ; then
@ -16,35 +15,31 @@ get_cmake_release(){
else
CMAKE_CPU=${CPU}
fi
CMAKE=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin/cmake
echo `pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin
echo returning `pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin >> /tmp/cmake.log
rm -f /tmp/cmakepath_$(id -u).txt
echo `pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin > /tmp/cmakepath_$(id -u).txt
echo new CMAKE is $CMAKE >> /tmp/cmake.log
CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}.tar.gz
export CMAKE=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin/cmake
export PATH=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin:$PATH
CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}.tar.gz
else
get_cmake_master
fi
elif [[ ${UNAME_S} == "Darwin" ]] ; then
cd $cmake_instdir
CMAKE=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cmake
export CMAKE=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cmake
export PATH=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin:$PATH
CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-macos-universal.tar.gz
else
return 1
fi
if [ -f ${CMAKE} ]; then
echo using existing ${CMAKE_VER} Cmake >> /tmp/cmake.log
echo using existing ${CMAKE_VER} Cmake
else
curl -L ${CMAKE_URL} -o cmake-${CMAKE_VER}.tar.gz
tar xzf cmake-${CMAKE_VER}.tar.gz
if [[ ${UNAME_S} == "Darwin" ]] ; then
CMAKE=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cmake
rm -f /tmp/cmakepath_$(id -u).txt
echo `pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin > /tmp/cmakepath_$(id -u).txt
export CMAKE=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cmake
export PATH=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin:$PATH
else
CMAKE=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin/cmake
echo `pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin
export CMAKE=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin/cmake
export PATH=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin:$PATH
fi
fi
cd $orgdir
@ -68,9 +63,8 @@ get_cmake_master(){
fi
make -j4
make -j4 install
CMAKE=`pwd`/../bin/cmake
rm -f /tmp/cmakepath_$(id -u).txt
echo `pwd`/../bin > /tmp/cmakepath_$(id -u).txt
export CMAKE=`pwd`/../bin/cmake
export PATH=`pwd`/../bin:$PATH
${CMAKE} -version
cd ../..
return 0

View file

@ -1,10 +1,6 @@
#!/usr/bin/env bash
#set -x
source ../libext_utils/cmake.sh
source ../libext_utils/cmake.sh
ls -lrt /tmp/cmakepath_$(id -u).txt
cat /tmp/cmakepath_$(id -u).txt
export PATH=$(cat /tmp/cmakepath_$(id -u).txt):$PATH
echo PATH is $PATH
check_tgz() {
@ -82,8 +78,11 @@ fi
CMAKE_VER_MAJ=$(${CMAKE} --version|cut -d " " -f 3|head -1|cut -d. -f1)
CMAKE_VER_MIN=$(${CMAKE} --version|cut -d " " -f 3|head -1|cut -d. -f2)
echo CMAKE_VER is ${CMAKE_VER_MAJ} ${CMAKE_VER_MIN}
if ((CMAKE_VER_MAJ < 3)) || (((CMAKE_VER_MAJ == 2) && (CMAKE_VER_MIN < 24))); then
if ((CMAKE_VER_MAJ < 3)) || (((CMAKE_VER_MAJ == 3) && (CMAKE_VER_MIN < 24))); then
cmake_instdir=../libext_utils
get_cmake_release $cmake_instdir
echo PATH is $PATH
echo @@@@
status=$?
if [ $status -ne 0 ]; then
echo cmake required to build scalapack

View file

@ -6,11 +6,7 @@ declare -a LIST_MPICWRAP
LIST_MPICWRAP=( 'mpicc' 'mpicc' 'mpiicc' 'mpiicc' 'mpixlc_r' 'mpixlc' 'mpicc' 'mpifcc' 'mpifccpx' 'mpicc-mpich-mp' 'mpicc-mpich-mp' 'mpicc-openmpi-mp' 'mpicc-openmpi-mp')
export LIST_MPICWRAP
myscalapwd=`pwd`
source ../libext_utils/cmake.sh
ls -lrt /tmp/cmakepath_$(id -u).txt
cat /tmp/cmakepath_$(id -u).txt
export PATH=$(cat /tmp/cmakepath_$(id -u).txt):$PATH
echo PATH is $PATH
source ../libext_utils/cmake.sh
cd $myscalapwd
if [[ -z "${MPIF90}" ]]; then
@ -82,6 +78,8 @@ if [[ -z "${CMAKE}" ]]; then
if [[ -z "$(command -v cmake)" ]]; then
cmake_instdir=../libext_utils
get_cmake_release $cmake_instdir
echo PATH is $PATH
echo @@@@
status=$?
if [ $status -ne 0 ]; then
echo cmake required to build scalapack
@ -100,6 +98,8 @@ echo CMAKE_VER is ${CMAKE_VER_MAJ} ${CMAKE_VER_MIN}
if ((CMAKE_VER_MAJ < 3)) || (((CMAKE_VER_MAJ == 3) && (CMAKE_VER_MIN < 24))); then
cmake_instdir=../libext_utils
get_cmake_release $cmake_instdir
echo PATH is $PATH
echo zzzz
status=$?
if [ $status -ne 0 ]; then
echo cmake required to build scalapack

View file

@ -2,11 +2,14 @@
git clone -q https://github.com/pytorch/cpuinfo
cd cpuinfo
mkdir build && cd build
CMAKE_POLICY_VERSION_MINIMUM=3.5 cmake .. >& cmake.log
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 ../..
rm -rf cpuinfo
if [[ $(uname -s) == Linux ]]; then /usr/bin/lscpu ; fi