# Error of running population\_template

**URL:** <https://community.mrtrix.org/t/error-of-running-population-template/395>\
**Category:** Uncategorized\
**Created:** [August 16, 2016, 11:55pm UTC](https://community.mrtrix.org/t/error-of-running-population-template/395 "2016-08-16T23:55:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jianc](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/f1d935/32.png) [@jianc](https://community.mrtrix.org/u/jianc)\
**Post date:** [August 16, 2016, 11:55pm UTC](https://community.mrtrix.org/t/error-of-running-population-template/395/1 "2016-08-16T23:55:59Z")

</div>

Dear Mrtrix3 Expert,

I used 18 subjects to create the template.

mkdir transformed\_dir  
population\_template -transformed\_dir transformed\_dir -mask\_dir upsampled\_dwi\_mask upsampled\_FOD fod\_template.mif -force

After long time running I got following error.

There was no input\_transformed directory after long time population\_template command. I also got wronging of disk space, it said I have 1.6 G left. I guess the process using tmp directory, but don’t know if this is the issue.

Thanks in advance for the help.

…

```auto
Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_002.mif -template nl_template7.mif -warp_full warps_8/C_ALL_002.mif masks_transformed/C_ALL_002.mif -interp nearest -force
Command: mrregister /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_003.mif nl_template7.mif -type nonlinear -nl_niter 5 -nl_warp_full warps_8/L_ALL_003.mif -transformed input_transformed/L_ALL_003.mif -nl_update_smooth 2.0 -nl_disp_smooth 1.0 -nl_grad_step 0.5 -force -nl_init warps_7/L_ALL_003.mif -mask1 /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_003.mif -mask2 nl_template_mask7.mif -datatype float32 -nl_lmax 4
Command: rm warps_7/L_ALL_003.mif
Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_003.mif -template nl_template7.mif -warp_full warps_8/L_ALL_003.mif masks_transformed/L_ALL_003.mif -interp nearest -force
Command: mrmath input_transformed/L_ALL_026.mif input_transformed/C_ALL_031.mif input_transformed/C_ALL_079.mif input_transformed/L_ALL_011.mif input_transformed/L_ALL_043.mif input_transformed/C_ALL_002.mif input_transformed/C_ALL_065.mif input_transformed/L_ALL_038.mif input_transformed/L_ALL_016.mif input_transformed/L_ALL_014.mif input_transformed/L_ALL_025.mif input_transformed/L_ALL_037.mif input_transformed/L_ALL_003.mif input_transformed/C_ALL_067.mif input_transformed/L_ALL_001.mif input_transformed/L_ALL_023.mif input_transformed/C_ALL_066.mif input_transformed/L_ALL_012.mif mean nl_template8.mif
population_template:
population_template: [ERROR] Command failed: mrmath input_transformed/L_ALL_026.mif input_transformed/C_ALL_031.mif input_transformed/C_ALL_079.mif input_transformed/L_ALL_011.mif input_transformed/L_ALL_043.mif input_transformed/C_ALL_002.mif input_transformed/C_ALL_065.mif input_transformed/L_ALL_038.mif input_transformed/L_ALL_016.mif input_transformed/L_ALL_014.mif input_transformed/L_ALL_025.mif input_transformed/L_ALL_037.mif input_transformed/L_ALL_003.mif input_transformed/C_ALL_067.mif input_transformed/L_ALL_001.mif input_transformed/L_ALL_023.mif input_transformed/C_ALL_066.mif input_transformed/L_ALL_012.mif mean nl_template8.mif
population_template: Output of failed command:
population_template: Changing back to original directory (/isilon/data/jianc/ALL/mrtrix/FBA)
population_template: Deleting temporary directory /tmp/population_template-tmp-LIYMTQ/
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_065.mif -linear linear_transforms_initial/C_ALL_065.txt -datatype float32 masks_transformed/C_ALL_065_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrregister /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_026.mif average_header.mif -mask1 /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_026.mif -rigid_scale 1 -rigid_niter 0 -type rigid -noreorientation -rigid_init_translation mass -datatype float32 -rigid linear_transforms_initial/L_ALL_026.txt
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_026.mif -linear linear_transforms_initial/L_ALL_026.txt -datatype float32 input_transformed/L_ALL_026_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_026.mif -linear linear_transforms_initial/L_ALL_026.txt -datatype float32 masks_transformed/L_ALL_026_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrregister /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_001.mif average_header.mif -mask1 /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_001.mif -rigid_scale 1 -rigid_niter 0 -type rigid -noreorientation -rigid_init_translation mass -datatype float32 -rigid linear_transforms_initial/L_ALL_001.txt
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_001.mif -linear linear_transforms_initial/L_ALL_001.txt -datatype float32 input_transformed/L_ALL_001_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_001.mif -linear linear_transforms_initial/L_ALL_001.txt -datatype float32 masks_transformed/L_ALL_001_translated.mif
Command:: command not found

```

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [August 17, 2016, 3:24am UTC](https://community.mrtrix.org/t/error-of-running-population-template/395/2 "2016-08-17T03:24:50Z")

</div>

Hi Jian,

I’d suggest that you’ve encountered [the same problem as Manuel](https://community.mrtrix.org/t/error-response-function/393): The drive hosting the script temporary directory contents is running out of space. Unfortunately it’s not actually giving a useful error to inform you of such. You can use the `-tempdir` option when calling the script to manually specify the location of the temporary directory.

It looks like the subsequent errors are arising because you have copy&pasted lines from the terminal output of the script; e.g. from this exerpt:

```bash
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_065.mif -linear linear_transforms_initial/C_ALL_065.txt -datatype float32 masks_transformed/C_ALL_065_translated.mif
Command:: command not found

```

, the system sees the following as the instruction that you are trying to execute:

```bash
Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_065.mif -linear linear_transforms_initial/C_ALL_065.txt -datatype float32 masks_transformed/C_ALL_065_translated.mif

```

It’s therefore looking for a program on your system called “`Command:`”, and can’t find it.

Cheers  
Rob

---

<div class="post-metadata">

**Author:** ![jianc](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/f1d935/32.png) [@jianc](https://community.mrtrix.org/u/jianc)\
**Post date:** [August 17, 2016, 11:18pm UTC](https://community.mrtrix.org/t/error-of-running-population-template/395/3 "2016-08-17T23:18:43Z")

</div>

Thanks Rob! I have another try.

Jian

---

<div class="post-metadata">

**Author:** ![phmag](https://community.mrtrix.org/user_avatar/community.mrtrix.org/phmag/32/177_2.png) [@phmag](https://community.mrtrix.org/u/phmag)\
**Post date:** [August 18, 2016, 5:10am UTC](https://community.mrtrix.org/t/error-of-running-population-template/395/4 "2016-08-18T05:10:13Z")

</div>

I had the same issue when working on my data on the servers at The Austin. @Dave managed to figure out a workaround: I think either memory was cleared or we specified own temporary directory.  
I’ll be running this again soon and can let you know if I run into the same issues on different servers.

---

<div class="post-metadata">

**Author:** ![jianc](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/f1d935/32.png) [@jianc](https://community.mrtrix.org/u/jianc)\
**Post date:** [August 18, 2016, 11:30pm UTC](https://community.mrtrix.org/t/error-of-running-population-template/395/5 "2016-08-18T23:30:29Z")

</div>

Hi Bob

It works. Thank you.

Jian
