Hi Duncan,

Thanks a lot! It works like a charm!

One thing I am wondering if you also know -- does fsl_sub support the torque cluster system, in addition to SGE? If not, do you know if the next version of fsl_sub would support it?

Best,
Daniel

-- 
Daniel (Yung-Jui) Yang, Ph.D.
Postdoctoral Researcher
Yale Child Study Center
New Haven, CT
Tel: (203) 737-5454
E-mail: [log in to unmask]

On 4/14/14 10:29 AM, "Duncan Mortimer" <[log in to unmask]> wrote:

Hi Daniel,

You are correct, the fsl_sub script is at fault, something we identified independently a short while ago. The updated version will be included in the next FSL release, but in the meantime, please find attached the very latest version.

To install the patched version…

cd $FSLDIR
sudo tar zxf ~/Downloads/fsl_sub_apr_2014.tar.gz

assuming that the tar.gz file is in your ~/Downloads folder. You don’t need sudo if you installed FSL to a user-writeable location (e.g. not /usr/local).

Duncan

On 13 Apr 2014, at 03:36, Yang, Daniel <[log in to unmask]> wrote:

Hi Steve,
The system is a standalone MacOS and $SGE_ROOT is not specified (thus, I get blank by echo $SGE_ROOT)
I took a look at fsl_sub script. It appears that METHOD is set to be NONE in such situation and qconf is not supposed to be called. However, fsl_sub -q would still always call qconf, regardless of whether $SGE_ROOT is set, which leads to error message because I don't have qconf.
Best,
Daniel
--
Daniel (Yung-Jui) Yang, Ph.D.
Postdoctoral Researcher
Yale Child Study Center
New Haven, CT
Tel: (203) 737-5454
On 4/12/14 6:14 AM, "Stephen Smith" <[log in to unmask]> wrote:
Hi - what do you get from
echo $SGE_ROOT
Cheers.
On 12 Apr 2014, at 11:11, Yang, Daniel <[log in to unmask]> wrote:
Hi Steve,
Yes, I understand that SGE_ROOT must be properly specified in order to use fsl -l on a cluster.
However, the fix v1.06 script, it is not working properly for computers not on a cluster.
For example, using Mac OS, I will receive error message because the code (as following) calls qsub -q short.q (which in turn forces qsub to call qconf, which is not existing in Mac OS).
   2)
     echo "FIX Training classifier with output training file: $TRAIN and Melodic outputs list: $MELOUT"
     echo " copy true labels and features into training directory"
     /bin/rm -rf $TRAIN ${TRAIN}.RData
     mkdir -p $TRAIN; mycwd=`pwd`; cd $TRAIN; TRAIN=`pwd`; cd $mycwd
     j=1
     for i in $MELOUT ; do
       CheckFeatures $i
       jj=`zeropad $j 5`
       cp $i/hand_labels_noise.txt $TRAIN/${jj}.txt
       cp $i/fix/features.csv $TRAIN/${jj}.csv
       j=`echo "$j 1 + p" | dc -`
     done
     i=1
     while [ $i -lt 11 ] ; do
       echo " running classifier training"
       R CMD BATCH "--no-restore --no-save --args ${FSL_FIXDIR} ${TRAIN} ${TRAIN}.RData" ${FSL_FIXDIR}/fix_2a_train.R ${TRAIN}/.Rlog$i
       [ -f ${TRAIN}.RData ] && i=10000
       i=`echo "$i 1 + p" | dc -`
     done
     if [ $loo = 1 ] ; then
       echo $MELOUT > $TRAIN/.fixlist  
       echo " running LOO accuracy testing"
       LOO=${TRAIN}_LOO
       bLOO=`basename $LOO`
       /bin/rm -rf $LOO ${LOO}results; mkdir -p $LOO
       echo $MELOUT > $LOO/.fixlist
       j=1
       for f in $MELOUT ; do
         echo leaving-out: $f
         loof=`echo $MELOUT | awk '{$'$j'=""; print $0}'`
         jid=`fsl_sub -q short.q -l $LOO/$j ${FSL_FIXDIR}/fix -t $LOO/$j/$bLOO $loof`
         for d in 1 2 5 10 20 30 40 50 ; do
           jidd=`fsl_sub -j $jid -q short.q -l $LOO/${j}_$d ${FSL_FIXDIR}/fix -c $f $LOO/$j/${bLOO}.RData $d`
           if [ "$jids" = "" ] ; then
             jids="-j $jidd"
           else
             jids="${jids},$jidd"
           fi
         done
         j=`echo "$j 1 + p" | dc -`
       done
       jidf=`fsl_sub $jids -q short.q -l $LOO ${FSL_FIXDIR}/call_matlab.sh -f fix_2c_loo_results $LOO`
     fi
     ;;
--
Daniel (Yung-Jui) Yang, Ph.D.
Postdoctoral Researcher
Yale Child Study Center
New Haven, CT
Tel: (203) 737-5454
On 4/12/14 3:42 AM, "Stephen Smith" <[log in to unmask]> wrote:
Hi - you should not need that - this problem should only arise if you have SGE_ROOT incorrectly set when SGE has not been setup.
Cheers.
On 12 Apr 2014, at 08:26, Yang, Daniel <[log in to unmask]> wrote:
Hi all,
It turns out that this problem can be solved by the following:
replace all texts of "-q short.q" with blank in the "fix" script
It will force fix to do LOO sequentially rather than in parallel.
Hope this helps!
Daniel
On 4/11/14 10:19 PM, "Yang, Daniel" <[log in to unmask]> wrote:
Hi all,
Upon further examination, I can see where the problem is rooted.
fix -l called fsl_sub -q ...
and fsl_sub -q called qconf …
However, there is no qconf installed in the system. Thus, the error message.
Does anyone know how to fix this problem (e.g., let fix -l bypass fsl_sub -q)?
Best,
Daniel
--
Daniel (Yung-Jui) Yang, Ph.D.
Postdoctoral Researcher
Yale Child Study Center
New Haven, CT
Tel: (203) 737-5454
On 4/7/14 8:12 AM, "Yang, Daniel" <[log in to unmask]> wrote:
Hi Fsl list,
I am trying to trace down the problem by adding an alias line='head -1' in the fix script
Then I saw new error message when doing LOO: qconf command not found…
I can't find qconf in my cluster either. By the way, I didn't set up the following two commands because I cannot find them in my systems. Would these be causing problems?
   FSL_FIX_CIFTIRW='/vols/Data/HCP/workbench/CIFTIMatlabReaderWriter';
   FSL_FIX_WBC='/vols/Data/HCP/workbench/bin_linux64/wb_command';
Thanks, Daniel
---------------------------------------------------------------------------
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director,  Oxford University FMRIB Centre
FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222726  (fax 222717)
---------------------------------------------------------------------------
Stop the cultural destruction of Tibet
---------------------------------------------------------------------------
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director,  Oxford University FMRIB Centre
FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222726  (fax 222717)
---------------------------------------------------------------------------
Stop the cultural destruction of Tibet

--
Duncan A B Mortimer DPhil MChem
                Computing Officer, FMRIB Centre, University of Oxford,
              John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK.