Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Memory leak while building #44

Closed
akats opened this issue Jun 29, 2016 · 1 comment
Closed

Memory leak while building #44

akats opened this issue Jun 29, 2016 · 1 comment

Comments

@akats
Copy link

akats commented Jun 29, 2016

When I follow the directions to build the package, I get a memory leak at this step:

anatoliy@ubuntu:~/Downloads/SimpleElastix/build$ make
[ 16%] Built target ITK
[ 32%] Built target PCRE
[ 48%] Built target Swig
[ 51%] Performing build step for 'elastix'
[  3%] Built target elxCommon
[  5%] Built target param
[  6%] Built target xoutlib
[  6%] Built target mevisdcmtiff
[ 11%] Built target elxCore
[ 12%] Built target RandomCoordinateSampler
[ 13%] Built target GridSampler
[ 14%] Built target FullSampler
[ 14%] Built target RandomSampler
[ 15%] Built target MultiInputRandomCoordinateSampler
[ 16%] Built target RandomSamplerSparseMask
[ 17%] Building CXX object src/Components/MovingImagePyramids/MovingShrinkingPyramid/CMakeFiles/MovingShrinkingPyramid.dir/elxMovingShrinkingPyramid.cxx.o

My computer memory usage maxes out eventually (I have 12 GB), and the computer freezes. I have no idea why this may be happening. I can include the contents of my build folder after cmake if that helps. Thanks.

@kaspermarstal
Copy link
Member

This is more likely due to the fact that elastix is compiled for all pixel types and thus requires a large amount of memory. The compilation of pyramid components is memory intensive in particular. We are currently looking into reducing the amount of memory at this stage. In the meantime, you may set USE_ALL_PIXELTYPES to OFF in the SuperBuild/External_Elastix.cmake file. You will then have support for 2D float images, 3D float and short images, and 4D short images. Images of other types can be cast using SimpleITK's Cast() method. Compiling in Release mode may also reduce the memory consumption.

Let me know how it goes!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants