RE: [Condor-users] Condor_exec.exe +Cygwin


Date: Wed, 9 Feb 2005 21:45:22 -0000
From: "Andrey Kaliazin" <A.Kaliazin@xxxxxxxxxxx>
Subject: RE: [Condor-users] Condor_exec.exe +Cygwin
Hi Ramzi,

As John said, nothing should be taken for granted, so it is up to you to set
up the system.
For example, all our Windows XP boxes
1) have cygwin installed in the same way into c:\cygwin folder
2) they have system variable set:
CYGWIN_ROOT=c:\cygwin

3) condor_config.local contains the following lines:
...
# These values can be tested in submit files with expression
# (TARGET.ENV_CYGWIN =?= "c:\cygwin")
ENV_CYGWIN      = "$ENV(CYGWIN_ROOT)"
ENV_LOCATION    = "$ENV(LOCATION_ROOM)"
STARTD_EXPRS = ENV_CYGWIN, ENV_LOCATION
SUBMIT_EXPRS =  "$(STARTD_EXPRS)"


Then the following submit file demonstrate how to launch a bash script -

# begin Condor submit file #############################################
#
universe = vanilla
# If True, condor_ submit behaves as if the -d command-line option is used.
SUBMIT_SKIP_FILECHECK = True
transfer_executable = False
transfer_files = ALWAYS
should_transfer_files = YES
when_to_transfer_output = on_exit
copy_to_spool = False
# We want to run this job on WinXP boxes with Cygwin installed
Requirements = (OpSys == "WINNT51") && (TARGET.ENV_CYGWIN =?= "c:\cygwin")
# make sure, that we have all we need on the path
environment =
path=$$(ENV_CYGWIN)\bin;c:\windows;c:\windows\system32;c:\progra~1\Condor\bi
n
# actual job is performed by the shell script
script_to_run = XP_name.sh
transfer_input_files = $(script_to_run)

arguments = $(script_to_run) myarg1 myarg2 \"mypar1=val1\"
executable = $$(ENV_CYGWIN)\bin\bash.exe 

output = $(script_to_run).$(cluster).$(process).out
#error = $(script_to_run).$(cluster).$(process).err
log = $(script_to_run).log

queue 5
# end Condor submit file ##########################################

and this is the corresponding script file, which does the job -

#!/bin/bash
echo 
echo ------------------------------------------------------------
echo "$0 running as " `id -un` " on " `uname  --nodename`
echo ------------------------------------------------------------
echo "time is now:       " `date`
echo ------------------------------------------------------------
echo "kernel name:       " `uname  --kernel-name`
echo "kernel release:    " `uname  --kernel-release`
echo "kernel version:    " `uname  --kernel-version`
echo "machine hardware:  " `uname  --machine`
#echo "processor type:    " `uname  --processor`
#echo "hardware platform: " `uname  --hardware-platform`
echo "operating system:  " `uname  --operating-system`
echo                       
#gcc -v 2>&1
#echo
echo --- Who else is here? -----------------------------------------
who
echo ------------------------------------------------------------
condor_version
echo End.


If you have to transfer MANY files for the job, then it maybe make sense to
zip them first
with the proper directory structure transfer and unzip them on the execution
node prior main
executable is launched via script. Or, just put them on a shared folder,
which can be mounted
permanently or dynamically from the script.

cheers,

Andrey
 

> -----Original Message-----
> From: condor-users-bounces@xxxxxxxxxxx 
> [mailto:condor-users-bounces@xxxxxxxxxxx] On Behalf Of Ramzi 
> KHASKHOUSSI
> Sent: Tuesday, February 08, 2005 4:01 PM
> To: 'Condor-Users Mail List'
> Subject: RE: [Condor-users] Condor_exec.exe +Cygwin
> 
> Hi JK and all,
> 
> I have written the run.bat as you indicated .
> I put my shell scripts in the argument part of the sub file: 
> "arguments=
> validation.sh"
> 
> but I get this error message in the validation.err:
>  	"bash.exe: warning: could not find /tmp, please create!
> 	 bash: line 1: validation: command not found".
> 
> Have you any idea about that.
> 
> Thanks,
> --Ramzi.
> 
> 
> 
> 
> -----Original Message-----
> From: condor-users-bounces@xxxxxxxxxxx
> [mailto:condor-users-bounces@xxxxxxxxxxx] On Behalf Of 
> Kewley, J (John)
> Sent: Tuesday, February 08, 2005 2:03 PM
> To: Condor-Users Mail List
> Subject: RE: [Condor-users] Condor_exec.exe +Cygwin
> 
> 
> > 				Executable = validation
> > ...
> > NB: The executable 'validation' is a shell script that
> > locally works fine on cygwin1.5.11!
> 
> I use a .bat script which XP and 2000 can understand. This 
> then calls bash,
> passing on all its params (or at least the first 9, I don't 
> know how to
> specify *ALL* params).
> 
> run.bat looks like:
> 
> =====
> bash -c "%1 %2 %3 %4 %5 %6 %7 %8 %9"
> =====
> 
> You obviously need to prepend your bash script to the 
> "arguments" list in
> your submit file.
> 
> That then works fine (on the assumption that bash is located 
> in the Windows
> path when invoked under condor.
> 
> The only other problem I had was that when I installed cygwin I had
> mistakenly done it for "my user only", not "all users" and 
> although Windows
> could see the bash executable it couldn't see the file 
> structure as expected
> by cygwin.
> 
> Good Luck.
> 
> JK
> 
> _______________________________________________
> Condor-users mailing list
> Condor-users@xxxxxxxxxxx
> http://lists.cs.wisc.edu/mailman/listinfo/condor-users
> 
> 
> _______________________________________________
> Condor-users mailing list
> Condor-users@xxxxxxxxxxx
> http://lists.cs.wisc.edu/mailman/listinfo/condor-users
> 


[← Prev in Thread] Current Thread [Next in Thread→]