Hi Steven,
I used Singularity.
Here is the script to call fMRIprep.
#!/bin/bash
#Read the input file list
while read -r input; do
subj=$(basename “$input”)
echo $input
#Place each job in the queue
cat > temp.sh <<EOF
#!/bin/bash
#SBATCH --job-name=Task_$subj
#SBATCH --mail-type=ALL
#SBATCH --mail-user=Email
#SBATCH --ntasks=2
#SBATCH --cpus-per-task=12
#SBATCH --mem-per-cpu=7gbs
#SBATCH --time=01-00:00:00
#SBATCH --output=Out_files/%x-%j.out
#SBATCH --account=GR
settup env
module load singularity
module load fsl/6.0.4
module load python/3.9.1
module load fmriprep/22.0.2
source ~/myPython39venv/bin/activate
python --version
cd /scratch/g/GR1/GR2/Task/PROJECT
chmod 777 ./fmriprep.sh
./fmriprep.sh subj >> Log_files/{subj}.log
EOF
chmod a+wrx temp.sh
sbatch temp.sh
done <"$1"
rm temp.sh
echo ‘All jobs send’
#Show that the job is queued
squeue -u whoami
Here is the fMRIprep.sh
#settup env
#User inputs:
bids_root_dir=/scratch/g/GR1/GR2/Task/PROJECT/bidstest5/
#subj=3172101920
subj=$1
nthreads=4
mem=40 #gb
container=singularity
#Begin:
#Convert virtual memory from gb to mb
mem=echo "${mem//[!0-9]/}"
#remove gb at end
mem_mb=echo $(((mem*1000)-5000))
#reduce some memory for buffer space during pre-processing
export FS_LICENSE=license.txt \
fmriprep $bids_root_dir $bids_root_dir/derivatives
participant
–participant-label $subj
–md-only-boilerplate
–fs-license-file /license.txt
–fs-no-reconall
–output-spaces MNI152NLin2009cAsym:res-2
–nthreads $nthreads
–mem_mb $mem_mb
–ignore slicetiming
–ignore fieldmaps
–use-syn-sdc
-w fmriprep_work_MID
The content in the subj_list.txt is
subj-ID
Below is the log output.
==========================================
SLURM_JOB_ID = 478028
SLURM_NODELIST = cn59
Python 3.9.1
Process Process-2:
Traceback (most recent call last):
File “/opt/conda/lib/python3.9/multiprocessing/process.py”, line 315, in _bootstrap
self.run()
File “/opt/conda/lib/python3.9/multiprocessing/process.py”, line 108, in run
self._target(*self._args, **self._kwargs)
File “/opt/conda/lib/python3.9/site-packages/fmriprep/cli/workflow.py”, line 114, in build_workflow
retval[“workflow”] = init_fmriprep_wf()
File “/opt/conda/lib/python3.9/site-packages/fmriprep/workflows/base.py”, line 91, in init_fmriprep_wf
single_subject_wf = init_single_subject_wf(subject_id)
File “/opt/conda/lib/python3.9/site-packages/fmriprep/workflows/base.py”, line 381, in init_single_subject_wf
raise ValueError(message)
ValueError: Fieldmap-less (SyN) estimation was requested, but PhaseEncodingDirection information appears to be absent.
Thanks for your help!
Nuttaon