Opened 4 months ago

Last modified 4 months ago

#15741 new feature request

Accept GHCRTS=-N1 when not compiled with -threaded

Reported by: lspitzner Owned by:
Priority: normal Milestone:
Component: Runtime System Version: 8.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

current behaviour:

> ghc Main.hs -o test
> ./test +RTS -N1
test: the flag -N1 requires the program to be built with -threaded
[blah blah]

requested:

> ghc Main.hs -o test
> ./test +RTS -N1
hello world

Motivation: In certain environments, threaded is bad idea due to resource constraints even when multiple capabilities are available, because resident memory can increase with parallel execution. Slapping GHCRTS=-N1 onto those environments would be nice, but breaks for things not compiled with -threaded.

Change History (1)

comment:1 Changed 4 months ago by lspitzner

There also is the more general feature request "support passing rts opts in a ignore-if-unsupported" mode. E.g. with a system-wide "GHCRTS=-M1G" even running cabal install flat-out fails because cabal does not compile Setup.hss with -rtsopts. Might be considered a bug in cabal in that case, but some escape hatch might make sense regardless. Maybe a second env var, like "GHCRTSSOFT" or something? Thoughts?

Note: See TracTickets for help on using tickets.