U.S. CMS
Search
uscms.org  www 

Data and Computing Facility Operations

Facility Operations: Batch Systems bad examples


Do NOT do this, click here for good examples

5. How to I make sure my non-CRAB jobs are not accessing shared/NFS disk?

The LPC uses shared filesystems, /uscms/home, /uscms_data/d# and /uscmst1b_scratch/lpc1, between the worker nodes and the interactive nodes. Unfortunately, direct access to these shared filesystems from the workers can negatively affect performance for running jobs and more importantly for interactive users on the cmslpc nodes. The T1 team monitors for this activity and an automated system suspends ("holds") jobs when performance is slow and user jobs have too many open file descriptors to these shared filesystems. This short write-up is intended to help you avoid the NFS shared filesystems in your batch jobs.

Example #1: A Bad Example

This is an example of what not to do: this code will perform reads and writes on the shared filesystem directly from the batch job. It also changes the working directory right into the shared filesystem as well.
Do NOT do this, click here for good examples
 bad1.jdl (Note the use of the full path NFS to Output/Error/Log):

universe = vanilla
Executable = bad1.sh
Output = /uscms_data/d2/username/bad1.out
Error = /uscms_data/d2/username/bad1.err
Log = /uscms_data/d2/username/bad1.log


bad1.sh (Note the cd to the NFS mounted data area):

#!/bin/bash
# cms software setup
cd /uscms_data/d2/username
root -b -q bad1.C


bad1.C (Note the use of the full path NFS):

{
TFile f("/uscms_data/d2/username/input_file.root");
output_ntuples = process(f); // do some calculation
TFile g("/uscms_data/d2/username/output_file.root", "w");
g.write(output_ntuples);
}
 
BACK to good examples and batch documentation

Webmaster | Last modified: Tuesday, 04-Dec-2018 14:45:23 CST