Many condor pools have a condor macro defined called JAVA
which is the path to the JAVA executable.
If you can do
JAVAPATH=`condor_config_val JAVA`
PATH="$JAVAPATH:$PATH"
once you get to the worker node
it should work. Now your only trick is, how do you
find where the condor binaries are? Sometimes condor
binaries are not in the path. But if they are, the above will work.
Steve
On Thu, 23 Oct 2008, Tanzima Zerin Islam wrote:
Hi,
I have a script that runs some computation and based on their results
invoke a java program of mine.
For this, I have to set PATH variable to include the complete path to
java's
bin folder.
Now the question is, these machines in condor pool have different such
path
and I am trying to
figure out from within my script what that is. Here goes a simple script
that I have written and submitted to condor
to find out java bin's path, but with no luck.
#!/bin/sh
output=`which java`
echo $output
new_output=`ls -trl $output | awk '{ if($10 == "->"){print $11;} else
print
$9; }'`
new_output=`dirname $new_output`
echo "New : $new_output"
Now, in my machine when I run this script from command line, it shows the
correct output that is /opt/current/java/bin .
But when I send this script off to condor, I only get
New :
Thats it. Any idea why the output of which java is not coming out? By the
way, my condor submission script looks like this:
Universe = vanilla
Executable = java_path.sh
output = java-path.output
error = java-path.error
log = java-path.log
should_transfer_files = YES
transfer_input_files = java_path.sh
when_to_transfer_output = ON_EXIT_OR_EVICT
Requirements = (Disk >= 10) && (Memory >= 10) && (Arch == "X86_64") &&
(OpSys == "LINUX") && (HasJava == TRUE)
queue 1
Thanks in advance.
--
Tanzima Zerin Islam
Graduate Student
School of Electrical & Computer Engineering
Purdue University
--
------------------------------------------------------------------
Steven C. Timm, Ph.D (630) 840-8525
timm@xxxxxxxx http://home.fnal.gov/~timm/ <http://home.fnal.gov/%7Etimm/>
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Assistant Group
Leader.