[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] AMD or INTEL

We use these simple startd cron scripts at the CHTC to detect HasIntel and HasHT.

cat /opt/startd_cron_modules/has_intel
test -f $CPUFILE || exit 1
VENDORID=`cat /proc/cpuinfo  | grep vendor_id|uniq|awk '{print $3}'`
if [ "$VENDORID" = "GenuineIntel" ]; then
echo "HasIntel=True"
echo "HasIntel=False"

for HasHT, we compare these two values and print HasHT if they are not the same.
NUMCORE=`cat /opt/dmidecodeoutput  | grep -i "Core Count"|sort -u `
NUMTHREAD=`cat /opt/dmidecodeoutput  | grep -i "Thread Count"|sort -u`


On Wed, 11 Dec 2013, Brian Candler wrote:

> Thanks guys! I thought it might be buried in the classad somewhere.

FYI, a couple of ways you can do this.

(1) Write a script which checks the machine type (e.g. from /proc/cpuinfo as described) and returns "has_intel = True" or "has_amd =
True". There is then a hook in condor where you can configure it to run this script periodically and update classads accordingly. See:


(2) I used ansible, a configuration management tool, which learned the CPU type as a "fact" from the target host, then used this to push
out a config template which depended on this variable. In my case:

{% if "AMD Opteron(tm) Processor 6180 SE" in ansible_processor %}
#On AMD 12-core processors, comment out the COUNT_HYPERTHREAD_CPUS = False. See
{% else %}
{% endif %}

but in a similar way you could statically add classAd info. This approach makes sense if you are going to use a centralised management
tool anyway.