# General registration(BRAINS) error"LBFGSB optimizer does not support scaling. All scales are set to one. "

**URL:** <https://discourse.slicer.org/t/general-registration-brains-error-lbfgsb-optimizer-does-not-support-scaling-all-scales-are-set-to-one/7780>\
**Category:** Support\
**Tags:** registration\
**Created:** [July 27, 2019, 1:22pm UTC](https://discourse.slicer.org/t/general-registration-brains-error-lbfgsb-optimizer-does-not-support-scaling-all-scales-are-set-to-one/7780 "2019-07-27T13:22:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11126](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/11126/32/4272_2.png) [@11126](https://discourse.slicer.org/u/11126)\
**Post date:** [July 27, 2019, 1:22pm UTC](https://discourse.slicer.org/t/general-registration-brains-error-lbfgsb-optimizer-does-not-support-scaling-all-scales-are-set-to-one/7780/1 "2019-07-27T13:22:01Z")

</div>

I am trying to do general registration according to the tutorial. I have completed the linear transform but when I tried to apply BSpline transform it completed with error:

General Registration (BRAINS) standard error:

WARNING: In D:\D\P\Slicer-0-build\ITK\Modules\Numerics\Optimizersv4\src\itkLBFGSBOptimizerv4.cxx, line 113LBFGSBOptimizerv4 (0000027566CF45A0): LBFGSB optimizer does not support scaling. All scales are set to one.

Exception during registration:

itk::ExceptionObject (000000E4F3BC3BC0)  
Location: “unknown”  
File: d:\d\p\slicer-0-build\brainstools\brainscommonlib\BRAINSFitHelperTemplate.hxx  
Line: 1552  
Description: itk::ERROR: Exception caught:  
itk::ExceptionObject (000000E4F3BC2C40)  
Location: “unknown”  
File: D:\D\P\Slicer-0-build\ITK\Modules\Core\Common\src\itkPoolMultiThreader.cxx  
Line: 154  
Description: itk::ERROR: PoolMultiThreader(0000027566CA90D0): Exception occurred during SingleMethodExecutebad allocation

 ![V5%7DC(YC_3154LF%60ALV%40_XCR](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/0/6034ae679ff91b72ab0022bef2837a7d54374b11.png)

I really don’t know why because I’m doing exactly according to the tutorial. Can anyone help me solve this issue? Thank you in advance!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 28, 2019, 6:51pm UTC](https://discourse.slicer.org/t/general-registration-brains-error-lbfgsb-optimizer-does-not-support-scaling-all-scales-are-set-to-one/7780/2 "2019-07-28T18:51:04Z")

</div>

Hi - I think the scaling issue is just a warning and not the real issue.

> [@11126](#):
>
> bad allocation

This almost always means you’ve run out of memory, so maybe try on a bigger machine or allocate more virtual memory.

On the other hand it’s not clear why memory is an issue if there are just two MR volumes. Maybe best to try with just the `Rigid`option and see if that works. If you are still having trouble let us know which tutorial and where - maybe something has changed and it’s broken.
