upcxx-run misbehavior for shared heap request under 1MB
Issue #585
new
As shown below, requesting a shared heap size using the (documented) k
suffix results in an invalid request for a 0MB/P
maximum GASNet segment size if the request is for less than 1024KiB:
hargrove@nid001032:~> upcxx-run -n2 -shared-heap 1024k ./a.out
Hello world from process 0 out of 2 processes
Hello world from process 1 out of 2 processes
hargrove@nid001032:~> upcxx-run -n2 -shared-heap 1023k ./a.out
*** FATAL ERROR (proc 0): in gasneti_getenv_memsize_withdefault() at stall/upcxx-2022.9.0/bld/GASNet-2022.9.2/gasnet_tools.c:2891: GASNET_MAX_SEGSIZE='0MB/P' is zero or unrecognized.
*** NOTICE (proc 0): Before reporting bugs, run with GASNET_BACKTRACE=1 in the environment to generate a backtrace.
*** FATAL ERROR (proc 1): in gasneti_getenv_memsize_withdefault() at stall/upcxx-2022.9.0/bld/GASNet-2022.9.2/gasnet_tools.c:2891: GASNET_MAX_SEGSIZE='0MB/P' is zero or unrecognized.
*** NOTICE (proc 1): Before reporting bugs, run with GASNET_BACKTRACE=1 in the environment to generate a backtrace.
srun: error: nid001032: task 0: Aborted (core dumped)
srun: error: nid001033: task 1: Aborted (core dumped)
Just as the %
suffix diagnoses values larger then 100%, I suggest that the k
suffix should diagnose values less than 1024 OR silently round them up to 1MB.
Assigned priority "trivial" since the problematic input is highly unlikely to occur in practice, and manually requesting 1M
as a work-around is simple.