Author Topic: SGE problem  (Read 4391 times)

jbaltrus

  • Full Member
  • ***
  • Posts: 71
  • Karma: +0/-0
SGE problem
« on: December 18, 2010, 12:33:43 am »
I was wondering why my job would run serial on SGE. I have no experience with SGE so I just butchered the default PBS script, it runs but one job. I also get bunch of
/opt/gridengine/default/spool/compute-6-184/job_scripts/16485: line 13: setenv: command not found

here is my script:

#!/bin/bash

# Use current working directory
#$ -cwd
#
# Join stdout and stderr
#$ -j y
# Preserve current environmental variables
#$ -V
# Assign NPROC
#$ -pe orte 8

setenv TURBODIR /opt/turbomole62/TURBOMOLE
setenv TURBOTMPDIR /scratch

##### Parallel job
# Set environment variables for a MPI job

setenv PARA_ARCH MPI
setenv PARNODES 8
setenv HOSTS_FILE machines
limit stacksize unlimited

jobex -c 500 -energy 6 -gcart 3 -statpt -ri

echo "Job finished at: `date`"


antti_karttunen

  • Sr. Member
  • ****
  • Posts: 204
  • Karma: +1/-0
Re: SGE problem
« Reply #1 on: December 18, 2010, 11:07:11 am »
Hi,

As your job script appears to use csh-like commands (setenv, limit), the problem might be fixed if you tell SGE to use csh to run the script. Add the following two lines before the "#User current working directory"

## Run using csh
#$ -S /bin/csh

Antti

PS. I don't want to start a shell war here, but in the long run it might be more practical to convert the whole script to sh/bash/ksh. All scripts related to Turbomole are also written for sh-type shells so this might help to make things less confusing.

jbaltrus

  • Full Member
  • ***
  • Posts: 71
  • Karma: +0/-0
Re: SGE problem
« Reply #2 on: December 18, 2010, 08:10:13 pm »
it might have just helped!