我正在使用一个名为 bedpostx 的 fsl 工具,它用于将扩散模型拟合到我的(预处理的)数据中。问题是这个过程现在已经运行了超过 24 小时。我想通过可怜的人并行化来加速这个过程。为此,我应该在多个终端中运行 bedpostx_single_slice.sh,将其应用于一批切片。我不断收到错误。这是我在终端中启动的命令:
bedpostx_single_slice.sh Tirocinio/Dati_DTI/DTI_analysis_copy 37
第一个输入是包含我的数据的目录,37 是我要分析的第 i 个切片。这是我得到的错误:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
不幸的是,关于这个工具的文档并不多,而且我在编程方面还很陌生。
如果有帮助,下面是bedpostx_single_slice.sh 的脚本:
#!/bin/sh
# Copyright (C) 2012 University of Oxford
export LC_ALL=C
subjdir=$1
slice=$2
shift
shift
opts=$*
slicezp=`${FSLDIR}/bin/zeropad $slice 4`
${FSLDIR}/bin/xfibres\
--data=$subjdir/data_slice_$slicezp\
--mask=$subjdir/nodif_brain_mask_slice_$slicezp\
-b $subjdir/bvals -r $subjdir/bvecs\
--forcedir --logdir=$subjdir.bedpostX/diff_slices/data_slice_$slicezp \
$opts > $subjdir.bedpostX/logs/log$slicezp && echo Done && touch $subjdir.bedpostX/logs/monitor/$slice