Question: Will a serial job use only 50% of a dual node?
Answer: Yes, unless you write your script to explicitly take advantage of both processors.
Question: What happens if you run your executable on one of the CTC login machines?
Answer: If this is detected, your job will be killed. It is against CTC policy to run jobs on the login nodes. Running a program uses all the computing power and prevents interactive work. Commands stop working and everyone suffers. Failure to adhere to this policy can lead to a loss of computing privileges.
Question: Should I use echo statements in my bat script?
Answer: They may be useful when debugging a script, but are not required. In the batch system they are useful only for interactive jobs.
Question: Can I be notified by email when my job is finished?
Answer: Yes, add
call notify <email_address>"Batch job has ended"
to your script file.
Question: Is there any way to extend the time allocated to my batch job?
Answer: No. There's no way to implement this feature, as the backfill scheduling algorithm requires jobs to be of fixed duration.
Question: How do I delete a directory tree in batch?
Answer: To delete the files in
my_directory del /Q T:\<my_directory> To delete
my_directory and its subdirectories
rmdir /Q /S T:\<my_directory>
Question: Are there any batch file examples?
Answer: Yes. See
Batch File Examples.
Question: My batch jobs start, but they don't do anything. or My batch jobs used to work, but now they start and don't do anything. What is happening?
Answer: You need to register your password with
vsched -pa. If you changed your Windows password, but did not follow that with
vsched -pa this is the behavior you would see.
Question: Can there be a space between the <run> tag and the beginning of the run tag data?
Answer: No. The space will be interpreted as the first character of the data. Since your command does not start with a space, it will fail silently. The symptom is that the job won't do anything.
Question: Are there any issues to be aware of if there are spaces in the path in the run tag data?
Answer: Yes.
- If there is a space in the path, as with run dir but there are no command-line arguments, then there is nothing different in the syntax.
<run>\\tc.cornell.edu\tc\Users\usersname\run dir\myrun.bat</run>
- However, if you use command line arguments and your directory name includes run dir, you need double quotes around the command. The string should look like
<run>"\\tc.cornell.edu\tc\Users\username\run dir\myrun.bat" 1arg 2arg 3.1415926</run>
Question: Since not all applications handle spaces in names gracefully, how do you reference names with spaces in a .bat file?
Answer: There are two options, double quotes or the "~" syntax. (dir /x will show both versions of the name.) Suppose you want to set the variable ROOTDIR to a directory and the name of the directory is \\tc.cornell.edu\tc\Users\username\Batch Files.
set ROOTDIR="\\tc.cornell.edu\tc\Users\username\Batch Files"
-or-
set ROOTDIR=\\tc.cornell.edu\tc\Users\username\BATCHF~1