Hi All,
I am parallelizing Mrtrix on a SGE server. I read the potential SGE issues but they’re not similar to my current issue.
When I try this command on the server terminal:
dwi2response dhollander dwi.mif wm.txt gm.txt csf.txt -voxels voxels.mif -mask mask.mif -scratch temp/ -force
it works, but when I place it in a bash file:
#!/bin/bash
#$ -l h_vmem=50000M,vf=50000M
#$ -M am983@duke.edu
#$ -m ea
#$ -o slurm-$JOB_ID.out
#$ -e slurm-$JOB_ID.out
#$ -N mrtrix
dwi2response dhollander dwi.mif wm.txt gm.txt csf.txt -voxels voxels.mif -mask mask.mif -scratch temp/ -force
and qsub the bash file on the server terminal:
qsub mrtrix.bash
I get the following errors:
dwi2response:
dwi2response: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.
dwi2response:
dwi2response: [WARNING] Output file voxels.mif' already exists; will be overwritten at script completion
dwi2response: [WARNING] Output file 'wm.txt' already exists; will be overwritten at script completion
dwi2response: [WARNING] Output file 'gm.txt' already exists; will be overwritten at script completion
dwi2response: [WARNING] Output file 'csf.txt' already exists; will be overwritten at script completion
dwi2response: [ERROR] Unhandled Python exception:
dwi2response: [ERROR] ValueError: No JSON object could be decoded
dwi2response: [ERROR] Traceback:
dwi2response: [ERROR] /usr/local/packages/mrtrix3/3.0.3/bin/dwi2response:83 (in execute())
dwi2response: [ERROR] if not grad_import_option and 'dw_scheme' not in image.Header(path.from_user(app.ARGS.input, False)).keyval():
dwi2response: [ERROR] /usr/local/packages/mrtrix3/3.0.3/lib/mrtrix3/image.py:46 (in __init__())
dwi2response: [ERROR] data = json.load(json_file)
dwi2response: [ERROR] /usr/lib64/python2.7/json/__init__.py:290 (in load())
dwi2response: [ERROR] **kw)
dwi2response: [ERROR] /usr/lib64/python2.7/json/__init__.py:338 (in loads())
dwi2response: [ERROR] return _default_decoder.decode(s)
dwi2response: [ERROR] /usr/lib64/python2.7/json/decoder.py:366 (in decode())
dwi2response: [ERROR] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
dwi2response: [ERROR] /usr/lib64/python2.7/json/decoder.py:384 (in raw_decode())
dwi2response: [ERROR] raise ValueError("No JSON object could be decoded")
This cluster wrapper bash file works with other MRtrix functions so far, such as mrconvert, dwi2tensor, tensor2metric.
Any thought ?
Thanks,