gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-devel] [task #14292] Delete .gnuastro directory after mmap'd f


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [task #14292] Delete .gnuastro directory after mmap'd file is removed
Date: Wed, 28 Dec 2016 15:12:32 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

URL:
  <http://savannah.gnu.org/task/?14292>

                 Summary: Delete .gnuastro directory after mmap'd file is
removed
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Thu 29 Dec 2016 12:12:30 AM JST
         Should Start On: Wed 28 Dec 2016 12:00:00 AM JST
   Should be Finished on: Wed 28 Dec 2016 12:00:00 AM JST
                Category: All Gnuastro
                Priority: 5 - Normal
              Item Group: Enhancement
                  Status: Postponed
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________

Details:

As part of task #14245, we are moving the internal representation of
arrays/data to a generic gal_data_t
<https://gitlab.com/makhlaghi/gnuastro/blob/datastruct/lib/gnuastro/data.h#L190>
type. As discussed in that task, it will allow arrays of any dimensionality or
type to be passed, and read/written easily (the FITS functions have already
been changed to read and write in this structure, and I am busy working on txt
tables now). 

One other capability of this structure is in dealing with large files: it is
not uncommon for data-sets to be larger than a few Giga-bytes, so they can
easily fill the RAM of normal computers. To deal with this situation, we have
defined the `--minmapsize' option (which is a common option to all programs in
this branch). Through it, the users can set the minimum number of bytes in an
array of the dataset for it to be mmap'ed (in the hdd/ssd, and not kept in the
RAM) instead of being kept in the RAM. It is certainly slower to work outside
the RAM, but a slower program is better than one that crashes because of no
memory.

Files need to be created to mmap the array. What we do now is to make a
randomly named file in the `.gnuastro' directory of the process's working
directory. If the working directory doesn't have a `.gnuastro' directory, it
will be created. Once the mmap'd memory is no longer needed, that randomly
named file is deleted (its name is stored in `mmapname' variable of
`gal_data_t'). But the `.gnuastro' directory will remain. 

With this task, I wanted to suggest the removal of the `.gnuastro' directory
after we remove the mmap file (if it becomes empty ofcourse). 




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?14292>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]