[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] How to find Java bin Path in different machines of condor



Another possibility is to ask your sysadmins to add STARTD_EXPRS = JAVA to their execute node configs. You can then use $$ to reference JAVA from the ad of the machine your job is running on, e.g. arguments = script $$(JAVA).

Best,


matt

Tanzima Zerin Islam wrote:
Thank you Steven, this was a great help.

Tan

On Thu, Oct 23, 2008 at 9:15 PM, Steven Timm <timm@xxxxxxxx> wrote:

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.





------------------------------------------------------------------------

_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at: https://lists.cs.wisc.edu/archive/condor-users/