make ignores "-j" option

66 views
Skip to first unread message

Peter Mueller

unread,
Dec 7, 2024, 1:50:56 PM12/7/24
to sage-support
Compiling SageMath 10.5 on an ArchLinux system seems to ignore the "-j" option to make. Even if I do "make -j1", more than the number of cores (16 in my case) processes run in parallel, freezing the system for most of the time.

-- Peter Mueller

PS: ArchLinux actually provides SageMath 10.5. However, I need some of the optional packages which do not come with ArchLinux and which apparently cannot be installed in view of the missing "-i" option of this installation.

Antonio Rojas

unread,
Dec 7, 2024, 2:33:09 PM12/7/24
to sage-support
Which optional package are you missing? Optional packages are supposed to be installed with pacman, just like any other distro package. 

As for parallel build, you need to use the SAGE_NUM_THREADS env variable

Peter Mueller

unread,
Dec 7, 2024, 2:56:27 PM12/7/24
to sage-support
(1) Oh, I just realized that actually most of the optional packages which I need are already provided by the ArchLinux package "sagemath". I very much appreciate your great work on this! In fact, the only one I use often and which seems to be missing is "sage_numerical_backends_gurobi".

(2) Setting SAGE_NUM_THREADS=1 didn't resolve the issue.

William Stein

unread,
Dec 7, 2024, 2:58:31 PM12/7/24
to sage-s...@googlegroups.com
On Sat, Dec 7, 2024 at 6:56 AM 'Peter Mueller' via sage-support <sage-s...@googlegroups.com> wrote:
(1) Oh, I just realized that actually most of the optional packages which I need are already provided by the ArchLinux package "sagemath". I very much appreciate your great work on this! In fact, the only one I use often and which seems to be missing is "sage_numerical_backends_gurobi".

(2) Setting SAGE_NUM_THREADS=1 didn't resolve the issue.

The following may still work:

export MAKE="make -j1"
...
 
Antonio Rojas schrieb am Samstag, 7. Dezember 2024 um 15:33:09 UTC+1:
Which optional package are you missing? Optional packages are supposed to be installed with pacman, just like any other distro package. 

As for parallel build, you need to use the SAGE_NUM_THREADS env variable

El sábado, 7 de diciembre de 2024 a las 14:50:56 UTC+1, Peter Mueller escribió:
Compiling SageMath 10.5 on an ArchLinux system seems to ignore the "-j" option to make. Even if I do "make -j1", more than the number of cores (16 in my case) processes run in parallel, freezing the system for most of the time.

-- Peter Mueller

PS: ArchLinux actually provides SageMath 10.5. However, I need some of the optional packages which do not come with ArchLinux and which apparently cannot be installed in view of the missing "-i" option of this installation.

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-support/6bab6817-5bf8-4130-987a-dea0f9d3235bn%40googlegroups.com.


--
Message has been deleted

Peter Mueller

unread,
Dec 7, 2024, 3:49:16 PM12/7/24
to sage-support
No, export MAKE="make -j1" before doing a "make" didn't resolve the problem. The number of parallel processes kept rising from 4 until around 20. Not sure if this is a bug, or results from some misconfiguration of my machine. I didn't fiddle with the Sage source, just got it fresh from github.  And I didn't do anything particular in the configuration, only "./configure --enable-cbc --enable-msolve -enable-something ..." for various optional packages something.

wst...@gmail.com schrieb am Samstag, 7. Dezember 2024 um 15:58:31 UTC+1:
[...]

William Stein

unread,
Dec 7, 2024, 3:51:39 PM12/7/24
to sage-s...@googlegroups.com
Caveat -- definitely setting MAKE worked for 15-20 years.  I have no idea if it is supported or not anymore.
That's definitely how MAKE flags used to be set down the build tree when I wrote the build system, but it has
been rewritten many times since then.  You're probably going to just have to look at the source code for
a definitive answer.

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Antonio Rojas

unread,
Dec 7, 2024, 4:06:58 PM12/7/24
to sage-support
El sábado, 7 de diciembre de 2024 a las 15:56:27 UTC+1, Peter Mueller escribió:
(1) Oh, I just realized that actually most of the optional packages which I need are already provided by the ArchLinux package "sagemath". I very much appreciate your great work on this! In fact, the only one I use often and which seems to be missing is "sage_numerical_backends_gurobi".

 That's on AUR, though it probably needs an update


Kevin Youren

unread,
Dec 7, 2024, 8:12:00 PM12/7/24
to sage-support
Peter,

I also found the "make" problem and the number of parallel processes.

See "Error installing package scipy-1.12.0 in Develop" from October

I have two computers, a laptop with a large memory, where sagemath built OK.

My "tower" machine had far less memory,  Sagemath crashed with too many parallel processes.
I fixed the problem by changing the swap file to 10G.

regards, Kevin

Dima Pasechnik

unread,
Dec 7, 2024, 8:29:19 PM12/7/24
to sage-s...@googlegroups.com
A vastly better way of building sagelib is via meson. We already have
a preliminary support for it included - notice all these meson.build
files in the source tree. In some cases you can already use it. More
is being worked on, see e.g.
https://github.com/sagemath/sage/pull/39030
testing and user input is most welcome!

On Sat, Dec 7, 2024 at 9:20 AM 'Peter Mueller' via sage-support
<sage-s...@googlegroups.com> wrote:
>
> OK, with export MAKE="make -j1" the number of parallel processes seems to be around 4 most of the time. So it does not paralyze the computer.
>
> wst...@gmail.com schrieb am Samstag, 7. Dezember 2024 um 15:58:31 UTC+1:
>
> [...]
>
> The following may still work:
>
> export MAKE="make -j1"
>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-support/66d979ac-ddb6-4394-845d-999d03032e13n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages