[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[HTCondor-users] CPU topology advertising
Certain engineering applications make decisions about their resource utilization based on a probe of the exec machine's CPU and NUMA topology, which in some cases may make it necessary to provide this information to HTCondor as well in order to properly allocate resources. For instance, CST Microwave Studio's "HPC" capability is licensed by CPU sockets, rather than by CPU cores.
This OneShot startd_cron job is a quick and easy translation of useful information from the "lscpu" command into an HTCondor topology ClassAd:
# Produce a ClassAd for machine memory and processor topology information
lscpu | \
sed -n -e '
s/^Thread(s) per core: */CpuThreadsPerCore=/p;
s/^Byte Order: *\(.*\)/CpuByteOrder="\1"/p;
s/^Core(s) per socket: */CpuPhysicalCoresPerSocket=/p;
s/^NUMA node(s): */CpuNUMAnodes=/p;
s/^Model name: *\(.*\)/CpuModelName="\1"/p;
s/^L2 cache:: *\([0-9][0-9]*\)/CpuL2Cache=\1/p;
s/^L3 cache:: *\([0-9][0-9]*\)/CpuL3Cache=\1/p;
echo -e "IsHyperThreaded = CpuThreadsPerCore > 1\n--"