-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we have a global CHPL_MEM
and CHPL_JEMALLOC
?
#25359
Comments
I like the idea of having CHPL_MEM or CHPL_JEMALLOC provide the defaults for CHPL_MEM/CHPL_JEMALLOC respectively, but want to note that it would arguably be a non-breaking change to go with the simple thing for now and to introduce the umbrella variables if/when users complain about having to set multiple things to use a given jemalloc for both host and target (does that sound right, Jade?). So maybe that's what we should do—pursue the simple cleanup for now to deprecate the somewhat outdated redundancy and create (or repurpose) this issue to capture the notion of the umbrella variables to see whether it garners support over time, or simply remains "a nice idea, but not crucial". [edit: I guess arguably this issue already serves the purpose without a lot of refactoring. I was viewing it as a "should we do this or that?" issue, but re-reading the title, I suppose it really is more of a "Should we do that?" issue. :) ] |
I agree that it would be a non-breaking change to do the simple thing for now and add the umbrella variables later if-needed. This would be my preference. I do think that if we take that route, before we remove |
I agree, and was imagining printchplenv (or something in the build process) print the warning rather than just relying on docs in doing the deprecation. Why don't we proceed with that plan if nobody speaks up organically on this issue in the meantime? |
Currently, we have the following environment variables for configuring Chapels memory allocation
CHPL_MEM
: the allocator to use for compiled chapel programs. Eithercstdlib
orjemalloc
CHPL_TARGET_MEM
: same asCHPL_MEM
, specifying both gives a warning and takes the value fromCHPL_TARGET_MEM
CHPL_HOST_MEM
: the allocator to use for the chapel compiler. Eithercstdlib
orjemalloc
CHPL_JEMALLOC
: whenCHPL_MEM
/CHPL_TARGET_MEM
is set tojemalloc
, switches betweensystem
andjemalloc
CHPL_TARGET_JEMALLOC
: same asCHPL_JEMALLOC
, specifying both gives a warning and takes the value fromCHPL_TARGET_JEMALLOC
CHPL_HOST_JEMALLOC
: whenCHPL_HOST_MEM
is set tojemalloc
, switches betweensystem
andjemalloc
The reason for the duplicate names
CHPL_MEM
/CHPL_TARGET_MEM
andCHPL_JEMALLOC
/CHPL_TARGET_JEMALLOC
is to provide backwards compatibility after #18627. Note thatCHPL_JEMALLOC
is not a user facing feature andCHPL_MEM
has been documented to be deprecated in favor ofCHPL_TARGET_MEM
since that PR.Do we still want to support
CHPL_MEM
/CHPL_JEMALLOC
?The simple thing to do is to just remove
CHPL_MEM
andCHPL_JEMALLOC
, however another possibility brought up on #25347 is to keep these variables, but just change their behavior slightly.CHPL_MEM
would specify the default forCHPL_TARGET_MEM
andCHPL_HOST_MEM
, such that ifCHPL_MEM
is set tojemalloc
then bothTARGET
andHOST
arejemalloc
. And similarly forCHPL_JEMALLOC
. This would provide a shortcut for specifying the host and target memory configuration for users.See #25347 (comment) for more details on how these defaults would work.
The text was updated successfully, but these errors were encountered: