]> Creatis software - clitk.git/blobdiff - cluster_tools/gate_job_cluster.job
Debug RTStruct conversion with empty struc
[clitk.git] / cluster_tools / gate_job_cluster.job
index 1242dfd06fd9ecb32e4fd9c20345f225b8d35354..be749e50f4f46e1627f219dfd3eb4de34425b2e7 100644 (file)
 #PBS -r n
 #PBS -l walltime=100:00:00
 #PBS -j oe
-
-#env
-#pwd
-#exit 1
+#PBS -l mem=3Gb
 
 
 function error {
@@ -43,7 +40,13 @@ echo "PARAM=${PARAM}"
 if test "$RELEASEDIR" = "NONE"
 then
        echo Using $(which Gate)
-       ldd $(which Gate)
+  unamestr=`uname`
+  if [[ "$unamestr" != 'Darwin' ]]; then
+      ldd $(which Gate)
+  else
+      ## ldd "equivalent" on osx is otool
+      otool -L $(which Gate)
+  fi
 else
        test -d "${RELEASEDIR}" || error "can't find release"
        md5sum ${RELEASEDIR}/Gate
@@ -67,7 +70,13 @@ echo "Copying inputs"
 LOCALMACRODIR=$(mktemp -d)
 trap "mv output ${OUTPUTDIR}/output.${PBS_JOBID%%.*} ; rm -r ${LOCALMACRODIR} ; exit 1" 1 2 3 15
 cd ${LOCALMACRODIR}
-cp -r -L "${MACRODIR}"/{data,mac} .
+unamestr=`uname`
+if [[ "$unamestr" == 'Darwin' ]]; then
+    ## cp is slightly different on OSX
+    cp -R -L "${MACRODIR}"/{data,mac} .
+else
+    cp -r -L "${MACRODIR}"/{data,mac} .
+fi
 mkdir output
 
 # Enforce one thread
@@ -77,7 +86,8 @@ echo "Lauching macro"
 date
 if test "$RELEASEDIR" = "NONE"
 then
-       Gate ${PARAM} ${MACROFILE} || error "gate failed"
+    echo Gate ${PARAM} ${MACROFILE}
+         eval Gate ${PARAM} ${MACROFILE} || error "gate failed"
 else
        LD_PRELOAD="${ROOTLIBS}${G4LIBS}${CLHEPLIBS}${GATELIBS}" \
        G4LEVELGAMMADATA="${RELEASEDIR}/PhotonEvaporation2.1" \
@@ -94,6 +104,7 @@ else
 fi
 
 echo "Copying data back"
+pwd
 mv output "${OUTPUTDIR}/output.${PBS_JOBID%%.*}"
 
 echo "Cleanup"