mbox series

[bug#65553,0/6] gnu: Add arrayfire.

Message ID ce063967-c2d3-f383-e67e-057d941901e9@disroot.org
Headers show
Series gnu: Add arrayfire. | expand

Message

Adam Faiz Aug. 26, 2023, 6:46 p.m. UTC
From 0d1c25484158655344cbfbdc1e3e503be23654d1 Mon Sep 17 00:00:00 2001
Message-ID: <cover.1693075221.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sun, 27 Aug 2023 02:40:21 +0800
Subject: [PATCH 0/6] gnu: Add arrayfire.

This is how far I made it when it comes to packaging ArrayFire.
I don't know if ArrayFire builds, since on my computer all the RAM(4GB) is used up by the linker at some point.
If anyone knows how to reduce memory usage when linking, please let me know.

AwesomeAdam54321 (6):
  gnu: Add arrayfire-glad.
  gnu: Add span-lite.
  gnu: Add arrayfire-threads.
  gnu: Add arrayfire-forge.
  gnu: Add arrayfire-docs.
  gnu: Add arrayfire.

 gnu/local.mk                                  |   1 +
 gnu/packages/cpp.scm                          |  62 ++++++++
 gnu/packages/gl.scm                           |  42 +++++
 gnu/packages/machine-learning.scm             |  98 ++++++++++++
 ...arrayfire-glad-add-packaging-support.patch | 145 ++++++++++++++++++
 gnu/packages/statistics.scm                   |  51 ++++++
 6 files changed, 399 insertions(+)
 create mode 100644 gnu/packages/patches/arrayfire-glad-add-packaging-support.patch


base-commit: d17eea747277643811134f9a33b534e58160688f

Comments

Saku Laesvuori Aug. 26, 2023, 7:18 p.m. UTC | #1
> I don't know if ArrayFire builds, since on my computer all the
> RAM(4GB) is used up by the linker at some point.
>
> If anyone knows how to reduce memory usage when linking, please let me know.

I have normally solve this by just adding a huge swapfile, but if
someone knows how to actually reduce the ram usage by the linker that
would be interesting to hear.
Adam Faiz Aug. 28, 2023, 6:30 a.m. UTC | #2
On 8/27/23 03:18, Saku Laesvuori wrote:
> I have normally solve this by just adding a huge swapfile, but if
> someone knows how to actually reduce the ram usage by the linker that
> would be interesting to hear.
Thanks, using a swapfile worked for me.
The --no-keep-memory option reduces RAM usage for the linker, it was actually the compiler that was using up all my RAM.

To my understanding, the only effective way to reduce RAM usage of the compiler is to not have many running at the same time,
i.e. to reduce the number of parallel jobs by the build system.
The ggc-min-heapsize and ggc-min-expand GCC options could also be used instead, but I don't know if it's faster than just using swap.

Now I got ArrayFire to build, I just need to ensure its tests pass.