Compiling or Testing Code with an Interactive Job
The CHTC has two "build" machines configured for compiling code
interactively. Furthermore, any CHTC execute server can be used for
testing commands and programs before submitting large batches of
non-interactive jobs ('typical' jobs like our
Typically, any compilable code to be run in CHTC should be compiled
on our compiling servers.
(Note: If you are using a non-CHTC submit server to submit jobs to a
non-CHTC HTCondor Pool, you may have different capabilities for
submitting jobs interactively that are not covered here.)
Though it's not essential, it may be easiest for you to create a tarball
with all necessary code and compiling sources/libraries that you'll need
for the interactive job, so that you don't have to list every file and/or
directory separately for "transfer_input_files" in the submit file.
For example, you could use something like the following command within a
directory where all of your needed files and directories are located:
[alice@submit]$ tar -czvf combined.tar.gz file1 file2 dir1 (etc.)
The above would produce a single file called "
that contains all other files and directories indicated at the end of the
2. Creating Interactive Submit Files
Create a file called interactive.sub (or any other
name you want), and paste in the below lines:
universe = vanilla
# Name the log file:
log = interactive.log
# Name the files where standard output and error should be saved:
output = process.out
error = process.err
# If you wish to compile code, you'll need the below lines.
# Otherwise, LEAVE THEM OUT if you just want to interactively test!
+IsBuildJob = true
requirements = (OpSysMajorVer =?= 6) && ( IsBuildSlot == true )
# Indicate all files that need to go into the interactive job session,
# including any tar files that you prepared:
transfer_input_files = combined.tar.gz, other_file.txt
# It's still important to request enough computing resources. The below
# values are a good starting point, but consider your file sizes for an
# estimate of "disk" and use any other information you might have
# for "memory" and/or "cpus".
request_cpus = 1
request_memory = 1GB
request_disk = 1GB
Modify the filenames for
log per your preferences.
Modify the filename for
indicate the source tarball you created.
SL6 vs CentOS 7
The above submit file will select for our Linux 6 (SL6- and
RHEL6-compatible) build machines by default. If your code needs
newer libraries or compilers that are present on CentOS 7 (our
new Linux version), change the "OpSysMajorVer" listed in the
requirements line from 6 to 7.
Code compiled on Linux 6
will typically run fine on CHTC's newer CentOS 7 servers, but code
compiled on version 7 will likely not work on version 6. To make
sure code compiled on CentOS 7 will only run on this version of Linux,
see our Operating System Transition guide,
section 3B, option 2.
3. Submitting and Working Interactively
When you are ready to go, enter the
following with your correct submit file indicated instead:
[alice@submit]$ condor_submit -i interactive.sub
After several minutes (the time it takes for HTCondor to match new jobs
to available CHTC execute servers), an SSH connection will be
created to an execute server, and the relevaant files will have been
transfered into the job working directory for you. From there, you can
un-tar any tar files and execute and compiling or test commands as you please.
Typical un-tar command:
[alice@build]$ tar -xzvf combined.tar.gz
When you are done working, make a new tarball of files you
want copied back to the submit server, and delete everything else that you don't want.
To exit as you would for any SSH shell, type
interactive job will be terminated, and you will return to the
location on the submit node from which you submitted the interactive
job. Any new files (your new tarball) will have been copied back to