From eskild at gmail.com Mon Jun 8 09:33:42 2015 From: eskild at gmail.com (Simon Eskildsen) Date: Mon, 8 Jun 2015 15:33:42 +0200 Subject: [MINC-users] mincaverage error Message-ID: Hi all, Averaging a bunch of deformation fields using mincaverage, I got this error: HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line 679 in H5Aget_space(): can't get space ID of attribute major: Invalid arguments to routine minor: Can't get value #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c line 719 in H5A_get_space(): unable to register dataspace atom major: Object atom minor: Unable to register new atom #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 in H5I_register(): no IDs available in type major: Object atom minor: Out of IDs for group HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line 1383 in H5Screate_simple(): unable to register dataspace ID major: Object atom minor: Unable to register new atom #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 in H5I_register(): no IDs available in type major: Object atom minor: Out of IDs for group (from miicv_get): Should not happen! Setting -debug flag does not provide further information. Ideas for debugging this are very welcome. Simon From robert.d.vincent at mcgill.ca Mon Jun 8 09:46:18 2015 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Mon, 8 Jun 2015 09:46:18 -0400 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Hi Simon, It looks like HDF5 might be running out of resource ids, which seems unlikely, but there could be a resource leak somewhere. Can you give me the details of the failing case (e.g. the files you're using)? -bert On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen wrote: > Hi all, > > Averaging a bunch of deformation fields using mincaverage, I got this > error: > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line 679 in > H5Aget_space(): can't get space ID of attribute > major: Invalid arguments to routine > minor: Can't get value > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c line 719 in > H5A_get_space(): unable to register dataspace atom > major: Object atom > minor: Unable to register new atom > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 in > H5I_register(): no IDs available in type > major: Object atom > minor: Out of IDs for group > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line 1383 in > H5Screate_simple(): unable to register dataspace ID > major: Object atom > minor: Unable to register new atom > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 in > H5I_register(): no IDs available in type > major: Object atom > minor: Out of IDs for group > (from miicv_get): Should not happen! > > Setting -debug flag does not provide further information. > > Ideas for debugging this are very welcome. > > Simon > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From matthijs at mouseimaging.ca Mon Jun 8 15:45:43 2015 From: matthijs at mouseimaging.ca (Matthijs van Eede) Date: Mon, 8 Jun 2015 15:45:43 -0400 (EDT) Subject: [MINC-users] Determining memory usage for minctracc calls Message-ID: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> Hi all, We are trying to determine/estimate how much memory a minctracc call will use depending on the file resolution, number of voxels and the step size used in the minctracc call. So far we have not been able to fit the memory data we've gathered in a way that can predict memory usage for a wide range of input resolutions. One of the things we realized is that minctracc uses (at least one) memory saving strategy: if a mask is provided for the registration, the bounding box for the region of interest is determined, and only that volume is used for the actual registration. Does any know of any other memory saving strategies that minctracc uses? Or is there anyone who might have an intuition on how the memory usage should vary on file size and step size / resolution? Thanks in advance, Matthijs From a.janke at gmail.com Mon Jun 8 15:50:58 2015 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 9 Jun 2015 05:50:58 +1000 Subject: [MINC-users] Determining memory usage for minctracc calls In-Reply-To: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> References: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> Message-ID: Hi Matthijs, I too have attempted to work this out in the past but failed! There is something strange going on in there though as once you go past an input file of about 1GB things go awry. It's something that has been on my todo list for a long time so I'm very happy if you fix it for me! Last time I went hunting for this things were going strange in the grid sub-sampling. Remember also that minctracc will convert to various filetypes (typically short) when using the -mi objective function. A while back there was also a change from rescaled short deformation grids to double to get around some range issues. a On 9 June 2015 at 05:45, Matthijs van Eede wrote: > Hi all, > > We are trying to determine/estimate how much memory a minctracc call will use depending on the file resolution, number of voxels and the step size used in the minctracc call. So far we have not been able to fit the memory data we've gathered in a way that can predict memory usage for a wide range of input resolutions. > > One of the things we realized is that minctracc uses (at least one) memory saving strategy: if a mask is provided for the registration, the bounding box for the region of interest is determined, and only that volume is used for the actual registration. Does any know of any other memory saving strategies that minctracc uses? Or is there anyone who might have an intuition on how the memory usage should vary on file size and step size / resolution? > > Thanks in advance, > Matthijs > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From gdevenyi at gmail.com Mon Jun 8 15:51:51 2015 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Mon, 8 Jun 2015 15:51:51 -0400 Subject: [MINC-users] Determining memory usage for minctracc calls In-Reply-To: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> References: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> Message-ID: I can't offer an answer, but I wonder whether Valgrind (http://valgrind.org/) could be used to analyze the memory usage as a function of the input parameters to create some kind of lookup table? -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Mon, Jun 8, 2015 at 3:45 PM, Matthijs van Eede wrote: > Hi all, > > We are trying to determine/estimate how much memory a minctracc call will > use depending on the file resolution, number of voxels and the step size > used in the minctracc call. So far we have not been able to fit the memory > data we've gathered in a way that can predict memory usage for a wide range > of input resolutions. > > One of the things we realized is that minctracc uses (at least one) memory > saving strategy: if a mask is provided for the registration, the bounding > box for the region of interest is determined, and only that volume is used > for the actual registration. Does any know of any other memory saving > strategies that minctracc uses? Or is there anyone who might have an > intuition on how the memory usage should vary on file size and step size / > resolution? > > Thanks in advance, > Matthijs > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From eskild at gmail.com Tue Jun 9 03:14:42 2015 From: eskild at gmail.com (Simon Eskildsen) Date: Tue, 9 Jun 2015 09:14:42 +0200 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Hi Robert, I'm averaging 38 deformation fields. Here's the info on one of them: $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc image: signed__ float -10.166246414184570312 to 11.006509780883789062 image dimensions: xspace yspace zspace vector_dimension dimension name length step start -------------- ------ ---- ----- xspace 388 0.5 -96.5 yspace 460 0.5 -132.5 zspace 388 0.5 -78.5 vector_dimension 3 unknown unknown The files are quite big (~800 Mb each). Could this be a memory problem? I used mincaverage without any flags/options. Just a list of files in and a file out. Simon On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < robert.d.vincent at mcgill.ca> wrote: > Hi Simon, > > It looks like HDF5 might be running out of resource ids, which seems > unlikely, but there could be a resource leak somewhere. > > Can you give me the details of the failing case (e.g. the files you're > using)? > > -bert > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen wrote: > > > Hi all, > > > > Averaging a bunch of deformation fields using mincaverage, I got this > > error: > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line 679 in > > H5Aget_space(): can't get space ID of attribute > > major: Invalid arguments to routine > > minor: Can't get value > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c line 719 > in > > H5A_get_space(): unable to register dataspace atom > > major: Object atom > > minor: Unable to register new atom > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 in > > H5I_register(): no IDs available in type > > major: Object atom > > minor: Out of IDs for group > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line 1383 in > > H5Screate_simple(): unable to register dataspace ID > > major: Object atom > > minor: Unable to register new atom > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 in > > H5I_register(): no IDs available in type > > major: Object atom > > minor: Out of IDs for group > > (from miicv_get): Should not happen! > > > > Setting -debug flag does not provide further information. > > > > Ideas for debugging this are very welcome. > > > > Simon > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Tue Jun 9 04:12:06 2015 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 9 Jun 2015 18:12:06 +1000 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: If it's memory, try mincbigaverage. google knows where it is. a On 09/06/2015 5:15 PM, "Simon Eskildsen" wrote: > Hi Robert, > > I'm averaging 38 deformation fields. Here's the info on one of them: > > $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > image: signed__ float -10.166246414184570312 to 11.006509780883789062 > image dimensions: xspace yspace zspace vector_dimension > dimension name length step start > -------------- ------ ---- ----- > xspace 388 0.5 -96.5 > yspace 460 0.5 -132.5 > zspace 388 0.5 -78.5 > vector_dimension 3 unknown unknown > > The files are quite big (~800 Mb each). Could this be a memory problem? > > I used mincaverage without any flags/options. Just a list of files in and a > file out. > > Simon > > On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < > robert.d.vincent at mcgill.ca> wrote: > > > Hi Simon, > > > > It looks like HDF5 might be running out of resource ids, which seems > > unlikely, but there could be a resource leak somewhere. > > > > Can you give me the details of the failing case (e.g. the files you're > > using)? > > > > -bert > > > > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen > wrote: > > > > > Hi all, > > > > > > Averaging a bunch of deformation fields using mincaverage, I got this > > > error: > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line 679 > in > > > H5Aget_space(): can't get space ID of attribute > > > major: Invalid arguments to routine > > > minor: Can't get value > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c line > 719 > > in > > > H5A_get_space(): unable to register dataspace atom > > > major: Object atom > > > minor: Unable to register new atom > > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 > in > > > H5I_register(): no IDs available in type > > > major: Object atom > > > minor: Out of IDs for group > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line 1383 > in > > > H5Screate_simple(): unable to register dataspace ID > > > major: Object atom > > > minor: Unable to register new atom > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 > in > > > H5I_register(): no IDs available in type > > > major: Object atom > > > minor: Out of IDs for group > > > (from miicv_get): Should not happen! > > > > > > Setting -debug flag does not provide further information. > > > > > > Ideas for debugging this are very welcome. > > > > > > Simon > > > _______________________________________________ > > > MINC-users at bic.mni.mcgill.ca > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From eskild at gmail.com Tue Jun 9 04:24:17 2015 From: eskild at gmail.com (Simon Eskildsen) Date: Tue, 9 Jun 2015 10:24:17 +0200 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Thanks. I'm trying this now. I assume same behaviour as mincaverage, right? On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke wrote: > If it's memory, try mincbigaverage. google knows where it is. > > a > On 09/06/2015 5:15 PM, "Simon Eskildsen" wrote: > > > Hi Robert, > > > > I'm averaging 38 deformation fields. Here's the info on one of them: > > > > $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > image: signed__ float -10.166246414184570312 to 11.006509780883789062 > > image dimensions: xspace yspace zspace vector_dimension > > dimension name length step start > > -------------- ------ ---- ----- > > xspace 388 0.5 -96.5 > > yspace 460 0.5 -132.5 > > zspace 388 0.5 -78.5 > > vector_dimension 3 unknown unknown > > > > The files are quite big (~800 Mb each). Could this be a memory problem? > > > > I used mincaverage without any flags/options. Just a list of files in > and a > > file out. > > > > Simon > > > > On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < > > robert.d.vincent at mcgill.ca> wrote: > > > > > Hi Simon, > > > > > > It looks like HDF5 might be running out of resource ids, which seems > > > unlikely, but there could be a resource leak somewhere. > > > > > > Can you give me the details of the failing case (e.g. the files you're > > > using)? > > > > > > -bert > > > > > > > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen > > wrote: > > > > > > > Hi all, > > > > > > > > Averaging a bunch of deformation fields using mincaverage, I got this > > > > error: > > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line 679 > > in > > > > H5Aget_space(): can't get space ID of attribute > > > > major: Invalid arguments to routine > > > > minor: Can't get value > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c line > > 719 > > > in > > > > H5A_get_space(): unable to register dataspace atom > > > > major: Object atom > > > > minor: Unable to register new atom > > > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 > > in > > > > H5I_register(): no IDs available in type > > > > major: Object atom > > > > minor: Out of IDs for group > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line > 1383 > > in > > > > H5Screate_simple(): unable to register dataspace ID > > > > major: Object atom > > > > minor: Unable to register new atom > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line 902 > > in > > > > H5I_register(): no IDs available in type > > > > major: Object atom > > > > minor: Out of IDs for group > > > > (from miicv_get): Should not happen! > > > > > > > > Setting -debug flag does not provide further information. > > > > > > > > Ideas for debugging this are very welcome. > > > > > > > > Simon > > > > _______________________________________________ > > > > MINC-users at bic.mni.mcgill.ca > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > _______________________________________________ > > > MINC-users at bic.mni.mcgill.ca > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Tue Jun 9 04:37:24 2015 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 9 Jun 2015 18:37:24 +1000 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: supports most options yes. Will be identical apart from very small rounding errors. take note of the options for defining the number to average at once. a On 09/06/2015 6:25 PM, "Simon Eskildsen" wrote: > Thanks. I'm trying this now. I assume same behaviour as mincaverage, right? > > On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke wrote: > > > If it's memory, try mincbigaverage. google knows where it is. > > > > a > > On 09/06/2015 5:15 PM, "Simon Eskildsen" wrote: > > > > > Hi Robert, > > > > > > I'm averaging 38 deformation fields. Here's the info on one of them: > > > > > > $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > > file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > > image: signed__ float -10.166246414184570312 to 11.006509780883789062 > > > image dimensions: xspace yspace zspace vector_dimension > > > dimension name length step start > > > -------------- ------ ---- ----- > > > xspace 388 0.5 -96.5 > > > yspace 460 0.5 -132.5 > > > zspace 388 0.5 -78.5 > > > vector_dimension 3 unknown unknown > > > > > > The files are quite big (~800 Mb each). Could this be a memory problem? > > > > > > I used mincaverage without any flags/options. Just a list of files in > > and a > > > file out. > > > > > > Simon > > > > > > On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < > > > robert.d.vincent at mcgill.ca> wrote: > > > > > > > Hi Simon, > > > > > > > > It looks like HDF5 might be running out of resource ids, which seems > > > > unlikely, but there could be a resource leak somewhere. > > > > > > > > Can you give me the details of the failing case (e.g. the files > you're > > > > using)? > > > > > > > > -bert > > > > > > > > > > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen > > > wrote: > > > > > > > > > Hi all, > > > > > > > > > > Averaging a bunch of deformation fields using mincaverage, I got > this > > > > > error: > > > > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line > 679 > > > in > > > > > H5Aget_space(): can't get space ID of attribute > > > > > major: Invalid arguments to routine > > > > > minor: Can't get value > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c > line > > > 719 > > > > in > > > > > H5A_get_space(): unable to register dataspace atom > > > > > major: Object atom > > > > > minor: Unable to register new atom > > > > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line > 902 > > > in > > > > > H5I_register(): no IDs available in type > > > > > major: Object atom > > > > > minor: Out of IDs for group > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line > > 1383 > > > in > > > > > H5Screate_simple(): unable to register dataspace ID > > > > > major: Object atom > > > > > minor: Unable to register new atom > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line > 902 > > > in > > > > > H5I_register(): no IDs available in type > > > > > major: Object atom > > > > > minor: Out of IDs for group > > > > > (from miicv_get): Should not happen! > > > > > > > > > > Setting -debug flag does not provide further information. > > > > > > > > > > Ideas for debugging this are very welcome. > > > > > > > > > > Simon > > > > > _______________________________________________ > > > > > MINC-users at bic.mni.mcgill.ca > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > > > _______________________________________________ > > > > MINC-users at bic.mni.mcgill.ca > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > _______________________________________________ > > > MINC-users at bic.mni.mcgill.ca > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From eskild at gmail.com Tue Jun 9 04:47:20 2015 From: eskild at gmail.com (Simon Eskildsen) Date: Tue, 9 Jun 2015 10:47:20 +0200 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Does it mean I can safely replace mincaverage in xfmavg with mincbigaverage? Why hasn't already? On Tue, Jun 9, 2015 at 10:37 AM, Andrew Janke wrote: > supports most options yes. Will be identical apart from very small rounding > errors. > > take note of the options for defining the number to average at once. > > a > On 09/06/2015 6:25 PM, "Simon Eskildsen" wrote: > > > Thanks. I'm trying this now. I assume same behaviour as mincaverage, > right? > > > > On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke wrote: > > > > > If it's memory, try mincbigaverage. google knows where it is. > > > > > > a > > > On 09/06/2015 5:15 PM, "Simon Eskildsen" wrote: > > > > > > > Hi Robert, > > > > > > > > I'm averaging 38 deformation fields. Here's the info on one of them: > > > > > > > > $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > > > file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > > > image: signed__ float -10.166246414184570312 to 11.006509780883789062 > > > > image dimensions: xspace yspace zspace vector_dimension > > > > dimension name length step start > > > > -------------- ------ ---- ----- > > > > xspace 388 0.5 -96.5 > > > > yspace 460 0.5 -132.5 > > > > zspace 388 0.5 -78.5 > > > > vector_dimension 3 unknown unknown > > > > > > > > The files are quite big (~800 Mb each). Could this be a memory > problem? > > > > > > > > I used mincaverage without any flags/options. Just a list of files in > > > and a > > > > file out. > > > > > > > > Simon > > > > > > > > On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < > > > > robert.d.vincent at mcgill.ca> wrote: > > > > > > > > > Hi Simon, > > > > > > > > > > It looks like HDF5 might be running out of resource ids, which > seems > > > > > unlikely, but there could be a resource leak somewhere. > > > > > > > > > > Can you give me the details of the failing case (e.g. the files > > you're > > > > > using)? > > > > > > > > > > -bert > > > > > > > > > > > > > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen > > > > wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > Averaging a bunch of deformation fields using mincaverage, I got > > this > > > > > > error: > > > > > > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c line > > 679 > > > > in > > > > > > H5Aget_space(): can't get space ID of attribute > > > > > > major: Invalid arguments to routine > > > > > > minor: Can't get value > > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c > > line > > > > 719 > > > > > in > > > > > > H5A_get_space(): unable to register dataspace atom > > > > > > major: Object atom > > > > > > minor: Unable to register new atom > > > > > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line > > 902 > > > > in > > > > > > H5I_register(): no IDs available in type > > > > > > major: Object atom > > > > > > minor: Out of IDs for group > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c line > > > 1383 > > > > in > > > > > > H5Screate_simple(): unable to register dataspace ID > > > > > > major: Object atom > > > > > > minor: Unable to register new atom > > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c line > > 902 > > > > in > > > > > > H5I_register(): no IDs available in type > > > > > > major: Object atom > > > > > > minor: Out of IDs for group > > > > > > (from miicv_get): Should not happen! > > > > > > > > > > > > Setting -debug flag does not provide further information. > > > > > > > > > > > > Ideas for debugging this are very welcome. > > > > > > > > > > > > Simon > > > > > > _______________________________________________ > > > > > > MINC-users at bic.mni.mcgill.ca > > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > > > > > _______________________________________________ > > > > > MINC-users at bic.mni.mcgill.ca > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > > > _______________________________________________ > > > > MINC-users at bic.mni.mcgill.ca > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > _______________________________________________ > > > MINC-users at bic.mni.mcgill.ca > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Tue Jun 9 04:49:13 2015 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 9 Jun 2015 18:49:13 +1000 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: that's the idea. it is in mine... a On 09/06/2015 6:48 PM, "Simon Eskildsen" wrote: > Does it mean I can safely replace mincaverage in xfmavg with > mincbigaverage? Why hasn't already? > > On Tue, Jun 9, 2015 at 10:37 AM, Andrew Janke wrote: > > > supports most options yes. Will be identical apart from very small > rounding > > errors. > > > > take note of the options for defining the number to average at once. > > > > a > > On 09/06/2015 6:25 PM, "Simon Eskildsen" wrote: > > > > > Thanks. I'm trying this now. I assume same behaviour as mincaverage, > > right? > > > > > > On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke > wrote: > > > > > > > If it's memory, try mincbigaverage. google knows where it is. > > > > > > > > a > > > > On 09/06/2015 5:15 PM, "Simon Eskildsen" wrote: > > > > > > > > > Hi Robert, > > > > > > > > > > I'm averaging 38 deformation fields. Here's the info on one of > them: > > > > > > > > > > $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > > > > file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc > > > > > image: signed__ float -10.166246414184570312 to > 11.006509780883789062 > > > > > image dimensions: xspace yspace zspace vector_dimension > > > > > dimension name length step start > > > > > -------------- ------ ---- ----- > > > > > xspace 388 0.5 -96.5 > > > > > yspace 460 0.5 -132.5 > > > > > zspace 388 0.5 -78.5 > > > > > vector_dimension 3 unknown unknown > > > > > > > > > > The files are quite big (~800 Mb each). Could this be a memory > > problem? > > > > > > > > > > I used mincaverage without any flags/options. Just a list of files > in > > > > and a > > > > > file out. > > > > > > > > > > Simon > > > > > > > > > > On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < > > > > > robert.d.vincent at mcgill.ca> wrote: > > > > > > > > > > > Hi Simon, > > > > > > > > > > > > It looks like HDF5 might be running out of resource ids, which > > seems > > > > > > unlikely, but there could be a resource leak somewhere. > > > > > > > > > > > > Can you give me the details of the failing case (e.g. the files > > > you're > > > > > > using)? > > > > > > > > > > > > -bert > > > > > > > > > > > > > > > > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen < > eskild at gmail.com> > > > > > wrote: > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > Averaging a bunch of deformation fields using mincaverage, I > got > > > this > > > > > > > error: > > > > > > > > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c > line > > > 679 > > > > > in > > > > > > > H5Aget_space(): can't get space ID of attribute > > > > > > > major: Invalid arguments to routine > > > > > > > minor: Can't get value > > > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c > > > line > > > > > 719 > > > > > > in > > > > > > > H5A_get_space(): unable to register dataspace atom > > > > > > > major: Object atom > > > > > > > minor: Unable to register new atom > > > > > > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c > line > > > 902 > > > > > in > > > > > > > H5I_register(): no IDs available in type > > > > > > > major: Object atom > > > > > > > minor: Out of IDs for group > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: > > > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c > line > > > > 1383 > > > > > in > > > > > > > H5Screate_simple(): unable to register dataspace ID > > > > > > > major: Object atom > > > > > > > minor: Unable to register new atom > > > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c > line > > > 902 > > > > > in > > > > > > > H5I_register(): no IDs available in type > > > > > > > major: Object atom > > > > > > > minor: Out of IDs for group > > > > > > > (from miicv_get): Should not happen! > > > > > > > > > > > > > > Setting -debug flag does not provide further information. > > > > > > > > > > > > > > Ideas for debugging this are very welcome. > > > > > > > > > > > > > > Simon > > > > > > > _______________________________________________ > > > > > > > MINC-users at bic.mni.mcgill.ca > > > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > > > > > > > _______________________________________________ > > > > > > MINC-users at bic.mni.mcgill.ca > > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > > > > > _______________________________________________ > > > > > MINC-users at bic.mni.mcgill.ca > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > > > _______________________________________________ > > > > MINC-users at bic.mni.mcgill.ca > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > > > _______________________________________________ > > > MINC-users at bic.mni.mcgill.ca > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From matthijs at mouseimaging.ca Tue Jun 9 09:29:48 2015 From: matthijs at mouseimaging.ca (Matthijs van Eede) Date: Tue, 9 Jun 2015 09:29:48 -0400 (EDT) Subject: [MINC-users] Determining memory usage for minctracc calls In-Reply-To: References: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> Message-ID: <2081287503.948425.1433856588155.JavaMail.zimbra@mouseimaging.ca> Hi Andrew, Knowing that you have attempted to solve this but failed/gave up, spells trouble :-) So far we used valgrind, something that worked well for getting a memory profile for mincANTS and mincblur (which uses a file size dependent amount of tmp space, something that threw us off while running on a system where tmp space was allocated as part of the machine's memory). But it looks like the only way to get this right, is to dig into the actual code. If we end up getting to the bottom of this, we'll report back! Cheers, Matthijs ----- Original Message ----- From: "Andrew Janke" To: "MINC users mailing list" Sent: Monday, June 8, 2015 3:50:58 PM Subject: Re: [MINC-users] Determining memory usage for minctracc calls Hi Matthijs, I too have attempted to work this out in the past but failed! There is something strange going on in there though as once you go past an input file of about 1GB things go awry. It's something that has been on my todo list for a long time so I'm very happy if you fix it for me! Last time I went hunting for this things were going strange in the grid sub-sampling. Remember also that minctracc will convert to various filetypes (typically short) when using the -mi objective function. A while back there was also a change from rescaled short deformation grids to double to get around some range issues. a On 9 June 2015 at 05:45, Matthijs van Eede wrote: > Hi all, > > We are trying to determine/estimate how much memory a minctracc call will use depending on the file resolution, number of voxels and the step size used in the minctracc call. So far we have not been able to fit the memory data we've gathered in a way that can predict memory usage for a wide range of input resolutions. > > One of the things we realized is that minctracc uses (at least one) memory saving strategy: if a mask is provided for the registration, the bounding box for the region of interest is determined, and only that volume is used for the actual registration. Does any know of any other memory saving strategies that minctracc uses? Or is there anyone who might have an intuition on how the memory usage should vary on file size and step size / resolution? > > Thanks in advance, > Matthijs > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users _______________________________________________ MINC-users at bic.mni.mcgill.ca http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From matthijs at mouseimaging.ca Tue Jun 9 09:36:36 2015 From: matthijs at mouseimaging.ca (Matthijs van Eede) Date: Tue, 9 Jun 2015 09:36:36 -0400 (EDT) Subject: [MINC-users] Determining memory usage for minctracc calls In-Reply-To: References: <1688138135.943772.1433792743802.JavaMail.zimbra@mouseimaging.ca> Message-ID: <2142076831.948494.1433856996684.JavaMail.zimbra@mouseimaging.ca> Hi Gabriel, This is (basically) what we've done until now. We want to get away from this approach to make our code run more easily on varying types of input files (specifically at SciNet). Looks like this is one of those trade-offs between spending time going through the code and updating the lookup table when new data comes along... Cheers, Matthijs ----- Original Message ----- From: "Gabriel Devenyi" To: "MINC users mailing list" Sent: Monday, June 8, 2015 3:51:51 PM Subject: Re: [MINC-users] Determining memory usage for minctracc calls I can't offer an answer, but I wonder whether Valgrind (http://valgrind.org/) could be used to analyze the memory usage as a function of the input parameters to create some kind of lookup table? -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Mon, Jun 8, 2015 at 3:45 PM, Matthijs van Eede wrote: > Hi all, > > We are trying to determine/estimate how much memory a minctracc call will > use depending on the file resolution, number of voxels and the step size > used in the minctracc call. So far we have not been able to fit the memory > data we've gathered in a way that can predict memory usage for a wide range > of input resolutions. > > One of the things we realized is that minctracc uses (at least one) memory > saving strategy: if a mask is provided for the registration, the bounding > box for the region of interest is determined, and only that volume is used > for the actual registration. Does any know of any other memory saving > strategies that minctracc uses? Or is there anyone who might have an > intuition on how the memory usage should vary on file size and step size / > resolution? > > Thanks in advance, > Matthijs > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > _______________________________________________ MINC-users at bic.mni.mcgill.ca http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From robert.d.vincent at mcgill.ca Thu Jun 11 10:07:26 2015 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Thu, 11 Jun 2015 10:07:26 -0400 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Hi all, I have a partial fix for this issue. The voxel_loop code enforces a maximum number of open files based on the constant MI_MAX_NUM_ICV, which is currently set to 32. The way the code is written, if it cannot open all of the files, it opens them one at a time. This causes some serious overhead that seems to lead to an out-of-resource condition in the HDF5 library. I will continue to investigate whether we can fix the resource leak, but in the short run I will increase the number allowable open files to something more realistic, like 1000. This can be done by changing the value of MI_MAX_NUM_ICV in minc.h. -bert On Thu, Jun 11, 2015 at 10:06 AM, Robert D. Vincent wrote: > Hi all, > > I have a partial fix for this issue. The voxel_loop code enforces a > maximum number of open files based on the constant MI_MAX_NUM_ICV, which is > currently set to 32. The way the code is written, if it cannot open all of > the files, it opens them one at a time. This causes some serious overhead > that seems to lead to an out-of-resource condition in the HDF5 library. > > I will continue to investigate whether we can fix the resource leak, but > in the short run I will increase the number allowable open files to > something more realistic, like 1000. This can be done by changing the value > of MI_MAX_NUM_ICV in minc.h. > > -bert > > On Tue, Jun 9, 2015 at 4:49 AM, Andrew Janke wrote: > >> that's the idea. it is in mine... >> >> a >> On 09/06/2015 6:48 PM, "Simon Eskildsen" wrote: >> >> > Does it mean I can safely replace mincaverage in xfmavg with >> > mincbigaverage? Why hasn't already? >> > >> > On Tue, Jun 9, 2015 at 10:37 AM, Andrew Janke >> wrote: >> > >> > > supports most options yes. Will be identical apart from very small >> > rounding >> > > errors. >> > > >> > > take note of the options for defining the number to average at once. >> > > >> > > a >> > > On 09/06/2015 6:25 PM, "Simon Eskildsen" wrote: >> > > >> > > > Thanks. I'm trying this now. I assume same behaviour as mincaverage, >> > > right? >> > > > >> > > > On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke >> > wrote: >> > > > >> > > > > If it's memory, try mincbigaverage. google knows where it is. >> > > > > >> > > > > a >> > > > > On 09/06/2015 5:15 PM, "Simon Eskildsen" >> wrote: >> > > > > >> > > > > > Hi Robert, >> > > > > > >> > > > > > I'm averaging 38 deformation fields. Here's the info on one of >> > them: >> > > > > > >> > > > > > $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc >> > > > > > file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc >> > > > > > image: signed__ float -10.166246414184570312 to >> > 11.006509780883789062 >> > > > > > image dimensions: xspace yspace zspace vector_dimension >> > > > > > dimension name length step start >> > > > > > -------------- ------ ---- ----- >> > > > > > xspace 388 0.5 -96.5 >> > > > > > yspace 460 0.5 -132.5 >> > > > > > zspace 388 0.5 -78.5 >> > > > > > vector_dimension 3 unknown unknown >> > > > > > >> > > > > > The files are quite big (~800 Mb each). Could this be a memory >> > > problem? >> > > > > > >> > > > > > I used mincaverage without any flags/options. Just a list of >> files >> > in >> > > > > and a >> > > > > > file out. >> > > > > > >> > > > > > Simon >> > > > > > >> > > > > > On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < >> > > > > > robert.d.vincent at mcgill.ca> wrote: >> > > > > > >> > > > > > > Hi Simon, >> > > > > > > >> > > > > > > It looks like HDF5 might be running out of resource ids, which >> > > seems >> > > > > > > unlikely, but there could be a resource leak somewhere. >> > > > > > > >> > > > > > > Can you give me the details of the failing case (e.g. the >> files >> > > > you're >> > > > > > > using)? >> > > > > > > >> > > > > > > -bert >> > > > > > > >> > > > > > > >> > > > > > > On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen < >> > eskild at gmail.com> >> > > > > > wrote: >> > > > > > > >> > > > > > > > Hi all, >> > > > > > > > >> > > > > > > > Averaging a bunch of deformation fields using mincaverage, I >> > got >> > > > this >> > > > > > > > error: >> > > > > > > > >> > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: >> > > > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c >> > line >> > > > 679 >> > > > > > in >> > > > > > > > H5Aget_space(): can't get space ID of attribute >> > > > > > > > major: Invalid arguments to routine >> > > > > > > > minor: Can't get value >> > > > > > > > #001: >> /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c >> > > > line >> > > > > > 719 >> > > > > > > in >> > > > > > > > H5A_get_space(): unable to register dataspace atom >> > > > > > > > major: Object atom >> > > > > > > > minor: Unable to register new atom >> > > > > > > > #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c >> > line >> > > > 902 >> > > > > > in >> > > > > > > > H5I_register(): no IDs available in type >> > > > > > > > major: Object atom >> > > > > > > > minor: Out of IDs for group >> > > > > > > > HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: >> > > > > > > > #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c >> > line >> > > > > 1383 >> > > > > > in >> > > > > > > > H5Screate_simple(): unable to register dataspace ID >> > > > > > > > major: Object atom >> > > > > > > > minor: Unable to register new atom >> > > > > > > > #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c >> > line >> > > > 902 >> > > > > > in >> > > > > > > > H5I_register(): no IDs available in type >> > > > > > > > major: Object atom >> > > > > > > > minor: Out of IDs for group >> > > > > > > > (from miicv_get): Should not happen! >> > > > > > > > >> > > > > > > > Setting -debug flag does not provide further information. >> > > > > > > > >> > > > > > > > Ideas for debugging this are very welcome. >> > > > > > > > >> > > > > > > > Simon >> > > > > > > > _______________________________________________ >> > > > > > > > MINC-users at bic.mni.mcgill.ca >> > > > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > > > > > > >> > > > > > > _______________________________________________ >> > > > > > > MINC-users at bic.mni.mcgill.ca >> > > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > > > > > >> > > > > > _______________________________________________ >> > > > > > MINC-users at bic.mni.mcgill.ca >> > > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > > > > >> > > > > _______________________________________________ >> > > > > MINC-users at bic.mni.mcgill.ca >> > > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > > > >> > > > _______________________________________________ >> > > > MINC-users at bic.mni.mcgill.ca >> > > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > > >> > > _______________________________________________ >> > > MINC-users at bic.mni.mcgill.ca >> > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > >> > _______________________________________________ >> > MINC-users at bic.mni.mcgill.ca >> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > From a.janke at gmail.com Thu Jun 11 10:28:47 2015 From: a.janke at gmail.com (Andrew Janke) Date: Fri, 12 Jun 2015 00:28:47 +1000 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Hi Bert, What you are proposing sounds reasonable. Peter and I investigated doing this a long time back and did increase it from its original value. Perhaps it is time to increase it again, as I recall there were problems when we made the figure too high but can't remember details. If Peter is still lurking he might join in... Any chance you can both increase the default and also set an ENV var for it so that it can be changed at runtime? ta a On 12 June 2015 at 00:07, Robert D. Vincent wrote: > Hi all, > > I have a partial fix for this issue. The voxel_loop code enforces a maximum > number of open files based on the constant MI_MAX_NUM_ICV, which is > currently set to 32. The way the code is written, if it cannot open all of > the files, it opens them one at a time. This causes some serious overhead > that seems to lead to an out-of-resource condition in the HDF5 library. > > I will continue to investigate whether we can fix the resource leak, but in > the short run I will increase the number allowable open files to something > more realistic, like 1000. This can be done by changing the value of > MI_MAX_NUM_ICV in minc.h. > > -bert From vladimir.fonov at gmail.com Thu Jun 11 10:38:51 2015 From: vladimir.fonov at gmail.com (Vladimir S. FONOV) Date: Thu, 11 Jun 2015 10:38:51 -0400 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: <55799D7B.9030500@gmail.com> Hello, well, this is interesting. I can imagine that we will have to do something about it to make MINC even remotely attractive to the masses. One of the attractive features was ability to handle very large datasets that wouldn't fit into memory. Otherwise - it's very difficult to explain why even bother with MINC these days. On 15-06-11 10:07 AM, Robert D. Vincent wrote: > Hi all, > > I have a partial fix for this issue. The voxel_loop code enforces a maximum > number of open files based on the constant MI_MAX_NUM_ICV, which is > currently set to 32. The way the code is written, if it cannot open all of > the files, it opens them one at a time. This causes some serious overhead > that seems to lead to an out-of-resource condition in the HDF5 library. > > I will continue to investigate whether we can fix the resource leak, but in > the short run I will increase the number allowable open files to something > more realistic, like 1000. This can be done by changing the value of > MI_MAX_NUM_ICV in minc.h. > > -bert > > On Thu, Jun 11, 2015 at 10:06 AM, Robert D. Vincent > wrote: > >> Hi all, >> >> I have a partial fix for this issue. The voxel_loop code enforces a >> maximum number of open files based on the constant MI_MAX_NUM_ICV, which is >> currently set to 32. The way the code is written, if it cannot open all of >> the files, it opens them one at a time. This causes some serious overhead >> that seems to lead to an out-of-resource condition in the HDF5 library. >> >> I will continue to investigate whether we can fix the resource leak, but >> in the short run I will increase the number allowable open files to >> something more realistic, like 1000. This can be done by changing the value >> of MI_MAX_NUM_ICV in minc.h. >> >> -bert >> >> On Tue, Jun 9, 2015 at 4:49 AM, Andrew Janke wrote: >> >>> that's the idea. it is in mine... >>> >>> a >>> On 09/06/2015 6:48 PM, "Simon Eskildsen" wrote: >>> >>>> Does it mean I can safely replace mincaverage in xfmavg with >>>> mincbigaverage? Why hasn't already? >>>> >>>> On Tue, Jun 9, 2015 at 10:37 AM, Andrew Janke >>> wrote: >>>> >>>>> supports most options yes. Will be identical apart from very small >>>> rounding >>>>> errors. >>>>> >>>>> take note of the options for defining the number to average at once. >>>>> >>>>> a >>>>> On 09/06/2015 6:25 PM, "Simon Eskildsen" wrote: >>>>> >>>>>> Thanks. I'm trying this now. I assume same behaviour as mincaverage, >>>>> right? >>>>>> >>>>>> On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke >>>> wrote: >>>>>> >>>>>>> If it's memory, try mincbigaverage. google knows where it is. >>>>>>> >>>>>>> a >>>>>>> On 09/06/2015 5:15 PM, "Simon Eskildsen" >>> wrote: >>>>>>> >>>>>>>> Hi Robert, >>>>>>>> >>>>>>>> I'm averaging 38 deformation fields. Here's the info on one of >>>> them: >>>>>>>> >>>>>>>> $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc >>>>>>>> file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc >>>>>>>> image: signed__ float -10.166246414184570312 to >>>> 11.006509780883789062 >>>>>>>> image dimensions: xspace yspace zspace vector_dimension >>>>>>>> dimension name length step start >>>>>>>> -------------- ------ ---- ----- >>>>>>>> xspace 388 0.5 -96.5 >>>>>>>> yspace 460 0.5 -132.5 >>>>>>>> zspace 388 0.5 -78.5 >>>>>>>> vector_dimension 3 unknown unknown >>>>>>>> >>>>>>>> The files are quite big (~800 Mb each). Could this be a memory >>>>> problem? >>>>>>>> >>>>>>>> I used mincaverage without any flags/options. Just a list of >>> files >>>> in >>>>>>> and a >>>>>>>> file out. >>>>>>>> >>>>>>>> Simon >>>>>>>> >>>>>>>> On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < >>>>>>>> robert.d.vincent at mcgill.ca> wrote: >>>>>>>> >>>>>>>>> Hi Simon, >>>>>>>>> >>>>>>>>> It looks like HDF5 might be running out of resource ids, which >>>>> seems >>>>>>>>> unlikely, but there could be a resource leak somewhere. >>>>>>>>> >>>>>>>>> Can you give me the details of the failing case (e.g. the >>> files >>>>>> you're >>>>>>>>> using)? >>>>>>>>> >>>>>>>>> -bert >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen < >>>> eskild at gmail.com> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> Hi all, >>>>>>>>>> >>>>>>>>>> Averaging a bunch of deformation fields using mincaverage, I >>>> got >>>>>> this >>>>>>>>>> error: >>>>>>>>>> >>>>>>>>>> HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: >>>>>>>>>> #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c >>>> line >>>>>> 679 >>>>>>>> in >>>>>>>>>> H5Aget_space(): can't get space ID of attribute >>>>>>>>>> major: Invalid arguments to routine >>>>>>>>>> minor: Can't get value >>>>>>>>>> #001: >>> /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c >>>>>> line >>>>>>>> 719 >>>>>>>>> in >>>>>>>>>> H5A_get_space(): unable to register dataspace atom >>>>>>>>>> major: Object atom >>>>>>>>>> minor: Unable to register new atom >>>>>>>>>> #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c >>>> line >>>>>> 902 >>>>>>>> in >>>>>>>>>> H5I_register(): no IDs available in type >>>>>>>>>> major: Object atom >>>>>>>>>> minor: Out of IDs for group >>>>>>>>>> HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: >>>>>>>>>> #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c >>>> line >>>>>>> 1383 >>>>>>>> in >>>>>>>>>> H5Screate_simple(): unable to register dataspace ID >>>>>>>>>> major: Object atom >>>>>>>>>> minor: Unable to register new atom >>>>>>>>>> #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c >>>> line >>>>>> 902 >>>>>>>> in >>>>>>>>>> H5I_register(): no IDs available in type >>>>>>>>>> major: Object atom >>>>>>>>>> minor: Out of IDs for group >>>>>>>>>> (from miicv_get): Should not happen! >>>>>>>>>> >>>>>>>>>> Setting -debug flag does not provide further information. >>>>>>>>>> >>>>>>>>>> Ideas for debugging this are very welcome. -- Best regards, Vladimir S. FONOV ~ vladimir.fonov gmail.com From robert.d.vincent at mcgill.ca Thu Jun 11 10:42:41 2015 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Thu, 11 Jun 2015 10:42:41 -0400 Subject: [MINC-users] mincaverage error In-Reply-To: References: Message-ID: Hi Andrew, I wouldn't be averse to making it configurable, but I don't see much advantage. The constant is only used in voxel_loop (to set the maximum number of open files) and in image_conversion.c, where it is used just as an increment to the number of ICV pointers allocated. I don't see a problem with allocated a group of 1000 pointers at a time there. The voxel_loop behavior when the number of input files exceeds this limit is really not something we want to trigger - it constantly opens and closes file handles, maintaining a single open file handle. It's completely untenable if you accidentally invoke this with compressed files, for example! -bert On Thu, Jun 11, 2015 at 10:28 AM, Andrew Janke wrote: > Hi Bert, > > What you are proposing sounds reasonable. Peter and I investigated > doing this a long time back and did increase it from its original > value. Perhaps it is time to increase it again, as I recall there were > problems when we made the figure too high but can't remember details. > If Peter is still lurking he might join in... > > Any chance you can both increase the default and also set an ENV var > for it so that it can be changed at runtime? > > ta > > > a > > > On 12 June 2015 at 00:07, Robert D. Vincent > wrote: > > Hi all, > > > > I have a partial fix for this issue. The voxel_loop code enforces a > maximum > > number of open files based on the constant MI_MAX_NUM_ICV, which is > > currently set to 32. The way the code is written, if it cannot open all > of > > the files, it opens them one at a time. This causes some serious overhead > > that seems to lead to an out-of-resource condition in the HDF5 library. > > > > I will continue to investigate whether we can fix the resource leak, but > in > > the short run I will increase the number allowable open files to > something > > more realistic, like 1000. This can be done by changing the value of > > MI_MAX_NUM_ICV in minc.h. > > > > -bert > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From robert.d.vincent at mcgill.ca Thu Jun 11 11:09:48 2015 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Thu, 11 Jun 2015 11:09:48 -0400 Subject: [MINC-users] mincaverage error In-Reply-To: <55799D7B.9030500@gmail.com> References: <55799D7B.9030500@gmail.com> Message-ID: The fix I proposed allows mincaverage to correctly calculate the result for 38 files each of ~400 M voxels in size (740 voxels in each dimension). -bert On Thu, Jun 11, 2015 at 10:38 AM, Vladimir S. FONOV < vladimir.fonov at gmail.com> wrote: > Hello, > > > well, this is interesting. I can imagine that we will have to do something > about it to make MINC even remotely attractive to the masses. > > One of the attractive features was ability to handle very large datasets > that wouldn't fit into memory. Otherwise - it's very difficult to explain > why even bother with MINC these days. > > > On 15-06-11 10:07 AM, Robert D. Vincent wrote: > >> Hi all, >> >> I have a partial fix for this issue. The voxel_loop code enforces a >> maximum >> number of open files based on the constant MI_MAX_NUM_ICV, which is >> currently set to 32. The way the code is written, if it cannot open all of >> the files, it opens them one at a time. This causes some serious overhead >> that seems to lead to an out-of-resource condition in the HDF5 library. >> >> I will continue to investigate whether we can fix the resource leak, but >> in >> the short run I will increase the number allowable open files to something >> more realistic, like 1000. This can be done by changing the value of >> MI_MAX_NUM_ICV in minc.h. >> >> -bert >> >> On Thu, Jun 11, 2015 at 10:06 AM, Robert D. Vincent >> wrote: >> >> Hi all, >>> >>> I have a partial fix for this issue. The voxel_loop code enforces a >>> maximum number of open files based on the constant MI_MAX_NUM_ICV, which >>> is >>> currently set to 32. The way the code is written, if it cannot open all >>> of >>> the files, it opens them one at a time. This causes some serious overhead >>> that seems to lead to an out-of-resource condition in the HDF5 library. >>> >>> I will continue to investigate whether we can fix the resource leak, but >>> in the short run I will increase the number allowable open files to >>> something more realistic, like 1000. This can be done by changing the >>> value >>> of MI_MAX_NUM_ICV in minc.h. >>> >>> -bert >>> >>> On Tue, Jun 9, 2015 at 4:49 AM, Andrew Janke wrote: >>> >>> that's the idea. it is in mine... >>>> >>>> a >>>> On 09/06/2015 6:48 PM, "Simon Eskildsen" wrote: >>>> >>>> Does it mean I can safely replace mincaverage in xfmavg with >>>>> mincbigaverage? Why hasn't already? >>>>> >>>>> On Tue, Jun 9, 2015 at 10:37 AM, Andrew Janke >>>>> >>>> wrote: >>>> >>>>> >>>>> supports most options yes. Will be identical apart from very small >>>>>> >>>>> rounding >>>>> >>>>>> errors. >>>>>> >>>>>> take note of the options for defining the number to average at once. >>>>>> >>>>>> a >>>>>> On 09/06/2015 6:25 PM, "Simon Eskildsen" wrote: >>>>>> >>>>>> Thanks. I'm trying this now. I assume same behaviour as mincaverage, >>>>>>> >>>>>> right? >>>>>> >>>>>>> >>>>>>> On Tue, Jun 9, 2015 at 10:12 AM, Andrew Janke >>>>>>> >>>>>> wrote: >>>>> >>>>>> >>>>>>> If it's memory, try mincbigaverage. google knows where it is. >>>>>>>> >>>>>>>> a >>>>>>>> On 09/06/2015 5:15 PM, "Simon Eskildsen" >>>>>>>> >>>>>>> wrote: >>>> >>>>> >>>>>>>> Hi Robert, >>>>>>>>> >>>>>>>>> I'm averaging 38 deformation fields. Here's the info on one of >>>>>>>>> >>>>>>>> them: >>>>> >>>>>> >>>>>>>>> $ mincinfo 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc >>>>>>>>> file: 21/stx2_0004_20131113_091044_t1.mnc.21.i_grid_0.mnc >>>>>>>>> image: signed__ float -10.166246414184570312 to >>>>>>>>> >>>>>>>> 11.006509780883789062 >>>>> >>>>>> image dimensions: xspace yspace zspace vector_dimension >>>>>>>>> dimension name length step start >>>>>>>>> -------------- ------ ---- ----- >>>>>>>>> xspace 388 0.5 -96.5 >>>>>>>>> yspace 460 0.5 -132.5 >>>>>>>>> zspace 388 0.5 -78.5 >>>>>>>>> vector_dimension 3 unknown unknown >>>>>>>>> >>>>>>>>> The files are quite big (~800 Mb each). Could this be a memory >>>>>>>>> >>>>>>>> problem? >>>>>> >>>>>>> >>>>>>>>> I used mincaverage without any flags/options. Just a list of >>>>>>>>> >>>>>>>> files >>>> >>>>> in >>>>> >>>>>> and a >>>>>>>> >>>>>>>>> file out. >>>>>>>>> >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> On Mon, Jun 8, 2015 at 3:46 PM, Robert D. Vincent < >>>>>>>>> robert.d.vincent at mcgill.ca> wrote: >>>>>>>>> >>>>>>>>> Hi Simon, >>>>>>>>>> >>>>>>>>>> It looks like HDF5 might be running out of resource ids, which >>>>>>>>>> >>>>>>>>> seems >>>>>> >>>>>>> unlikely, but there could be a resource leak somewhere. >>>>>>>>>> >>>>>>>>>> Can you give me the details of the failing case (e.g. the >>>>>>>>>> >>>>>>>>> files >>>> >>>>> you're >>>>>>> >>>>>>>> using)? >>>>>>>>>> >>>>>>>>>> -bert >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Jun 8, 2015 at 9:33 AM, Simon Eskildsen < >>>>>>>>>> >>>>>>>>> eskild at gmail.com> >>>>> >>>>>> wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> Hi all, >>>>>>>>>>> >>>>>>>>>>> Averaging a bunch of deformation fields using mincaverage, I >>>>>>>>>>> >>>>>>>>>> got >>>>> >>>>>> this >>>>>>> >>>>>>>> error: >>>>>>>>>>> >>>>>>>>>>> HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: >>>>>>>>>>> #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5A.c >>>>>>>>>>> >>>>>>>>>> line >>>>> >>>>>> 679 >>>>>>> >>>>>>>> in >>>>>>>>> >>>>>>>>>> H5Aget_space(): can't get space ID of attribute >>>>>>>>>>> major: Invalid arguments to routine >>>>>>>>>>> minor: Can't get value >>>>>>>>>>> #001: >>>>>>>>>>> >>>>>>>>>> /users/fristed/git/minc-toolkit/build/HDF5/src/H5Aint.c >>>> >>>>> line >>>>>>> >>>>>>>> 719 >>>>>>>>> >>>>>>>>>> in >>>>>>>>>> >>>>>>>>>>> H5A_get_space(): unable to register dataspace atom >>>>>>>>>>> major: Object atom >>>>>>>>>>> minor: Unable to register new atom >>>>>>>>>>> #002: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c >>>>>>>>>>> >>>>>>>>>> line >>>>> >>>>>> 902 >>>>>>> >>>>>>>> in >>>>>>>>> >>>>>>>>>> H5I_register(): no IDs available in type >>>>>>>>>>> major: Object atom >>>>>>>>>>> minor: Out of IDs for group >>>>>>>>>>> HDF5-DIAG: Error detected in HDF5 (1.8.14) thread 0: >>>>>>>>>>> #000: /users/fristed/git/minc-toolkit/build/HDF5/src/H5S.c >>>>>>>>>>> >>>>>>>>>> line >>>>> >>>>>> 1383 >>>>>>>> >>>>>>>>> in >>>>>>>>> >>>>>>>>>> H5Screate_simple(): unable to register dataspace ID >>>>>>>>>>> major: Object atom >>>>>>>>>>> minor: Unable to register new atom >>>>>>>>>>> #001: /users/fristed/git/minc-toolkit/build/HDF5/src/H5I.c >>>>>>>>>>> >>>>>>>>>> line >>>>> >>>>>> 902 >>>>>>> >>>>>>>> in >>>>>>>>> >>>>>>>>>> H5I_register(): no IDs available in type >>>>>>>>>>> major: Object atom >>>>>>>>>>> minor: Out of IDs for group >>>>>>>>>>> (from miicv_get): Should not happen! >>>>>>>>>>> >>>>>>>>>>> Setting -debug flag does not provide further information. >>>>>>>>>>> >>>>>>>>>>> Ideas for debugging this are very welcome. >>>>>>>>>>> >>>>>>>>>> > > -- > Best regards, > > Vladimir S. FONOV ~ vladimir.fonov gmail.com > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >