[MINC-users] Running MINC tools from the www user

Alex Zijdenbos alex at bic.mni.mcgill.ca
Wed Apr 16 00:24:34 EDT 2008


Hi Burt,

I am not sure what is happening here, but one possible cause I could 
imagine is that you ran out of temp space. CachedArray is something I 
wrote some decades ago; it is an array class that is cached to disk (and 
thus will let you generate large arrays with a small memory footprint). 
The bit of code that fails is:

     _s.open(path, ios::in | ios::out | ios::trunc);

     // Unlink the file so it will be deleted automatically when
     // closed.
     //
     unlink(path);

     assert(_s.is_open());

That last assertion fails in your case, which I suspect means that it 
was unable to create the temporary disk cache file, or the temporary 
filename used for the cache file is foobar. The temporary filename is 
generated in get_temp_filename in FileIO.cc, which jumps through a few 
hoops trying to generate a usable temporary filename. You may want to 
try to set the TMPDIR environment var and check whether /tmp has space.

-- Alex


Burt Crépeault wrote:
> Hi again,
> 
> In my current development, I'm executing MINC tools from an Apache-run PHP
> script, therefore running under the default www user. The following command
> runs well from the command prompt but gives errors when run from www:
> 
> /usr/local/minc2/bin/nu_correct -clobber -mapping_dir
> /Library/MEDICS/data/images/10188/bl/MR.T1.MP-RAGE/1007 -iterations
> 100 -shrink 3 -fwhm 0.1 -distance 100
> /Library/MEDICS/data/images/10188/bl/MR.T1.MP-RAGE/1004/Library.MEDICS.data.images.10188.bl.MR.T1.MP-RAGE.1004.1.10004.[mnc.d2m].Br.12_p2.mnc
> /Library/MEDICS/data/images/10188/bl/MR.T1.MP-RAGE/1007/Library.MEDICS.data.images.10188.bl.MR.T1.MP-RAGE.1007.1.10007.[mnc.d2m+mnc.nuc].Br.22_p2.mnc
> 
>    [7]:     [_www at pita.crulrg.local:/Library/WebServer/Documents/]
> [2008-04-15 16:19:39] running:
>    [8]:       /usr/local/minc2/bin/nu_estimate_np_and_em -parzen -log
> -sharpen 0.1 0.01 -iterations 100 -stop 0.001 -shrink 3 -auto_mask
> -nonotify -b_spline 1 -distance 100 -quiet -execute -clobber
> -nokeeptmp -tmpdir /var/tmp/nu_correct_32893/
> '/Library/MEDICS/data/images/10188/bl/MR.T1.MP-RAGE/1004/Library.MEDICS.data.images.10188.bl.MR.T1.MP-RAGE.1004.1.10004.[mnc.d2m].Br.12_p2.mnc'
> '/Library/MEDICS/data/images/10188/bl/MR.T1.MP-RAGE/1007/Library.MEDICS.data.images.10188.bl.MR.T1.MP-RAGE.1007.1.10007.[mnc.d2m+mnc.nuc].Br.22_p2.imp'
>    [9]:
>    [10]:     Assertion failed at line 742 in file templates/CachedArray.cc
>    [11]:     nu_estimate_np_and_em: crashed while running volume_stats
> (termination status=256)
>    [12]:     nu_correct: crashed while running nu_estimate_np_and_em
> (termination status=256)
> 
> Usually, this type of error can be traced to a bad permission somewhere, or
> to an environment variable that's incorrectly set for the www user.
> Unfortunately in this case, I'm a little short on data to troubleshoot it
> myself. What does "Assertion failed" on line [10] mean?
> 
> Any help would be greatly appreciated.
> 
> Thanks,
> 


-- 
========================================================================
| Alex P. Zijdenbos, Ph.D.        |                                    |
| McConnell Brain Imaging Centre  | Phone: [+1] 514 398-5220  (office) |
| Montreal Neurological Institute |        [+1] 514 398-1996   (dept.) |
| 3801 University St., WB-208     |   Fax: [+1] 514 398-8952  (office) |
| Montreal, Quebec, H3A 2B4       |        [+1] 708 810-3309 (private) |
| CANADA                          | Email:      alex at bic.mni.mcgill.ca |
========================================================================



More information about the MINC-users mailing list