*: {wiki: BuildingHtcondorOnWindows Build HTCondor} and then zip it up. -{code} + +{term} REM assuming that you build HTCondor V8_4_0-branch in c:\scratch\build\condor REM izip is in the msconfig directory of your sources. -cd /d C:\scratch\build\condor\release_dir -izip -r ..\condor-8.4.0-339550-Windows-x86.zip * -{endcode} +> cd /d C:\scratch\build\condor\release_dir +> izip -r ..\condor-8.4.0-339550-Windows-x86.zip * +{endterm} For Personal HTCondor we use the tarball/zip release because this lets you control where the binaries will be installed, and will allow you have more than a single version of HTCondor running at once. @@ -35,12 +36,12 @@ {subsection: Unpack the HTCondor binaries (setting up "RELEASE_DIR")} We refer to the place where the HTCondor binaries live as RELEASE_DIR, you can unpack the archive to create this directory using the following commands. -{code} -> cd \scratch -> mkdir condor84 -> cd condor84 -> 7z x <path-to-archive>\condor-8.4.0-339550-Windows-x86.zip -{endcode} +{term} +cd \scratch +mkdir condor84 +cd condor84 +7z x <path-to-archive>\condor-8.4.0-339550-Windows-x86.zip +{endterm} The directory *\scratch\condor84* will now contain the HTCondor binaries, it will contain subdirectores bin, sbin, libexec, etc and several others. We call this directory *RELEASE_DIR*. @@ -48,67 +49,121 @@ HTCondor needs configuration files, and at least 3 runtime directories: log, spool and execute. Create configuration files by copying condor_config.generic from the etc directory and then editing it -{code} -> mkdir \scratch\local\condor84 -> mkdir \scratch\local\condor84\log -> mkdir \scratch\local\condor84\spool -> mkdir \scratch\local\condor84\execute -> copy \scratch\condor84\etc\condor_config.generic \scratch\condor84\condor_config -> notepad \scratch\condor84\condor_config -{endcode} +{term} +mkdir \scratch\local\condor84 +mkdir \scratch\local\condor84\log +mkdir \scratch\local\condor84\spool +mkdir \scratch\local\condor84\execute +copy \scratch\condor84\etc\condor_config.generic \scratch\condor84\condor_config +notepad \scratch\condor84\condor_config +{endterm} In your editor, find =RELEASE_DIR= and change the value to c:\scratch\condor84, and find =LOCAL_DIR=, remove the # and change the value to c:\scratch\local\condor84, -{code} +{snip : change condor_config} ## Where have you installed the bin, sbin and lib condor directories? RELEASE_DIR = C:\scratch\condor84 ## Where is the local condor directory for each host? This is where the local config file(s), logs and LOCAL_DIR = c:\scratch\local\condor84 -{endcode} +{endsnip} Then at the bottom of this file add -{code} +{snip: append to condor_config} use ROLE : Personal NETWORK_INTERFACE = 127.0.0.1 -{endcode} +{endsnip} If you plan to run more than a single instance of HTCondor on this machine, you will also need to create unique value for the procd_pipe on windows, and you _may_ want to configure a unique port for the Collector listen on. -{code} +{snip: add to condor_config.local} PROCD_ADDRESS = \\.\pipe\condor_procd_pipe8399 #optional COLLECTOR_HOST = $(CONDOR_HOST):8399 -{endcode} +{endsnip} {subsection: Setup your environment to run your Personal HTCondor} In order to start this Personal HTCondor or to use any of the HTCondor tools with it, you need to set the PATH and CONDOR_CONFIG environment variables. One way to do this it to create a small batch file and use it setup the environment. create this file in in your \scratch\condor84 directory. call it setenv.bat -{code} +{file: setenv.bat} set PATH=c:\scratch\condor84\bin;%PATH% set CONDOR_CONFIG=c:\scratch\condor84\condor_config -{endcode} +{endfile} {subsection: Run your Personal HTCondor} First, make sure that you will run the correct HTCondor. The =which= command can be used to find out if you will run the correct condor_master: -{code} +{term} > \scratch\condor84\setenv.bat > where condor_master \scratch\condor84\bin\condor_master.exe -{endcode} +{endterm} Then run condor_master: -{code} -start \scratch\condor84\bin\condor_master -f -{endcode} +{term} +> start \scratch\condor84\bin\condor_master -f +{endterm} Wait a second, and make sure that everything is running: -{code} -tasklist | findstr /i condor -{endcode} +{term} +> tasklist | findstr /i condor +{endterm} When you are done with your personal HTCondor, you can kill it with: -{code} -condor_off -master -{endcode} +{term} +> condor_off -master +{endterm} Remember you must use \scratch\condor84\setenv.bat or some other method to set the PATH and CONDOR_CONFIG and environment variables _before you start HTCondor or use an of the tools_. + +{subsection: Run a simple job on your Personal HTCondor} + +Create a simple script, call it simple.bat, it should print some output +and then exit - something like this: +{file: simple.bat} +echo This is a Simple job +echo This is the job's environment +env +{endfile} + +Create a HTCondor submit file to run this script, call it simple.sub it should have the following submit statements +{file: simple.sub} +executable = simple.bat +transfer_executable = true +should_transfer_files = yes +log = simple.log +output = simple.out +error = simple.err +{endfile} + +Run the following command to submit this job to HTCondor +{term} +> condor_submit simple.sub +{endterm} + +As soon as the job is successfully submitted, it will create a log file called simple.log that will contain something like this: +{term} +> type simple.log +000 (001.000.000) 09/24 14:03:54 Job submitted from host: <127.0.0.1:50558?addrs=127.0.0.1-50558> +... +{endterm} + +You can use the condor_q command to see the job in the SCHEDD +{term} +> condor_q + +-- Schedd: you@your-machine : <127.0.0.1:50558?... + ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD + 1.0 you 9/24 14:08 0+00:00:00 I 0 0.0 simple.bat + +1 jobs; 0 completed, 0 removed, 1 idle, 0 running, 0 held, 0 suspended +{endterm} + +If you don't see anything when you run condor_q, the job may have completed already. In that case, try condor_history + +{term} +> condor_history + ID OWNER SUBMITTED RUN_TIME ST COMPLETED CMD + 1.0 you 9/24 14:03 0+00:01:02 C 9/24 14:06 simple.bat +{endterm} + + +If the job does not run within a minute or two, there is most likely a configuration problem with your Personal HTCondor, See {wiki: BasicTroubleshootingPersonalHtcondor Basic Troubleshooting for a Personal HTCondor} for more information.