Pascal's Weblog
The Grid...



Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
Click me to subscribe
Search

Links
 

Today's Page Hits: 20

« Grid Engine crash... | Main | Distributed Mersenne... »
Friday Aug 18, 2006
Learning the hard way!
I learnt this one the hard way!

Do not harcode environment variables as the location of commands (e.g., Grid commands) could change. DO NOT do something like:

#!/bin/ksh
#$ -N Test_qstat
#$ -cwd

SGETOOLS=/home/sgeadmin/n1ge60/bin/sol-x86
export SGETOOLS

echo "Starting Test program..."
$SGETOOLS/qstat
echo "End Test program..."



Instead use:

#!/bin/ksh
#$ -N Test_qstat
#$ -cwd

# Set the environment variables
if [ -f $HOME/.profile ]; then
   . $HOME/.profile
fi

echo "Starting Test program..."
echo `which qstat`
qstat
echo "End Test program..."

Posted at 02:24PM Aug 18, 2006 by Pascal Ledru in Grid Computing  |  Comments[0]

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed