source: /cluster/svnroot/bccd-ng/branches/sam-test_fw/packages/etc/skel/.bash_profile @ 3071

Last change on this file since 3071 was 3071, checked in by leemasa, 10 years ago

Put together more sophisticated system for getting boot flags from NIC (#534)

File size: 1.7 KB
Line 
1# ~/.BASH_profile: executed by bash(1) for login shells.
2# see /usr/share/doc/bash/examples/startup-files for examples.
3# the files are located in the bash-doc package.
4
5# the default umask is set in /etc/login.defs
6#umask 022
7
8# include .bashrc if it exists
9#if [ -f ~/.bashrc ]; then
10#    . ~/.bashrc
11#fi
12
13# set PATH so it includes user's private bin if it exists
14if [ -d ~/bin ] ; then
15    PATH=~/bin:"${PATH}"
16fi
17
18if [ -f $HOME/.firstlogin ]; then
19        $HOME/.firstlogin
20        mv $HOME/.firstlogin{,.moved}
21fi
22
23# Set MANPATH correctly
24export MANPATH=`/bin/bccd-getman`
25
26. /usr/local/Modules/3.2.6/init/bash
27#module load modules/remote-bccd
28module load modules
29module load PSC_DX cuda dreamm fftw openmpi jre mcell mpe xmpi c3
30
31# Alias some MPI commands to get X-forwarding working properly.
32alias mpirun='runmpi'
33alias mpiexec='runmpi'
34
35function runmpi () {
36        module list 2>&1 | egrep -q '[[:space:]]openmpi\/'
37        OMPI=$?
38        module list 2>&1 | egrep -q '[[:space:]]mpich2\/'
39        MPICH=$?
40
41        if [ $OMPI -eq 0 ]; then
42                OPTS="-x DISPLAY=`hostname -s`:0.0"
43        elif [ $MPICH -eq 0 ]; then
44                OPTS="-genv DISPLAY `hostname -s`:0.0"
45        fi
46
47        `which mpirun` $OPTS $@
48        return $?
49}
50
51if [ $DISPLAY ]; then
52        xhost + > /dev/null 2>&1
53fi
54
55if [ -f /testmode -a ! -z "$DISPLAY" ]; then
56        startx
57fi
58
59if [ `tty` == "/dev/pts/0" -a $HOSTNAME == "node000@bccd.net" ]; then
60if [ -f /controlgenerate ]; then
61echo "initiating automatic control generation
62some tests may take a little while"
63
64perl $HOME/tests/bccd_test_suite.pl -c --verbose --messy --mail
65echo "Please email developers@bccd.net
66and state that you have run the iso.
67Control generation complete.
68You may shut down your system."
69else
70echo "initiating test suite"
71perl $HOME/tests/bccd_test_suite.pl --verbose --messy --mail
72echo "test suite completed"
73fi
74fi
75
Note: See TracBrowser for help on using the repository browser.