Changeset 2293 in /cluster/svnroot


Ignore:
Timestamp:
Mar 29, 2010 12:17:44 PM (11 years ago)
Author:
fitz
Message:

Merging from trunk

Location:
bccd-ng/branches/fitz-devel
Files:
21 edited
13 copied

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/fitz-devel/bin/auto_build_wrapper.sh

    r2095 r2293  
    2121
    2222WEBSVN="http://bccd-ng.cluster.earlham.edu/svn/bccd-ng/"
    23 BRANCH="${WEBSVN}/branches/littlefe-hw/"
     23BRANCH="${WEBSVN}/branches/skylar-nat/"
    2424BINDIR="/bin/"
    2525BLDCD="build_livecd.pl"
     
    139139fi
    140140
     141CMD="/bin/sed -ie s/bccd_latest.iso.[[:alpha:]][[:alpha:]]*/bccd_latest.iso/g /cluster/bccd-ng/bccd_latest.iso.md5"
     142$CMD
     143RC=$?
     144if [ "$RC" -ne "0" ]; then
     145        echo "$CMD died on $RC"
     146        exit $RC
     147fi
     148
    141149popd
    142150
  • bccd-ng/branches/fitz-devel/bin/build_livecd.pl

    r2287 r2293  
    3333    "debmirror=s" => \$opts{'debmirror'},
    3434    "websvn=s" => \$opts{'websvn'},
    35     "builddir=s" => \$opts{'dir'},
     35    "dir=s" => \$opts{'dir'},
    3636    'help' => \$opts{'help'}
    3737    );
     
    676676
    677677# This must run before 20 (bccd-passwd) and autofs
    678 foreach my $script ( "bccd-keyboard", "bccd-unite-sw", "perfctr", ) { 
     678foreach my $script ( "bccd-keyboard", "bccd-unite-sw", "perfctr", ) {
    679679    $Bccd->run_test(
    680680        "system",
     
    684684        );
    685685}
     686
     687$Bccd->run_test(
     688        "system",
     689        "",
     690        "Enabling home directory overlay cleaning.",
     691        "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d bccd-clean-home start 5 2 S .",
     692        );
    686693
    687694$Bccd->run_test(
  • bccd-ng/branches/fitz-devel/packages/boot/grub/menu.lst

    r1663 r2293  
    22timeout 10
    33
    4 title "2.6.22.9_aufs"
     4title "2.6.31.12_aufs"
    55root (hd0,0)
    6 kernel /vmlinuz-2.6.22.9_aufs root=/dev/mapper/bccd-slash ro vga=791 lang=us nomkxorgconfig
    7 initrd /initramfs-2.6.22.9_aufs
     6kernel /vmlinuz-2.6.31.12_aufs root=/dev/mapper/bccd-slash ro vga=791 lang=us nomkxorgconfig
     7initrd /initramfs-2.6.31.12_aufs
  • bccd-ng/branches/fitz-devel/packages/etc/init.d/bccd-nics

    r2036 r2293  
    1212/bin/bccd-nic-probe
    1313/bin/bccd-nic-setup
     14/bin/bccd-nat
    1415
    1516exit $?
  • bccd-ng/branches/fitz-devel/packages/liberate.pl

    r2095 r2293  
    314314    "",
    315315    "Copied boot kernel to diskless kernel.",
    316     "$LIBDIR/boot/vmlinuz-2.6.22.9_aufs",
    317     "$LIBDIR/var/lib/tftpboot/vmlinuz-2.6.22.9_aufs",
     316    "$LIBDIR/boot/vmlinuz-2.6.31.12_aufs",
     317    "$LIBDIR/var/lib/tftpboot/vmlinuz-2.6.31.12_aufs",
    318318    );
    319319
  • bccd-ng/branches/fitz-devel/packages/usr/local/lib/site_perl/5.10.0/Bccd.pm

    r2137 r2293  
    2828Readonly my $IFCONFIG      => "/sbin/ifconfig -a";
    2929Readonly my $INTFILE       => "/etc/network/interfaces";
     30Readonly my $NATSH         => "/etc/network/if-up.d/nat";
    3031Readonly my $START_PKBFILE => "/etc/network/if-up.d/start-pkbcast";
    3132Readonly my $CMDLINE_FILE => "/proc/cmdline";
     
    19191920        print $PCONF "default bccd\n";
    19201921        print $PCONF "label bccd\n";
    1921         print $PCONF "\tkernel vmlinuz-2.6.22.9_aufs\n";
    1922         print $PCONF "\tappend ETHERNET=eth0 initrd=initramfs-2.6.22.9_aufs root=/dev/nfs nfsroot=$nic_conf->{$pxenic}->{'ipaddr'}:/ ip=dhcp init=/sbin/init vga=791 lang=us\n";
     1922        print $PCONF "\tkernel vmlinuz-2.6.31.12_aufs\n";
     1923        print $PCONF "\tappend ETHERNET=eth0 initrd=initramfs-2.6.31.12_aufs root=/dev/nfs nfsroot=$nic_conf->{$pxenic}->{'ipaddr'}:/ ip=dhcp init=/sbin/init vga=791 lang=us\n";
    19231924       
    19241925        close($PCONF);
     
    19341935   
    19351936    close($DCONF);
    1936 
    19371937        if($self->parse_cmdline("recoverdhcp")) {
    19381938                my($recentmach,$i,$latestts,$ft);
    19391939                $ft = new File::Temp();
    1940                 Readonly my $SLEEP => '60';
     1940                Readonly my $SLEEP => 60;
    19411941                Readonly my $PWD => getcwd();
    19421942                my $tempdir = $ft->tempdir("DHCP",CLEANUP => 0);
    19431943                my(undef,undef,$uid,$gid) = getpwnam('bccd');
    19441944                chown($uid, $gid, $tempdir);
    1945                 $self->log_and_cont("INFO",$sub,"Starting networking...");
    1946                 ($rc,$out) = $self->exec_system("/etc/init.d/networking restart"); # No invoke-rc.d because utmp has not been updated
     1945                $rc = $self->run_test("rmtree","","Removing /etc/network/run",'/etc/network/run');
    19471946                if($rc) {
    1948                         $self->log_and_die("ERROR",$sub,"Couldn't restart networking, $out");
     1947                        $self->log_and_cont("ERROR",$sub,"Couldn't remove /etc/network/run");
    19491948                }
    1950                 $self->log_and_cont("INFO",$sub,"Starting ssh...");
    1951                 ($rc,$out) = $self->exec_system("/usr/sbin/invoke-rc.d ssh start");
     1949                $rc = $self->run_test("mkpath","","mkdir /etc/network/run",'/etc/network/run');
    19521950                if($rc) {
    1953                         $self->log_and_die("ERROR",$sub,"Couldn't start ssh, $out");
     1951                        $self->log_and_cont("ERROR",$sub,"Couldn't remake /etc/network/run");
    19541952                }
    1955                 $self->log_and_cont("INFO",$sub,"Starting BCCD autodetection...");
    1956                 ($rc,$out) = $self->exec_system(qq{su bccd -c "/bin/bccd-auto-ssh > /tmp/bccd-auto-ssh.out 2>&1" });
    1957                 if($rc) {
    1958                         $self->log_and_die("ERROR",$sub,"Couldn't start bccd autodetection, $out");
     1953                ($out,$rc) = $self->run_test("system","","touch /etc/network/run/ifstate","touch /etc/network/run/ifstate");
     1954                if(!$rc) {
     1955                        $self->log_and_cont("ERROR",$sub,"Couldn't touch /etc/network/run/ifstate: $out");
    19591956                }
     1957                ($out,$rc) = $self->run_test("system","","Starting networking","/etc/init.d/networking start"); # No invoke-rc.d because utmp has not been updated
     1958                if(!$rc) {
     1959                        $self->log_and_cont("ERROR",$sub,"Couldn't start networking: $out");
     1960                }
     1961                ($out,$rc) = $self->run_test("system","","Starting snmpd","/usr/sbin/invoke-rc.d snmpd start");
     1962                if(!$rc) {
     1963                        $self->log_and_cont("ERROR",$sub,"Couldn't start snmpd: $out");
     1964                }
     1965                ($rc,$out) = $self->run_test("system","","Starting DHCP server","/usr/sbin/invoke-rc.d dhcp3-server stop");
     1966                if(!$rc) {
     1967                        $self->log_and_cont("ERROR",$sub,"Couldn't stop DHCP server: $out");
     1968                }
     1969                ($rc,$out) = $self->run_test("system","","Starting sshd","/usr/sbin/invoke-rc.d ssh start");
     1970                if(!$rc) {
     1971                        $self->log_and_cont("ERROR",$sub,"Couldn't start ssh: $out");
     1972                }
     1973                ($rc,$out) = $self->run_test("system","","Starting BCCD autodetection",qq{su bccd -c "/bin/bccd-auto-ssh > /tmp/bccd-auto-ssh.out 2>&1" });
    19601974
    19611975                $self->log_and_cont("INFO",$sub,"Waiting for responses, sleeping $SLEEP seconds...");
     
    19631977       
    19641978                chdir($tempdir);
    1965                 ($rc,$out) = $self->exec_system(qq{su bccd -c "/bin/bccd-snarfhosts $tempdir/machines"});
     1979                ($rc,$out) = $self->run_test("system","","Snarfing hosts",qq{su bccd -c "/bin/bccd-snarfhosts $tempdir/machines"});
    19661980                if($rc) {
    1967                         $self->log_and_die("ERROR",$sub,"Couldn't snarf hosts, $out");
     1981                        $self->log_and_cont("ERROR",$sub,"Couldn't snarf hosts, $out");
    19681982                }
    19691983
     
    19711985                        $self->log_and_die("ERROR",$sub,"Can't open file $tempdir/machines: $!\n");
    19721986                $i = $latestts = 0;
    1973                 while(my $machine = <$MACHINES>) {
    1974                         chomp $machine;
     1987                while(my $line = <$MACHINES>) {
     1988                        chomp $line;
     1989                        my $machine = (split(/\s+/,$line))[0];
     1990                        if($self->is_log($DEBUG)) {
     1991                                $self->log_and_cont("INFO",$sub,"Processing $machine for DHCP leases");
     1992                        }
    19751993                        if($i++ > 0) { # The head node always appears first, and should not be processed
    19761994                                my $leases;
    19771995                                $destfile = "$tempdir/$machine"."_dhcpd.leases";
    1978                                 ($rc,$out) = $self->exec_system(qq{su bccd -c "scp $machine:/var/tmp/dhcpd.leases $destfile"});
    1979                                 if($rc) {
     1996                                ($rc,$out) = $self->run_test("system","","Copying lease from $machine",qq{su bccd -c "scp $machine:/var/tmp/dhcpd.leases $destfile"});
     1997                                if(!$rc) {
    19801998                                        $self->log_and_cont("WARN",$sub,"Couldn't copy lease file from $machine");
    19811999                                }
     
    19892007                                                        $latestts = $1;
    19902008                                                        $recentmach = $machine;
     2009                                                        if($self->is_log($DEBUG)) {
     2010                                                                $self->log_and_cont("INFO",$sub,"$machine is most recent");
     2011                                                        }
    19912012                                                }
    19922013                                        }
     
    19952016                }
    19962017                if(defined($recentmach)) {
    1997                         $rc = move("$tempdir/$recentmach"."_dhcpd.leases","/var/lib/dhcp3/dhcpd.leases");
     2018                        if($self->is_log($DEBUG)) {
     2019                                $self->log_and_cont("INFO",$sub,"Copied $tempdir/$recentmach"."_dhcpd.leases to /var/lib/dhcp3/dhcpd.leases");
     2020                        }
     2021                        $rc = $self->run_test("fcopy","","Copying $tempdir/$recentmach"."_dhcpd.leases -> /var/lib/dhcp3/dhcpd.leases","$tempdir/$recentmach"."_dhcpd.leases","/var/lib/dhcp3/dhcpd.leases");
    19982022                        if(!$rc) {
    19992023                                $self->log_and_die("ERROR",$sub,"Couldn't move lease from $recentmach into place.");
    20002024                        }
    20012025                }
    2002                 $self->exec_system("killall pkbcast");
    2003                 $self->exec_system("killall bccd-allow-all");
     2026                $self->run_test("system","","Killing pkbcast","killall pkbcast");
     2027                $self->run_test("system","","Killing bccd-allow-all","killall bccd-allow-all");
    20042028                close($MACHINES);
    20052029        }
     
    20242048    }
    20252049   
     2050}
     2051
     2052sub config_nat{
     2053        my($self) = @_;
     2054        my($natnic,$sub);
     2055        $sub = 'config_nat';
     2056        open(my $NETSTAT, '-|', '/bin/netstat', '-rn') or
     2057                $self->log_and_die("ERROR",$sub,"Couldn't open up netstat for piping!");
     2058
     2059        NETSTAT:
     2060        while(my $line = <$NETSTAT>) {
     2061                chomp $line;
     2062                my @splitline = split(/\s+/, $line);
     2063                if($splitline[0] eq '0.0.0.0') {
     2064                        $natnic = $splitline[7];
     2065                        last NETSTAT;
     2066                }
     2067        }
     2068        close($NETSTAT);
     2069
     2070        if(defined($natnic)) {
     2071                open(my $NAT, '>', $NATSH) or
     2072                        $self->log_and_die("ERROR",$sub,"Couldn't open $NATSH for writing: $!");
     2073
     2074                print $NAT qq{#!/bin/bash\n\n};
     2075                print $NAT qq{/sbin/iptables -t nat -A POSTROUTING -o $natnic -j MASQUERADE\n};
     2076                print $NAT qq{/sbin/iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -j SNAT --to-source };
     2077                print $NAT $self->get_nic_ip($natnic).qq{\n};
     2078
     2079                close($NAT);
     2080                chmod(S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH, $NATSH) or
     2081                        $self->log_and_die("ERROR",$sub,"Couldn't set $NATSH to be executable: $!");
     2082               
     2083                return 1;
     2084        }
     2085        return undef;
    20262086}
    20272087
     
    20932153            }
    20942154            if($nic_conf->{$nic}->{'dhcp'} == 0) {
     2155                FIND_CUR_NIC:
    20952156                do {
    20962157                    $nic_conf->{$nic}->{'ipaddr'} = ($temp = $d->inputbox(text=>"$nic IP address (mandatory)")) ? $temp : undef;
     
    20992160                        redo FIND_EXT_NIC;
    21002161                    }
     2162                    elsif($nic_conf->{$nic}->{'ipaddr'} eq $BCCD_NET->{'ipaddr'}) {
     2163                        $d->msgbox(text => "IP address cannot be the BCCD virtual IP ($BCCD_NET->{'ipaddr'}).");
     2164                        goto FIND_CUR_NIC;
     2165                    }
    21012166                   
    21022167                    $nic_conf->{$nic}->{'mask'} = ($temp = $d->inputbox(text=>"$nic Subnet mask (mandatory)")) ? $temp : undef;
  • bccd-ng/branches/fitz-devel/packages/usr/local/lib/site_perl/5.10.0/Bccd/TestDb.pm

    r2149 r2293  
    1212$ENV{'PGHOST'} = "hopper.cluster.earlham.edu";
    1313
    14 my $websvn = "http://bccd-ng.cluster.earlham.edu/svn/bccd-ng/branches/fitz-devel/";
     14my $websvn = "http://bccd-ng.cluster.earlham.edu/svn/bccd-ng/trunk/";
    1515
    1616BEGIN {
     
    2020
    2121    @ISA = qw(Exporter);
    22     @EXPORT_OK = qw( &open_db &insert_results );
     22    @EXPORT_OK = qw( &open_db &insert_results &check_build_failure );
    2323}
    2424
     
    101101}
    102102
     103sub check_build_failure {
     104        my($dbh) = @_;
     105
     106        my $sql = "SELECT description FROM last_build";
     107
     108    my $sth = $dbh->prepare($sql) || die "Prepare error: ($sql) $DBI::errstr\n";
     109        my $status = $sth->execute()
     110                || die "Execute error: ($sql) $DBI::errstr\n";
     111
     112        my @select = $sth->fetchrow_array();
     113        if($select[0] ne 'SUCCESS') {
     114                return undef;
     115        }
     116
     117        return 0;
     118}
     119
    1031201;
  • bccd-ng/branches/fitz-devel/trees/bin/bccd-auto-ssh

    r2132 r2293  
    1 #!/bin/bash -x
     1#!/bin/bash
    22
    33export AUTO=true
     
    1212
    1313echo "Starting pkbcast..."
    14 /bin/pkbcast 2> /dev/null &
     14/bin/pkbcast > /dev/null 2>&1 &
    1515
    1616echo "Starting bccd-allowall..."
  • bccd-ng/branches/fitz-devel/trees/bin/bccd-copy-leases

    r2096 r2293  
    11#!/bin/bash
    22
     3IFACE=`/sbin/ifconfig|/usr/bin/awk '$1 ~ /^eth[[:digit:]][[:digit:]]*:1/ {print $1}'|tail -1`
    34LEASES=/var/lib/dhcp3/dhcpd.leases
    4 IPADDR=`perl -MBccd -e 'my $Bccd = new Bccd(); print $Bccd->get_nic_ip("eth0:1")."\n"';`;
     5IPADDR=`/bin/bccd-get-nicip $IFACE`
    56if test -f $LEASES && test "$IPADDR" = "192.168.3.1"; then
    67        DIR=`mktemp -d -p /var/tmp leases.XXXXXXX`
     
    1314        # Depends on the master node being the top line
    1415        /bin/bccd-snarfhosts $DIR/machines
    15         LINES=`wc -l $DIR/machines|awk '{print $1}'`
     16        LINES=`awk '{s+=1} END {print s}' $DIR/machines`
    1617        LINESTOREAD=`echo "${LINES}-1"|bc`
    17         for m in `tail -$LINESTOREAD $DIR/machines`; do
     18        for m in `tail -$LINESTOREAD $DIR/machines|awk '{print $1}'`; do
    1819                scp -q dhcpd.leases $m:/var/tmp
    1920        done
  • bccd-ng/branches/fitz-devel/trees/bin/bccd-nat

    r1756 r2293  
    1 #-----------Begin Script---------------
    2 #!/bin/bash
    3 #This script (when run by a BCCD with startdhcp enabled) will enable itself and
    4 #all dhcp'd nodes to connect to the outside world.
     1#!/usr/bin/perl
    52
    6 #this must only be run by root!
    7 WHOAMI=`whoami`
    8 if test "x$WHOAMI" != "xroot" ; then
    9         dialog --stdout --msgbox "You need to run this script as root.  Sorry!" 0 0
    10         exit -1
    11 fi
    12 clear
     3use strict;
     4use warnings;
     5use Bccd;
    136
    14 #get OLDROUTER
    15 OLDROUTER=`netstat -rn|awk '$1 ~ /^0\.0\.0\.0/ {print $2}'|tail -1`
     7my $Bccd = new Bccd();
    168
    17 #get interface
    18 ROUTERIP=`perl -MBccd -e 'my $Bccd = new Bccd(); print $Bccd->get_nic_ip($Bccd->parse_cmdline('dhcp_routernic'));'`
    19 ROUTERMASK=`perl -MBccd -e 'my $Bccd = new Bccd(); print $Bccd->get_nic_mask($Bccd->parse_cmdline('dhcp_routernic'));'`
     9my $rc = $Bccd->config_nat();
     10if(!defined($rc)) {
     11        die "NAT configuration failed!\n";
     12}
    2013
    21 #now we need to get a new host and router ip from the user
    22 NEWIP=`dialog --stdout --inputbox "Specify a network routable IP address for this host:" 0 0
    23 `
    24 NEWROUTER=`dialog --stdout --inputbox "Specify the network router:" 0 0 `
    25 NEWDNSIP=`dialog --stdout --inputbox "Specify your outside dns server:" 0 0 `
    26 
    27 #add a virtual interface
    28 ifconfig eth0:0 $NEWIP
    29 
    30 #muck with the routes!
    31 route del default gw $OLDROUTER
    32 route add default gw $NEWROUTER eth0:0
    33 
    34 #let's enable ip forwarding
    35 echo 1 > /proc/sys/net/ipv4/ip_forward
    36 
    37 #changing pdnsd.conf
    38 cat >> /usr/share/pdnsd/pdnsd-resolvconf.conf <<EOF
    39 #STARTFOO -- INSERTED BY SCRIPTING FOO
    40 server {
    41         ip="$NEWDNSIP";
    42         interval=30;
    43         timeout=60;
    44         caching=off;
    45 }
    46 #STOPFOO -- INSERTED BY SCRIPTING FOO
    47 EOF
    48 
    49 #restart pdnsd
    50 /etc/init.d/pdnsd stop || /bin/true
    51 /etc/init.d/pdnsd start || dialog --msgbox "Bad juju encountered.  Try restarting pdnsd manually" 0 0
    52 
    53 # Clear out existing table?
    54 iptables -t nat -F
    55 
    56 #some iptables magic foo
    57 iptables -t nat -A POSTROUTING -d ! ${ROUTERIP}/${ROUTERMASK} -j SNAT --to $NEWIP
    58 #---------End of Script----------------
    59 
     14exit 0;
  • bccd-ng/branches/fitz-devel/trees/bin/bccd-nic-setup

    r1907 r2293  
    1717        $d = new UI::Dialog (backtitle => "Configure NICS",
    1818               listheight => 10, height => 20);
    19        
    20        
    21         #$Bccd->set_debug('INFO');
    2219       
    2320        foreach my $nic ($Bccd->get_eth_nics()) {
  • bccd-ng/branches/fitz-devel/trees/bin/bccd-reset-network

    r1947 r2293  
    66        /bin/bccd-nic-setup && \
    77        /usr/sbin/invoke-rc.d networking start && \
    8         /usr/sbin/invoke-rc.d dhcp3-server start
     8        /bin/bccd-nat && \
     9        /usr/sbin/invoke-rc.d networking start && \
     10        /usr/sbin/invoke-rc.d dhcp3-server start
  • bccd-ng/branches/fitz-devel/trees/bin/bccd-snarfhosts

    r2213 r2293  
    1 #!/bin/bash
     1#!/bin/bash 
    22
    33C3CONF=/etc/c3.conf
     
    99else
    1010        FILE=$HOME/machines
     11fi
     12
     13if ! test -z $2; then
     14        MPI=$2
    1115fi
    1216
     
    3034for n in $NODES;do
    3135        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'`
    32         module list 2>&1|egrep -q '[[:space:]]openmpi\/'
    33         HAVE_OPENMPI=$?
    34         module list 2>&1|egrep -q '[[:space:]]mpich2\/'
    35         HAVE_MPICH2=$?
    36         module list 2>&1|egrep -q '[[:space:]]lam\/'
    37         HAVE_LAM=$?
     36        let HAVE_OPENMPI=HAVE_MPICH2=HAVE_LAM=1
     37        if test -z $MPI; then
     38                module list 2>&1|egrep -q '[[:space:]]openmpi\/'
     39                HAVE_OPENMPI=$?
     40                module list 2>&1|egrep -q '[[:space:]]mpich2\/'
     41                HAVE_MPICH2=$?
     42                module list 2>&1|egrep -q '[[:space:]]lam\/'
     43                HAVE_LAM=$?
     44        fi
    3845
    39         if test $HAVE_OPENMPI -eq 0; then
     46        if test $HAVE_OPENMPI -eq 0 || test "$MPI" = "openmpi"; then
    4047                echo "$n slots=$CPUCOUNT" >> $FILE
    41         elif test $HAVE_MPICH2 -eq 0; then
     48        elif test $HAVE_MPICH2 -eq 0 || test "$MPI" = "mpich2"; then
    4249                echo "$n:$CPUCOUNT" >> $FILE
    43         elif test $HAVE_LAM -eq 0; then
     50        elif test $HAVE_LAM -eq 0 || test "$MPI" = "lam"; then
    4451                echo "$n cpu=$CPUCOUNT" >> $FILE
    4552        else
  • bccd-ng/branches/fitz-devel/trees/home/bccd/hpl/hpl.build

    r2284 r2293  
    2929echo "---> Configuring HPL.dat"
    3030mv HPL.dat HPL.dat.orig
    31 /bin/bash ./hpl.configure > $ARCH/HPL.dat
     31perl $HOME/hpl/hpl.configure > HPL.dat
    3232if [ $? != 0 ]; then exit 1; fi
    3333
  • bccd-ng/branches/fitz-devel/trees/home/bccd/hpl/hpl.configure

    r2284 r2293  
    5757        # get amount of memory/node
    5858        if (-f "/proc/meminfo") {
    59                 $mem_raw=`grep ^MemTotal /proc/meminfo`;
     59                $mem_raw=`grep ^MemFree /proc/meminfo`;
    6060                (my $r, $mem, $unit) = split(/\s+/, $mem_raw, 3);
    6161
  • bccd-ng/branches/fitz-devel/trees/usr/local/etc/modules-remote/lam/7.1.4

    r1955 r2293  
    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/branches/fitz-devel/trees/usr/local/etc/modules-remote/mpich2/1.0.8

    r1955 r2293  
    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/branches/fitz-devel/trees/usr/local/etc/modules-remote/openmpi/1.2.9

    r2107 r2293  
    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/branches/fitz-devel/trees/usr/local/etc/modules/lam/7.1.4

    r1696 r2293  
    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/branches/fitz-devel/trees/usr/local/etc/modules/mpich2/1.2.1

    r2137 r2293  
    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/branches/fitz-devel/trees/usr/local/etc/modules/openmpi/1.4.0

    r2137 r2293  
    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.