date_cpu.sh 961 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash -l
  2. # Batch script to run a serial job under SGE.
  3. # Request ten minutes of wallclock time (format hours:minutes:seconds).
  4. #$ -l h_rt=0:10:0
  5. # Request 1 gigabyte of RAM (must be an integer followed by M, G, or T)
  6. #$ -l mem=1G
  7. # Request 15 gigabyte of TMPDIR space (default is 10 GB - remove if cluster is diskless)
  8. #$ -l tmpfs=15G
  9. # Set the name of the job.
  10. #$ -N Serial_Job
  11. # Set the working directory to somewhere in your scratch space.
  12. # This is a necessary step as compute nodes cannot write to $HOME.
  13. # Replace "<your_UCL_id>" with your UCL user ID.
  14. #$ -wd /home/rmhivau/Scratch/workspace
  15. # Your work should be done in $TMPDIR
  16. cd $TMPDIR
  17. # Run the application and put the output into a file called date.txt
  18. /bin/date > date.txt
  19. # Preferably, tar-up (archive) all output files onto the shared scratch area
  20. tar -zcvf $HOME/Scratch/files_from_job_$JOB_ID.tar.gz $TMPDIR
  21. # Make sure you have given enough time for the copy to complete!