Hi all,
>> So right now we have:
>>
>> CREAM sandbox -> WN /home/user/xxxx -> job execution -> stageout
>>
>> How I would like this to be:
>>
>> CREAM sandbox -> WN /home/user/xx -> move stuff to /scratch/xxxx -> job execution ->
>> stageout -> clean up /scratch
>
> You could put scripts cp_{1,2,3}.sh in $GLITE_LOCAL_CUSTOMIZATION_DIR
> in which you let the job change to a scratch directory and have that
> cleaned up when the job ends.
This is documented here:
https://wiki.italiangrid.it/twiki/bin/view/CREAM/SystemAdministratorGuideForEMI2#3_20_Job_wrapper_management
Example implementations of cp_1.sh and cp_3.sh (cp_2.sh not needed):
----------------------------------------------------------------------
#!/bin/sh
# cp_1.sh: this is _sourced_ by the CREAM job wrapper
my_initial_dir=`/bin/pwd`
my_local_job_dir=`mktemp -d /scratch/job-XXXXXXXXXX` || exit
cd $my_local_job_dir || exit
----------------------------------------------------------------------
----------------------------------------------------------------------
#!/bin/sh
# cp_3.sh: this is _sourced_ by the CREAM job wrapper
#
# move out of the area to be cleaned up;
# beware the initial directory might no longer exist
#
[ -d "${my_initial_dir:=/}" ] && cd "$my_initial_dir" || cd /
#
# impose sanity check on the local job directory string...
#
case "$my_local_job_dir" in
/scratch/job-*)
[ -d "$my_local_job_dir" ] && /bin/rm -r "$my_local_job_dir"
esac
----------------------------------------------------------------------
|