Skip to content

Commit

Permalink
Merging main branch onto testing branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Aug 19, 2024
2 parents 992804c + c2764e6 commit 7b484d7
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.new
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ Lmod 8.7+
* Issue #714: Adding "=encoding UTF-8" to pod generation
(8.7.46) * Issue #716: Must only add KSH_SUPPORT to zsh when both $orig_zsh_version and $zsh_fpath have non-null values
(8.7.47) * Issue #716: Use correct shell foo
W.I.P:
(8.7.48) * Issue #717: Keep previous varT when restoring a collection. Otherwise the previous modules env vars.
are lost and therefore not purged.
* Issue #718: use __build_FPATH_for_zsh_ksh to build FPATH for both shells
* Issue #667: support for terse avail extensions

* Collect configure error to end of configure.
2 changes: 1 addition & 1 deletion build.rtm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ case $SYSHOST in
fi
;;

rios | jedrik | vato | devo | xalt-lmod | bt)
rios | jedrik | vato | devo | xalt-lmod | bt | bt2)
SUDO="sudo"
base="/opt/apps"
PKG=$base/lmod/$PKG_VERSION
Expand Down
74 changes: 74 additions & 0 deletions contrib/TACC/arch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/sh
# -*- python -*-

################################################################################
# This file is python bilingual: The next line starts a comment in Python,
# and is a no-op in shell
""":"
# Find a suitable python interpreter (adapt for your specific needs)
for cmd in python3 python python2; do
command -v > /dev/null $cmd && exec $cmd $0 "$@"
done
echo "Error: Could not find a valid python interpreter --> exiting!" >&2
exit 2
":"""
################################################################################

# This program reports the (uname -m) and cpu family and the model from /proc/cpuinfo
# On chips that support AVX2 the model is replaced with "avx2".

# Robert McLay 2016-08-11 12:33



from __future__ import print_function
import os, sys, re, platform

def main():
osName = platform.system()
machName = platform.machine()
machDescript = ""
cpuFamily = False
model = False

if (osName == "Linux" and machName == "x86_64"):
f = open("/proc/cpuinfo","r")

count = 0
avx2 = False
for line in f:
if (line.find("cpu family") != -1):
A = re.findall(r'\d+',line)
cpuFamily = "%02x" %( int(A[0]) )
count += 1
elif (line.find("model name") != -1):
A = re.findall(r'.*: *(.*)',line)
machDescript = A[0]
count += 1
elif (line.find("model") != -1):
A = re.findall(r'.*: *(.*)',line)
model = "%02x" % ( int(A[0]) )
count += 1
elif (line.find("flags") != -1):
A = re.findall(r'.*: *(.*)',line)
flagStr = A[0]
if (flagStr.find("avx2") != -1):
model = "avx2"
count += 1
if (count > 3):
break

f.close()
A = []
A.append(machName)
if (cpuFamily):
A.append(cpuFamily)
if (model):
A.append(model)

machName = "_".join(A)
print(machName)


if ( __name__ == '__main__'): main()

0 comments on commit 7b484d7

Please sign in to comment.