A brief note of how to use srmcp at the UCSD tier2 center from a job script.
I assume in this document that there already is a file in dcache that you want access to. If you want to copy into the dcache system via srmcp make sure your proxy and/or role has write access to the target area. Most areas are readable by any proxy.
From a Compute Node (Accessible via the Batch System)Create your job script in a shell language. Bash or the Bourne Shell are recommended and are what I use for testing. Make sure you source the $VDT_LOCATION/setup.sh in your script. You can then use srmcp in your script as; srmcp -debug=true srm://t2data2.sdsc.edu:8443/data4/cms/userdata/userdir/somefile.data file://localhost//state/data/osgtmp/out-$FNAME.file In this example we are transferring somefile.data to the local compute nodes temporary directory. A few notes
From the User Analysis Machines (eg. uaf-1.t2.ucsd.edu)source /data/vdt/setup.sh Then run srmcp srmcp -debug=true srm://t2data2.sdsc.edu:8443/data4/cms/userdata/username/file.data file://localhost//$PWD/file.data This should copy a file from the dcache system, via srmcp into the current directory and call the copied file file.data. |