[Neurodebian-users] Condor and ANTs

Arman Eshaghi arman.eshaghi at gmail.com
Mon Jan 13 16:47:01 UTC 2014


*My message does not deliver to list because of the attachment, I have
removed the attachment, but it was buildtemplateparallel.sh that ships with
ANTs package (so you can take a look yourself):*

Thanks Michael and Yury. You are right and there is no -n option in qsub.
Maybe if we could dig deeper and find the faulty code , I will change the
source code on github so others will not have my problem in future. I would
also like to change condor_qsub so that it embraces -n, but I'm very
suspicious that the '-n'  problem might not be simply the root issue.Also
it might only solve my problem (and not others in future that want to use
neurodebian with condor and ants).

Here is the snippet from buildtemplateparallel.sh that I think is causing
the problem. Please note $DOQSUB=1 will use SGE (and therefore condor_qsub
in our case) and the original script is attached.


'''
if [ "$RIGID" -eq 1 ] ;
    then
    count=0
    jobIDs=""

    RIGID_IMAGESET=""

    for IMG in $IMAGESETVARIABLE
      do

      RIGID_IMAGESET="$RIGID_IMAGESET rigid_${IMG}"

      BASENAME=` echo ${IMG} | cut -d '.' -f 1 `

      exe=" ${ANTSPATH}ANTS $DIM -m MI[${TEMPLATE},${IMG},1,32] -o
rigid_${IMG} -i 0 --use-Histogram-Matching --number-of-affine-iterations
10000x10000x10000x10000x10000 $RIGIDTYPE"
      exe2="${ANTSPATH}WarpImageMultiTransform $DIM ${IMG} rigid_${IMG}
rigid_${BASENAME}Affine${afftype} -R ${TEMPLATE}"
      pexe=" $exe >> job_${count}_metriclog.txt "

      qscript="job_${count}_qsub.sh"

      echo "$SCRIPTPREPEND" > $qscript

      echo "$exe" >> $qscript

      echo "$exe2" >> $qscript

     * if [ $DOQSUB -eq 1 ] ; then*
* id=`qsub -cwd -S /bin/bash -N antsBuildTemplate_rigid -v
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1,LD_LIBRARY_PATH=$LD_LIBRARY_PATH,ANTSPATH=$ANTSPATH
$QSUBOPTS $qscript | awk '{print $3}'`*
* jobIDs="$jobIDs $id"*
*     sleep 0.5*
  elif [ $DOQSUB -eq 4 ]; then
        echo "cp -R /jobtmp/pbstmp.\$PBS_JOBID/* ${currentdir}" >> $qscript;
id=`qsub -N antsrigid -v
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1,LD_LIBRARY_PATH=$LD_LIBRARY_PATH,ANTSPATH=$ANTSPATH
$QSUBOPTS -q nopreempt -l nodes=1:ppn=1 -l walltime=4:00:00 $qscript | awk
'{print $1}'`
jobIDs="$jobIDs $id"
    sleep 0.5
      elif  [ $DOQSUB -eq 2 ] ; then
  # Send pexe and exe2 to same job file so that they execute in series
  echo $pexe >> job${count}_r.sh
  echo $exe2 >> job${count}_r.sh
      elif  [ $DOQSUB -eq 3 ] ; then
id=`xgrid $XGRIDOPTS -job submit /bin/bash $qscript | awk
'{sub(/;/,"");print $3}' | tr '\n' ' ' | sed 's:  *: :g'`
#echo "xgrid $XGRIDOPTS -job submit /bin/bash $qscript"
jobIDs="$jobIDs $id"
      elif  [ $DOQSUB -eq 0 ] ; then
  # execute jobs in series
  $exe
  $exe2
      fi

      ((count++))
    done
'''





and here is the log using a few images, to make sure that the error is
actually '-n'.



'''
--------------------------------------------------------------------------------------
 No initial template exists. Creating a population average image from the
inputs.
--------------------------------------------------------------------------------------
.
.
.
.
--------------------------------------------------------------------------------------
 Start to build template: LonTehTemptemplate.nii.gz
--------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------
 Mapping parameters
--------------------------------------------------------------------------------------
 ANTSPATH is /usr/bin/

 Dimensionality:                        3
 N4BiasFieldCorrection:                 1
 Similarity Metric:                     CC
 Transformation:                        GR
 Regularization:
 MaxIterations:                         30x90x20
 Number Of MultiResolution Levels:      3
 OutputName prefix:                     LonTehTemp
 Template:                              LonTehTemptemplate.nii.gz
 Template Update Steps:                 4
 Template population:                    teh__000.03.nii.gz
teh_manual_filled_000.03.nii.gz teh__filled_000.03.nii.gz
teh_NMO_S_MOJADAM_filled_000.03.nii.gz teh_NMO_TAHEREH_filled_000.03.nii.gz
--------------------------------------------------------------------------------------
condor_qsub: unrecognized option '-n'
condor_qsub: unrecognized option '-n'
condor_qsub: unrecognized option '-n'
condor_qsub: unrecognized option '-n'
condor_qsub: unrecognized option '-n'
condor_qsub: unrecognized option '-n'

'''


On Mon, Jan 13, 2014 at 6:01 PM, Yury V. Zaytsev <yury at shurup.com> wrote:

> On Mon, 2014-01-13 at 15:25 +0100, Michael Hanke wrote:
> >
> > 4. Figure out what qsub -n does and try supporting it in condor_qsub
> >
> > However, I have trouble figuring out what -n is supposed to do. Any
> > hint?
>
> -N sets the name of the job, -n doesn't exist neither in SGE, nor in
> TORQUE, so I wonder where this comes from...
>
> --
> Sincerely yours,
> Yury V. Zaytsev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/neurodebian-users/attachments/20140113/bb1404b4/attachment-0001.html>


More information about the Neurodebian-users mailing list