Mailing List Archives
Authenticated access
|
|
|
[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
#!/bin/sh
CPUFILE=/proc/cpuinfo
test -f $CPUFILE || exit 1
VENDORID=`cat /proc/cpuinfo | grep vendor_id|uniq|awk '{print $3}'`
if [ "$VENDORID" = "GenuineIntel" ]; then
echo "HasIntel=True"
else
echo "HasIntel=False"
fi
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`
-Nate
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:
http://stackoverflow.com/questions/9864766/how-to-tell-condor-to-dispatch-jobs-only-to-machines-on-the-cluster-that-have
(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
#https://www-auth.cs.wisc.edu/lists/condor-users/2011-August/msg00005.shtml
#COUNT_HYPERTHREAD_CPUS = False
{% else %}
COUNT_HYPERTHREAD_CPUS = False
{% 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.
Regards,
Brian.