-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using antsApplyTransforms
to large data
#564
Comments
This appears to be a NIFTI library error. Are you sure you have sufficient disk space to write the file? |
@cookpa I believe I do (~8TB free) |
OK, then I think the error is caused by integer overflow: if size_t is 32 bits, then it would not be able to represent the size of the file. Do you have the latest ANTs? How did you compile? |
I compiled earlier today following the instructions here: https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Windows-10 |
There's no error if I run the command on a linux box. Something strange about WSL. |
If this is a memory issue, you can try expanding the swap size in Windows.
That should be reflected in WSL after a restart. Can't help you with exact
commands right now, don't remember them off the top of my head, but in one
occasion I had to do that to get passed a limited memory issue.
Dorian
…On Tue, Apr 10, 2018, 19:34 David Hoffman ***@***.***> wrote:
There's no error if I run the command on a linux box. Something strange
about WSL.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#564 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIqafcku2otFI4Ft08L_6HsseEgt-yDlks5tnUFtgaJpZM4TPCyP>
.
|
@dorianps I don't think it's a swap issue, I have plenty of RAM (512 GB). Plus, the swap in WSL is 2GB and the swap on the Linux box I used is 4GB. |
Related? It seems the WSL was setting the Linux swap size to a small value, resulting in memory allocation failures. The thread above suggests this is fixed in the "creators update", which might be worth a try if you don't already have it. |
The command to check memory and swap sizes in WSL should be:
free -m
My MS Surface with 8Gb RAM and Win10pro 1709 is showing this (values in Mb):
…On Tue, Apr 10, 2018 at 9:11 PM, Philip Cook ***@***.***> wrote:
Related?
microsoft/WSL#597 <microsoft/WSL#597>
It seems the WSL was setting the Linux swap size to a small value,
resulting in memory allocation failures. The thread above suggests this is
fixed in the "creators update", which might be worth a try if you don't
already have it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#564 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIqafeT_3SS00O5rKhtq19O6h6Xc1htdks5tnVhYgaJpZM4TPCyP>
.
|
This is what I get, again I don't think it's a memory issue
|
Just wondering, do you have the zlib library installed? It doesn't seem to
be among your installation instructions, although without it the error
should have appeared during the installation process.
…On Wed, Apr 11, 2018 at 3:08 PM, David Hoffman ***@***.***> wrote:
This is what I get, again I don't think it's a memory issue
***@***.***:~$ free -m
total used free shared buffers cached
Mem: 524204 82316 441888 17 33 184
-/+ buffers/cache: 82098 442105
Swap: 8192 21 8170
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#564 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIqafb_daxqLkxRbKkiBqZEmqxxJjkljks5tnlTGgaJpZM4TPCyP>
.
|
Sorry, just saw you have listed it there at the end.
…On Wed, Apr 11, 2018 at 3:14 PM, Dorian Pustina ***@***.***> wrote:
Just wondering, do you have the zlib library installed? It doesn't seem to
be among your installation instructions, although without it the error
should have appeared during the installation process.
On Wed, Apr 11, 2018 at 3:08 PM, David Hoffman ***@***.***>
wrote:
> This is what I get, again I don't think it's a memory issue
>
> ***@***.***:~$ free -m
> total used free shared buffers cached
> Mem: 524204 82316 441888 17 33 184
> -/+ buffers/cache: 82098 442105
> Swap: 8192 21 8170
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#564 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AIqafb_daxqLkxRbKkiBqZEmqxxJjkljks5tnlTGgaJpZM4TPCyP>
> .
>
|
@dorianps it did show as an error during compilation so I installed it (I also updated the instructions here). I have run into problems with some python libraries under windows because the default integer is |
The only other thing I can guess is some sort of lack of permissions to
write on the drive.
…On Wed, Apr 11, 2018 at 3:17 PM, Dorian Pustina ***@***.***> wrote:
Sorry, just saw you have listed it there at the end.
On Wed, Apr 11, 2018 at 3:14 PM, Dorian Pustina ***@***.***> wrote:
> Just wondering, do you have the zlib library installed? It doesn't seem
> to be among your installation instructions, although without it the error
> should have appeared during the installation process.
>
> On Wed, Apr 11, 2018 at 3:08 PM, David Hoffman ***@***.***>
> wrote:
>
>> This is what I get, again I don't think it's a memory issue
>>
>> ***@***.***:~$ free -m
>> total used free shared buffers cached
>> Mem: 524204 82316 441888 17 33 184
>> -/+ buffers/cache: 82098 442105
>> Swap: 8192 21 8170
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#564 (comment)>, or mute
>> the thread
>> <https://github.com/notifications/unsubscribe-auth/AIqafb_daxqLkxRbKkiBqZEmqxxJjkljks5tnlTGgaJpZM4TPCyP>
>> .
>>
>
>
|
@dorianps I doubt that, I had just run |
Thanks for the Wiki update @david-hoffman . From the WSL issue above,
As I read it, the swap size is the limiting factor here. According to your |
Did anyone solve this? I just got the same issue. I don't think it is memory, as it happened with one file (of several I was trying to save) that is relatively small: |
Is this still on WSL?
I am not using WSL much anymore, but if you are interested there are recent
docker images and scripts that run in Windows.
https://github.com/dorianps/docker
…On Thu, Nov 7, 2019, 8:54 PM zz10001 ***@***.***> wrote:
Did anyone solve this? I just got the same issue. I don't think it is
memory, as it happened with one file (of several I was trying to save) that
is relatively small:
** ERROR: NWAD: wrote only 0 of 3612672 bytes to file
(that can't be big enough to be a swap problem, can it?)
Have you sovle it? I have met the same trouble like this.
[image: image]
<https://user-images.githubusercontent.com/39954774/68442974-a7b97100-020d-11ea-9d18-c2495f3810ed.png>
but it really enough memrory and exist this file
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#564?email_source=notifications&email_token=ACFJU7MN5TLLYQBDE2SCYMDQSTBGBA5CNFSM4EZ4FSH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDOOTPI#issuecomment-551348669>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFJU7NZKPOTYO5L53EETULQSTBGBANCNFSM4EZ4FSHQ>
.
|
Sorry, It not on WSL, it occurs when I crop image to 64128128 use simpleitk |
I think there's probably more than one way to get this error. If the buffer can only write a subset of the data, this error will be generated. But the numbers reported may not be accurate in case of overflow or if there are I/O errors other than a short write. If you're seeing this error with ITK outside of ANTs then you might want to ask on the ITK forum. |
I’ve gotten this error when the disk was too full and the file could not be written.
…-Tom
On Nov 8, 2019, at 4:39 PM, Philip Cook ***@***.***> wrote:
I think there's probably more than one way to get this error. If the buffer can only write a subset of the data, this error will be generated. But the numbers reported may not be accurate in case of overflow or if there are I/O errors other than a short write.
If you're seeing this error with ITK outside of ANTs then you might want to ask on the ITK forum.
https://discourse.itk.org <https://discourse.itk.org/>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#564?email_source=notifications&email_token=ABHLFXKALPVA76CMUQOVQNDQSXMC7A5CNFSM4EZ4FSH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDTNP6Q#issuecomment-551999482>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABHLFXO2ZOBA4NFLKYQHJ7LQSXMC7ANCNFSM4EZ4FSHQ>.
|
Thanks for your help. |
Dead issue |
Same problem on Cent OS 7 Linux: 11821 Total elapsed time: 534.8
11822 ** ERROR: NWAD: wrote only 68812448 of 92274688 bytes to file
11823 ** ERROR: NWAD: wrote only 129105568** ERROR: NWAD: wrote only 392864 of 276824064 bytes to file
11824 Transform reader for /tmp/tmp6a11_1hd/warp1.nii.gz caught an ITK exception:
11825
11826 itk::ExceptionObject (0x351f3d0)
11827 Location: "unknown"
11828 File: /data/pnl/soft/pnlpipe3/pnlpipe/soft_dir/ANTs-build/ITKv5/Modules/IO/TransformBase/include/itkTransformFileReader.hxx
11829 Line: 129
11830 Description: itk::ERROR: TransformFileReaderTemplate(0x3512e80): Could not create Transform IO object for reading file /tmp/tmp6 a11_1hd/warp1.nii.gz
11831 Tried to create one of the following:
11832 HDF5TransformIOTemplate
11833 HDF5TransformIOTemplate
11834 MatlabTransformIOTemplate
11835 MatlabTransformIOTemplate
11836 TxtTransformIOTemplate
11837 TxtTransformIOTemplate
11838 You probably failed to set a file suffix, or
11839 set the suffix to an unsupported type.
11840
11841
11842 ** ERROR: NWAD: wrote only 67337888 of 92274688 bytes to file
11843 ** ERROR: NWAD: wrote only 64519840 of 92274688 bytes to file
11844 ** ERROR: NWAD: wrote only 64224928 of 92274688 bytes to file
11845 ** ERROR: NWAD: wrote only 50888352 of 92274688 bytes to file
11846 ** ERROR: NWAD: wrote only 62881440 of 92274688 bytes to file
11847 ** ERROR: NWAD: wrote only 65732256 of 92274688 bytes to file
11848 ** ERROR: NWAD: wrote only 63995552 of 92274688 bytes to file
11849 ** ERROR: NWAD: wrote only 44203680 of 92274688 bytes to file
11850 ** ERROR: NWAD: wrote only 63110816 of 92274688 bytes to file
11851 ** ERROR: NWAD: wrote only 63078048 of 92274688 bytes to file
On the following host:
My NIFTI data type:
As @cookpa mentioned, I think it is related to my little swap memory. Edit: |
I get this error when using
antsApplyTransforms
to large data.The text was updated successfully, but these errors were encountered: