Changeset 2264 in /cluster/svnroot


Ignore:
Timestamp:
Mar 20, 2010 2:04:28 PM (11 years ago)
Author:
skylar
Message:

merging in machines file autogeneration (#456)

Location:
bccd-ng/trunk/trees
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/trunk/trees/bin/bccd-snarfhosts

    r2157 r2264  
    1 #!/bin/bash
     1#!/bin/bash 
    22
    33. /usr/local/Modules/3.2.6/init/bash
     
    77else
    88        FILE=$HOME/machines
     9fi
     10
     11if ! test -z $2; then
     12        MPI=$2
    913fi
    1014
     
    2731for n in $NODES;do
    2832        CPUCOUNT=`snmpget -OQv -c public -v 1 $n ucdavis.82.4.1.2.9.99.112.117.95.99.111.117.110.116.1|sed -e 's!"!!g'`
    29         module list 2>&1|egrep -q '[[:space:]]openmpi\/'
    30         HAVE_OPENMPI=$?
    31         module list 2>&1|egrep -q '[[:space:]]mpich2\/'
    32         HAVE_MPICH2=$?
    33         module list 2>&1|egrep -q '[[:space:]]lam\/'
    34         HAVE_LAM=$?
     33        let HAVE_OPENMPI=HAVE_MPICH2=HAVE_LAM=1
     34        if test -z $MPI; then
     35                module list 2>&1|egrep -q '[[:space:]]openmpi\/'
     36                HAVE_OPENMPI=$?
     37                module list 2>&1|egrep -q '[[:space:]]mpich2\/'
     38                HAVE_MPICH2=$?
     39                module list 2>&1|egrep -q '[[:space:]]lam\/'
     40                HAVE_LAM=$?
     41        fi
    3542
    36         if test $HAVE_OPENMPI -eq 0; then
     43        if test $HAVE_OPENMPI -eq 0 || test "$MPI" = "openmpi"; then
    3744                echo "$n slots=$CPUCOUNT" >> $FILE
    38         elif test $HAVE_MPICH2 -eq 0; then
     45        elif test $HAVE_MPICH2 -eq 0 || test "$MPI" = "mpich2"; then
    3946                echo "$n:$CPUCOUNT" >> $FILE
    40         elif test $HAVE_LAM -eq 0; then
     47        elif test $HAVE_LAM -eq 0 || test "$MPI" = "lam"; then
    4148                echo "$n cpu=$CPUCOUNT" >> $FILE
    4249        else
  • bccd-ng/trunk/trees/usr/local/etc/modules-remote/lam/7.1.4

    r1956 r2264  
    2727prepend-path    -d " " LDFLAGS             -L$MOD_LAM_DIR/lib/
    2828prepend-path    -d " " CPPFLAGS            -I$MOD_LAM_DIR/include/
     29
     30if { [catch { exec /bin/bccd-snarfhosts $env(HOME)/machines lam} msg] } {
     31        puts "bccd-snarfhosts failed: $::errorInfo"
     32}
  • bccd-ng/trunk/trees/usr/local/etc/modules-remote/mpich2/1.0.8

    r1956 r2264  
    2525prepend-path    -d " " LDFLAGS             -L$MOD_MPICH2_DIR/lib/
    2626prepend-path    -d " " CPPFLAGS            -I$MOD_MPICH2_DIR/include/
     27
     28if { [catch { exec /bin/bccd-snarfhosts $env(HOME)/machines mpich2} msg] } {
     29        puts "bccd-snarfhosts failed: $::errorInfo"
     30}
  • bccd-ng/trunk/trees/usr/local/etc/modules-remote/openmpi/1.2.9

    r2122 r2264  
    2424prepend-path    -d " " LDFLAGS             -L$MOD_OPENMPI_DIR/lib/
    2525prepend-path    -d " " CPPFLAGS            -I$MOD_OPENMPI_DIR/include/
     26
     27if { [catch { exec /bin/bccd-snarfhosts $env(HOME)/machines openmpi} msg] } {
     28        puts "bccd-snarfhosts failed: $::errorInfo"
     29}
  • bccd-ng/trunk/trees/usr/local/etc/modules/lam/7.1.4

    r1696 r2264  
    1717prepend-path    -d " " LDFLAGS             -L$MOD_LAM_DIR/lib/
    1818prepend-path    -d " " CPPFLAGS            -I$MOD_LAM_DIR/include/
     19
     20if { [catch { exec /bin/bccd-snarfhosts $env(HOME)/machines lam} msg] } {
     21        puts "bccd-snarfhosts failed: $::errorInfo"
     22}
  • bccd-ng/trunk/trees/usr/local/etc/modules/mpich2/1.2.1

    r2157 r2264  
    1515prepend-path    -d " " LDFLAGS             -L$MOD_MPICH2_DIR/lib/
    1616prepend-path    -d " " CPPFLAGS            -I$MOD_MPICH2_DIR/include/
     17
     18if { [catch { exec /bin/bccd-snarfhosts $env(HOME)/machines mpich2} msg] } {
     19        puts "bccd-snarfhosts failed: $::errorInfo"
     20}
     21
  • bccd-ng/trunk/trees/usr/local/etc/modules/openmpi/1.4.0

    r2157 r2264  
    1414prepend-path    -d " " LDFLAGS             -L$MOD_OPENMPI_DIR/lib/
    1515prepend-path    -d " " CPPFLAGS            -I$MOD_OPENMPI_DIR/include/
     16
     17if { [catch { exec /bin/bccd-snarfhosts $env(HOME)/machines openmpi} msg] } {
     18        puts "bccd-snarfhosts failed: $::errorInfo"
     19}
Note: See TracChangeset for help on using the changeset viewer.