gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [bug #51501] Compiling arithmetic-binary library memory


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [bug #51501] Compiling arithmetic-binary library memory problems on `sh4' architecture
Date: Tue, 18 Jul 2017 17:49:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

URL:
  <http://savannah.gnu.org/bugs/?51501>

                 Summary: Compiling arithmetic-binary library memory problems
on `sh4' architecture
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Tue 18 Jul 2017 11:49:05 PM CEST
                Category: Libraries
                Severity: 3 - Normal
              Item Group: Crash
                  Status: Postponed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Following the correction of bug #51476, Gnuastro 0.3.33 now builds
successfully on all Debian architectures
<https://buildd.debian.org/status/package.php?p=gnuastro>, except for `sh4'.

Looking at the log
<https://buildd.debian.org/status/fetch.php?pkg=gnuastro&arch=sh4&ver=0.3.33-1&stamp=1500382909&raw=0>,
the problem is apparently due to the compiler's memory.

As you can see from arithmetic-binary.c
<http://git.savannah.gnu.org/cgit/gnuastro.git/tree/lib/arithmetic-binary.c>,
this file in particular heavily uses macros to deal with binary operations of
many different types (all signed and unsigned integer types and floats). Since
compiling all these types takes a lot of time, we have defined configure time
options
<https://www.gnu.org/software/gnuastro/manual/html_node/Gnuastro-configure-options.html>
to avoid compiling all of them if the user is in a rush to build. 

But for Debian (and generally for packaging as described in the book link
above), we are compiling for all types. This is because the user just
downloads the compiled binaries the processing can be much faster for an
arbitrary type of data.

One fast solution to this problem will probably be to disable all types for
the `sh4' architecture (if it is possible in Debian, we'll have to ask). But
this is not an elagant solution! It is strange for me that more than 2Gb of
memory are necessary to compile Gnuastro. 

Alternatively, since we are now building in parallel, probably this issue is
caused because `arithmetic-binary.c' is being compiled simultaneously with
arithmetic-onlyint.c
<http://git.savannah.gnu.org/cgit/gnuastro.git/tree/lib/arithmetic-onlyint.c>
(which also heavily uses macros). So an alternative solution may be to disable
parallel building on `sh4' systems. 

But generally, the most elegant solution would be to find a way to implement
the code that this problem is not caused in the first place (if its
possible).

I can't work on this now, so any contribution would be welcome. Fortunately
the `sh4' architecture is not a main Debian architecture (is colored gray in
the build logs). So this isn't a major issue.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51501>

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




reply via email to

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