From 7cfb1950b3afd0ee403099209fc4a8c92eb87486 Mon Sep 17 00:00:00 2001 From: Brad Chamberlain Date: Sun, 6 Oct 2024 09:08:07 -0700 Subject: [PATCH 01/17] Rename revcomp 8 to 9 For some reason, the CLBG site renamed our revcomp 8 version to 9, so this updates our version to reflect that and minimize confusion going forward. --- Signed-off-by: Brad Chamberlain --- test/studies/shootout/submitted/revcomp-submitted.graph | 4 ++-- test/studies/shootout/submitted/revcomp8.perfexecopts | 1 - .../shootout/submitted/{revcomp8.chpl => revcomp9.chpl} | 2 +- .../submitted/{revcomp8.execopts => revcomp9.execopts} | 0 .../shootout/submitted/{revcomp8.good => revcomp9.good} | 0 test/studies/shootout/submitted/revcomp9.perfexecopts | 1 + .../submitted/{revcomp8.perfkeys => revcomp9.perfkeys} | 0 7 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 test/studies/shootout/submitted/revcomp8.perfexecopts rename test/studies/shootout/submitted/{revcomp8.chpl => revcomp9.chpl} (99%) rename test/studies/shootout/submitted/{revcomp8.execopts => revcomp9.execopts} (100%) rename test/studies/shootout/submitted/{revcomp8.good => revcomp9.good} (100%) create mode 100644 test/studies/shootout/submitted/revcomp9.perfexecopts rename test/studies/shootout/submitted/{revcomp8.perfkeys => revcomp9.perfkeys} (100%) diff --git a/test/studies/shootout/submitted/revcomp-submitted.graph b/test/studies/shootout/submitted/revcomp-submitted.graph index cfc4c1cfdb4e..bc787373316e 100644 --- a/test/studies/shootout/submitted/revcomp-submitted.graph +++ b/test/studies/shootout/submitted/revcomp-submitted.graph @@ -1,5 +1,5 @@ perfkeys: real, real, real, real -graphkeys: release, submitted (3), submitted (5), submitted (8) -files: revcomp.dat, revcomp3-submitted.dat, revcomp5-submitted.dat, revcomp8-submitted.dat +graphkeys: release, submitted (3), submitted (5), submitted (9) +files: revcomp.dat, revcomp3-submitted.dat, revcomp5-submitted.dat, revcomp9-submitted.dat graphtitle: Submitted Reverse-complement Shootout Benchmark ylabel: Time (seconds) diff --git a/test/studies/shootout/submitted/revcomp8.perfexecopts b/test/studies/shootout/submitted/revcomp8.perfexecopts deleted file mode 100644 index 820df3ceef3c..000000000000 --- a/test/studies/shootout/submitted/revcomp8.perfexecopts +++ /dev/null @@ -1 +0,0 @@ ---n=0 < $CHPL_TEST_TMP_DIR/fasta.rvcmp # revcomp8-submitted diff --git a/test/studies/shootout/submitted/revcomp8.chpl b/test/studies/shootout/submitted/revcomp9.chpl similarity index 99% rename from test/studies/shootout/submitted/revcomp8.chpl rename to test/studies/shootout/submitted/revcomp9.chpl index fb46b199dbab..daf049501726 100644 --- a/test/studies/shootout/submitted/revcomp8.chpl +++ b/test/studies/shootout/submitted/revcomp9.chpl @@ -2,7 +2,7 @@ https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ contributed by Brad Chamberlain - based on the C gcc #8 version by Jeremy Zerfas + based on the C gcc #9 version by Jeremy Zerfas */ use IO, CTypes; diff --git a/test/studies/shootout/submitted/revcomp8.execopts b/test/studies/shootout/submitted/revcomp9.execopts similarity index 100% rename from test/studies/shootout/submitted/revcomp8.execopts rename to test/studies/shootout/submitted/revcomp9.execopts diff --git a/test/studies/shootout/submitted/revcomp8.good b/test/studies/shootout/submitted/revcomp9.good similarity index 100% rename from test/studies/shootout/submitted/revcomp8.good rename to test/studies/shootout/submitted/revcomp9.good diff --git a/test/studies/shootout/submitted/revcomp9.perfexecopts b/test/studies/shootout/submitted/revcomp9.perfexecopts new file mode 100644 index 000000000000..c63f42eea5da --- /dev/null +++ b/test/studies/shootout/submitted/revcomp9.perfexecopts @@ -0,0 +1 @@ +--n=0 < $CHPL_TEST_TMP_DIR/fasta.rvcmp # revcomp9-submitted diff --git a/test/studies/shootout/submitted/revcomp8.perfkeys b/test/studies/shootout/submitted/revcomp9.perfkeys similarity index 100% rename from test/studies/shootout/submitted/revcomp8.perfkeys rename to test/studies/shootout/submitted/revcomp9.perfkeys From fcb65a1af7478bb33d887322818199515c290f02 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 25 Nov 2024 11:07:51 -0800 Subject: [PATCH 02/17] deprecate CHPL_JEMALLOC and CHPL_MEM Signed-off-by: Jade Abraham --- util/chplenv/chpl_jemalloc.py | 6 ++++-- util/chplenv/chpl_mem.py | 2 ++ util/chplenv/overrides.py | 4 ++-- util/chplenv/printchplbuilds.py | 2 +- util/chplenv/printchplenv.py | 10 +++++----- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/util/chplenv/chpl_jemalloc.py b/util/chplenv/chpl_jemalloc.py index 78761c1c6edc..9d025d27edac 100644 --- a/util/chplenv/chpl_jemalloc.py +++ b/util/chplenv/chpl_jemalloc.py @@ -22,6 +22,8 @@ def get(flag='target'): linux = not darwin and not cygwin if flag == 'target': + if chpl_jemalloc: + warning("CHPL_JEMALLOC is deprecated, please unset it and use CHPL_TARGET_JEMALLOC") if chpl_target_jemalloc: jemalloc_val = chpl_target_jemalloc if chpl_jemalloc: @@ -52,9 +54,9 @@ def get(flag='target'): error("CHPL_HOST_JEMALLOC=bundled is not supported on Mac for host builds") if mem_val == 'jemalloc' and jemalloc_val == 'none': - error("CHPL_JEMALLOC must not be 'none' when CHPL_MEM is jemalloc") + error("CHPL_JEMALLOC must not be 'none' when CHPL_TARGET_MEM is jemalloc") elif mem_val != 'jemalloc' and jemalloc_val != 'none': - error("CHPL_JEMALLOC must be 'none' when CHPL_MEM is not jemalloc") + error("CHPL_JEMALLOC must be 'none' when CHPL_TARGET_MEM is not jemalloc") return jemalloc_val diff --git a/util/chplenv/chpl_mem.py b/util/chplenv/chpl_mem.py index 3d0009b054af..2c0895456e62 100755 --- a/util/chplenv/chpl_mem.py +++ b/util/chplenv/chpl_mem.py @@ -15,6 +15,8 @@ def get(flag='host'): chpl_mem = overrides.get('CHPL_MEM') if flag == 'target': + if chpl_mem: + warning("CHPL_MEM is deprecated, please unset it and use CHPL_TARGET_MEM") if chpl_target_mem: mem_val = chpl_target_mem if chpl_mem and chpl_target_mem != chpl_mem: diff --git a/util/chplenv/overrides.py b/util/chplenv/overrides.py index 57559233dd44..04f5544581f1 100755 --- a/util/chplenv/overrides.py +++ b/util/chplenv/overrides.py @@ -51,9 +51,9 @@ 'CHPL_UNWIND', 'CHPL_HOST_MEM', - 'CHPL_TARGET_MEM', # note: not in printchplenv --all + 'CHPL_TARGET_MEM', 'CHPL_MEM', - 'CHPL_JEMALLOC', # note: these 3 are not in printchplenv --all + 'CHPL_JEMALLOC', 'CHPL_HOST_JEMALLOC', 'CHPL_TARGET_JEMALLOC', diff --git a/util/chplenv/printchplbuilds.py b/util/chplenv/printchplbuilds.py index 5f2419959a2e..f3ec3e2a4917 100755 --- a/util/chplenv/printchplbuilds.py +++ b/util/chplenv/printchplbuilds.py @@ -52,7 +52,7 @@ class State(Enum): 'launch': 'CHPL_LAUNCHER', 'tmr': 'CHPL_TIMERS', 'unwind': 'CHPL_UNWIND', - 'mem': 'CHPL_MEM', + 'mem': 'CHPL_TARGET_MEM', 'atomics': 'CHPL_ATOMICS', 'gmp': 'CHPL_GMP', 'llvm': 'CHPL_LLVM', diff --git a/util/chplenv/printchplenv.py b/util/chplenv/printchplenv.py index 9c8f319c40c9..74df147711d2 100755 --- a/util/chplenv/printchplenv.py +++ b/util/chplenv/printchplenv.py @@ -120,8 +120,8 @@ ChapelEnv('CHPL_UNWIND', RUNTIME | LAUNCHER | DEFAULT, 'unwind'), ChapelEnv('CHPL_HOST_MEM', COMPILER, 'hostmem'), ChapelEnv(' CHPL_HOST_JEMALLOC', RUNTIME | NOPATH, 'hostjemalloc'), - ChapelEnv('CHPL_MEM', RUNTIME | LAUNCHER | DEFAULT, 'mem'), - ChapelEnv('CHPL_TARGET_MEM', INTERNAL, 'mem'), + ChapelEnv('CHPL_MEM', INTERNAL, 'mem'), # deprecated and will be removed + ChapelEnv('CHPL_TARGET_MEM', RUNTIME | LAUNCHER | DEFAULT, 'mem'), ChapelEnv(' CHPL_TARGET_JEMALLOC', RUNTIME | NOPATH, 'tgtjemalloc'), ChapelEnv('CHPL_MAKE', INTERNAL, 'make'), ChapelEnv('CHPL_ATOMICS', RUNTIME | LAUNCHER | DEFAULT, 'atomics'), @@ -219,7 +219,7 @@ def compute_all_values(): ENV_VALS['CHPL_TIMERS'] = chpl_timers.get() ENV_VALS['CHPL_UNWIND'] = chpl_unwind.get() ENV_VALS['CHPL_HOST_MEM'] = chpl_mem.get('host') - ENV_VALS['CHPL_MEM'] = chpl_mem.get('target') + ENV_VALS['CHPL_TARGET_MEM'] = chpl_mem.get('target') ENV_VALS[' CHPL_HOST_JEMALLOC'] = chpl_jemalloc.get('host') ENV_VALS[' CHPL_TARGET_JEMALLOC'] = chpl_jemalloc.get('target') ENV_VALS['CHPL_MAKE'] = chpl_make.get() @@ -266,7 +266,7 @@ def compute_internal_values(): ENV_VALS['CHPL_TARGET_BACKEND_CPU'] = backend_info.cpu ENV_VALS[' CHPL_LLVM_TARGET_CPU'] = chpl_cpu.get_llvm_target_cpu().cpu - ENV_VALS['CHPL_TARGET_MEM'] = chpl_mem.get('target') + ENV_VALS['CHPL_MEM'] = chpl_mem.get('target') ENV_VALS['CHPL_RUNTIME_SUBDIR'] = printchplenv(set(['runtime']), print_format='path').rstrip('\n') ENV_VALS['CHPL_LAUNCHER_SUBDIR'] = printchplenv(set(['launcher']), print_format='path').rstrip('\n') ENV_VALS['CHPL_COMPILER_SUBDIR'] = printchplenv(set(['compiler']), print_format='path').rstrip('\n') @@ -348,7 +348,7 @@ def filter_tidy(chpl_env): locale = ENV_VALS['CHPL_LOCALE_MODEL'] gpu = ENV_VALS[' CHPL_GPU'] host_mem = ENV_VALS['CHPL_HOST_MEM'] - tgt_mem = ENV_VALS['CHPL_MEM'] + tgt_mem = ENV_VALS['CHPL_TARGET_MEM'] hwloc = ENV_VALS['CHPL_HWLOC'] if chpl_env.name == ' CHPL_COMM_SUBSTRATE': From 720e9842dbb3d7460334dc7ef6065c34d3899f0c Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 25 Nov 2024 11:09:55 -0800 Subject: [PATCH 03/17] update uses Signed-off-by: Jade Abraham --- compiler/main/driver.cpp | 4 +-- .../developer/bestPractices/Sanitizers.rst | 4 +-- doc/rst/developer/bestPractices/Valgrind.rst | 2 +- doc/rst/developer/chips/inactive/18.rst | 4 +-- doc/rst/technotes/allocators.rst | 2 +- doc/rst/usingchapel/chplenv.rst | 31 +++++++++++++++++-- make/compiler/Makefile.sanitizers | 2 +- modules/standard/ChplConfig.chpl | 18 ++++++----- runtime/include/chplcgfns.h | 2 +- runtime/src/comm/ugni/comm-ugni-heap-pages.c | 2 +- runtime/src/comm/ugni/comm-ugni.c | 2 +- runtime/src/mem/cstdlib/mem-cstdlib.c | 2 +- .../chplenv/chplconfig/correctness/chplconfig | 2 +- .../chplconfig/correctness/correctness.chpl | 2 +- test/chplenv/printchplenv/printchplenv.chpl | 2 +- .../chplenv/printchplenv/printchplenvAll.chpl | 2 +- test/compflags/albrecht/chplenv/chplenv.chpl | 2 +- .../albrecht/chplenv/chplenv.compenv | 2 +- .../albrecht/chplenv/generateChplEnvFiles | 2 +- test/modules/OS.skipif | 2 +- .../comm/ugni/SIGBUS-heap-extend.skipif | 2 +- .../ugni/overflow-mem-region-table.skipif | 2 +- .../configMatters/mem/fragmentation/SKIPIF | 2 +- test/setchplenv/verify_setchplenv_scripts.py | 2 +- .../parallel/coforall-mod/coforall-mod.skipif | 2 +- util/build_configs/build_configs.py | 2 +- util/cron/common-asan.bash | 2 +- util/cron/common-jemalloc.bash | 2 +- util/cron/common-valgrind.bash | 2 +- util/devel/test/run-tests-gnu-parallel.sh | 2 +- util/packaging/homebrew/chapel-main.rb | 2 +- util/quickstart/setchplenv.bash | 4 +-- util/quickstart/setchplenv.csh | 4 +-- util/quickstart/setchplenv.fish | 4 +-- util/quickstart/setchplenv.sh | 6 ++-- 35 files changed, 81 insertions(+), 50 deletions(-) diff --git a/compiler/main/driver.cpp b/compiler/main/driver.cpp index f8f27ce58ce8..667582e6419c 100644 --- a/compiler/main/driver.cpp +++ b/compiler/main/driver.cpp @@ -104,7 +104,7 @@ const char* CHPL_COMM_OFI_OOB = NULL; const char* CHPL_TASKS = NULL; const char* CHPL_LAUNCHER = NULL; const char* CHPL_TIMERS = NULL; -const char* CHPL_MEM = NULL; +const char* CHPL_TARGET_MEM = NULL; const char* CHPL_MAKE = NULL; const char* CHPL_ATOMICS = NULL; const char* CHPL_NETWORK_ATOMICS = NULL; @@ -1802,7 +1802,7 @@ static void setChapelEnvs() { CHPL_TASKS = envMap["CHPL_TASKS"]; CHPL_LAUNCHER = envMap["CHPL_LAUNCHER"]; CHPL_TIMERS = envMap["CHPL_TIMERS"]; - CHPL_MEM = envMap["CHPL_MEM"]; + CHPL_TARGET_MEM = envMap["CHPL_TARGET_MEM"]; CHPL_MAKE = envMap["CHPL_MAKE"]; CHPL_ATOMICS = envMap["CHPL_ATOMICS"]; CHPL_NETWORK_ATOMICS = envMap["CHPL_NETWORK_ATOMICS"]; diff --git a/doc/rst/developer/bestPractices/Sanitizers.rst b/doc/rst/developer/bestPractices/Sanitizers.rst index 5e961807f7eb..caa7a7b2511d 100644 --- a/doc/rst/developer/bestPractices/Sanitizers.rst +++ b/doc/rst/developer/bestPractices/Sanitizers.rst @@ -19,7 +19,7 @@ To use AddressSanitizer with Chapel-generated executables only: .. code-block:: bash - export CHPL_MEM=cstdlib + export CHPL_TARGET_MEM=cstdlib export CHPL_TASKS=fifo export CHPL_LLVM=none # or set CHPL_TARGET_COMPILER to gnu, clang, etc. export CHPL_SANITIZE_EXE=address @@ -34,7 +34,7 @@ To use it with both the Chapel compiler and its generated executables: .. code-block:: bash - export CHPL_MEM=cstdlib + export CHPL_TARGET_MEM=cstdlib export CHPL_TASKS=fifo export CHPL_LLVM=none export CHPL_HOST_MEM=cstdlib diff --git a/doc/rst/developer/bestPractices/Valgrind.rst b/doc/rst/developer/bestPractices/Valgrind.rst index 3a36cfbb5b42..2ee87d3bd6b9 100644 --- a/doc/rst/developer/bestPractices/Valgrind.rst +++ b/doc/rst/developer/bestPractices/Valgrind.rst @@ -13,7 +13,7 @@ To run ``valgrind`` on an executable generated by the ``chpl`` compiler: .. code-block:: bash - export CHPL_MEM=cstdlib + export CHPL_TARGET_MEM=cstdlib export CHPL_TASKS=fifo export CHPL_RT_NUM_THREADS_PER_LOCALE=450 export CHPL_RE2_VALGRIND_SUPPORT=true diff --git a/doc/rst/developer/chips/inactive/18.rst b/doc/rst/developer/chips/inactive/18.rst index ef5965f44c59..eb50435f1234 100644 --- a/doc/rst/developer/chips/inactive/18.rst +++ b/doc/rst/developer/chips/inactive/18.rst @@ -371,7 +371,7 @@ Current Status .............. Single-ddata with separate arrays is currently implemented in cases -where ``CHPL_COMM=ugni``, ``CHPL_MEM=jemalloc``, and hugepages are +where ``CHPL_COMM=ugni``, ``CHPL_TARGET_MEM=jemalloc``, and hugepages are present. This includes the default configurations on Cray XC systems, where memory needs to be registered with the Aries NIC. Only arrays that occupy at least 2 hugepages worth of memory are allocated @@ -817,7 +817,7 @@ solution in the sense of providing adequate performance in all common circumstances, or even all desired ones. Currently Chapel uses single-ddata with separate arrays in -configurations where ``CHPL_COMM=ugni``, ``CHPL_MEM=jemalloc`` and +configurations where ``CHPL_COMM=ugni``, ``CHPL_TARGET_MEM=jemalloc`` and hugepages are in use (thus memory is registered), which includes the default configurations on Cray XC systems. It uses plain single-ddata in all other cases. (More details are available in the `Single-ddata diff --git a/doc/rst/technotes/allocators.rst b/doc/rst/technotes/allocators.rst index eb5c1fb4e913..bc0f34eb94ad 100644 --- a/doc/rst/technotes/allocators.rst +++ b/doc/rst/technotes/allocators.rst @@ -4,7 +4,7 @@ Using the Chapel Allocator from C ================================= -The Chapel runtime will select an allocator according to the ``CHPL_MEM`` +The Chapel runtime will select an allocator according to the ``CHPL_TARGET_MEM`` environment variable. See :ref:`readme-chplenv` for details on how that works. The default is usually the system allocator (ie malloc/free as supported by the C compiler and runtime) but some configurations use a diff --git a/doc/rst/usingchapel/chplenv.rst b/doc/rst/usingchapel/chplenv.rst index 5ca00ee6daf0..cf6ca84fd190 100644 --- a/doc/rst/usingchapel/chplenv.rst +++ b/doc/rst/usingchapel/chplenv.rst @@ -488,6 +488,11 @@ CHPL_COMM CHPL_MEM ~~~~~~~~ + + .. warning:: + + ``CHPL_MEM`` has been deprecated and renamed to :ref:`readme-chplenv.CHPL_TARGET_MEM` + Optionally, the ``CHPL_MEM`` environment variable can be used to select a memory management layer. Current options are: @@ -501,8 +506,30 @@ CHPL_MEM If unset, ``CHPL_MEM`` defaults to ``jemalloc`` for most configurations. If the target platform is ``cygwin*`` it defaults to ``cstdlib`` - ``CHPL_TARGET_MEM`` will be replacing ``CHPL_MEM`` in the - future. ``CHPL_TARGET_MEM`` takes precedence over ``CHPL_MEM``. + .. note:: + Certain ``CHPL_COMM`` settings (e.g. ugni, gasnet segment fast/large, + ofi with the gni provider) register the heap to improve communication + performance. Registering the heap requires special allocator support + that not all allocators provide. Currently only ``jemalloc`` is capable + of supporting configurations that require a registered heap. + +.. _readme-chplenv.CHPL_TARGET_MEM: + +CHPL_TARGET_MEM +~~~~~~~~~~~~~~~ + + Optionally, the ``CHPL_TARGET_MEM`` environment variable can be used to select + a memory management layer. Current options are: + + ========= ======================================================= + Value Description + ========= ======================================================= + cstdlib use the standard C malloc/free commands + jemalloc use Jason Evan's memory allocator + ========= ======================================================= + + If unset, ``CHPL_TARGET_MEM`` defaults to ``jemalloc`` for most configurations. + If the target platform is ``cygwin*`` it defaults to ``cstdlib`` .. note:: Certain ``CHPL_COMM`` settings (e.g. ugni, gasnet segment fast/large, diff --git a/make/compiler/Makefile.sanitizers b/make/compiler/Makefile.sanitizers index d031a6fdc997..695295c0ce91 100644 --- a/make/compiler/Makefile.sanitizers +++ b/make/compiler/Makefile.sanitizers @@ -31,7 +31,7 @@ ifneq ($(CHPL_MAKE_SANITIZE), none) endif endif ifneq ($(CHPL_MAKE_TARGET_MEM), cstdlib) - $(error CHPL_MEM=cstdlib is required for sanitizers) + $(error CHPL_TARGET_MEM=cstdlib is required for sanitizers) endif ifeq ($(strip $(CHPL_MAKE_HOST_TARGET)),--host) ifneq ($(CHPL_MAKE_HOST_MEM), cstdlib) diff --git a/modules/standard/ChplConfig.chpl b/modules/standard/ChplConfig.chpl index 1e21654bc79e..3101d8a461db 100644 --- a/modules/standard/ChplConfig.chpl +++ b/modules/standard/ChplConfig.chpl @@ -129,10 +129,14 @@ module ChplConfig { param CHPL_UNWIND:string; CHPL_UNWIND = __primitive("get compiler variable", "CHPL_UNWIND"); + /* See :ref:`readme-chplenv.CHPL_TARGET_MEM` for more information. */ + @unstable("'ChplConfig.CHPL_TARGET_MEM' is unstable and may be replaced with a different way to access this information in the future") + param CHPL_TARGET_MEM:string; + CHPL_TARGET_MEM = __primitive("get compiler variable", "CHPL_TARGET_MEM"); + /* See :ref:`readme-chplenv.CHPL_MEM` for more information. */ - @unstable("'ChplConfig.CHPL_MEM' is unstable and may be replaced with a different way to access this information in the future") - param CHPL_MEM:string; - CHPL_MEM = __primitive("get compiler variable", "CHPL_MEM"); + @deprecated("'ChplConfig.CHPL_MEM' is deprecated, please use :param:`ChplConfig.CHPL_MEM`") + param CHPL_MEM:string = CHPL_TARGET_MEM; /* See :ref:`readme-chplenv.CHPL_MAKE` for more information. */ @unstable("'ChplConfig.CHPL_MAKE' is unstable and may be replaced with a different way to access this information in the future") @@ -164,10 +168,10 @@ module ChplConfig { CHPL_HWLOC_PCI = __primitive("get compiler variable", "CHPL_HWLOC_PCI"); @chpldoc.nodoc - @unstable("'ChplConfig.CHPL_JEMALLOC' is unstable and may be replaced with a different way to access this information in the future") - /* See :ref:`readme-chplenv.CHPL_JEMALLOC` for more information. */ - param CHPL_JEMALLOC:string; - CHPL_JEMALLOC = __primitive("get compiler variable", "CHPL_TARGET_JEMALLOC"); + @unstable("'ChplConfig.CHPL_TARGET_JEMALLOC' is unstable and may be replaced with a different way to access this information in the future") + /* See :ref:`readme-chplenv.CHPL_TARGET_JEMALLOC` for more information. */ + param CHPL_TARGET_JEMALLOC:string; + CHPL_TARGET_JEMALLOC = __primitive("get compiler variable", "CHPL_TARGET_JEMALLOC"); /* See :ref:`readme-chplenv.CHPL_RE2` for more information. */ @unstable("'ChplConfig.CHPL_RE2' is unstable and may be replaced with a different way to access this information in the future") diff --git a/runtime/include/chplcgfns.h b/runtime/include/chplcgfns.h index 8842041c6108..476c43d698f5 100644 --- a/runtime/include/chplcgfns.h +++ b/runtime/include/chplcgfns.h @@ -62,7 +62,7 @@ extern const char* CHPL_COMM_OFI_OOB; extern const char* CHPL_TASKS; extern const char* CHPL_LAUNCHER; extern const char* CHPL_TIMERS; -extern const char* CHPL_MEM; +extern const char* CHPL_TARGET_MEM; extern const char* CHPL_MAKE; extern const char* CHPL_ATOMICS; extern const char* CHPL_NETWORK_ATOMICS; diff --git a/runtime/src/comm/ugni/comm-ugni-heap-pages.c b/runtime/src/comm/ugni/comm-ugni-heap-pages.c index 36324b6268a2..f070fd4eacb4 100644 --- a/runtime/src/comm/ugni/comm-ugni-heap-pages.c +++ b/runtime/src/comm/ugni/comm-ugni-heap-pages.c @@ -74,7 +74,7 @@ void set_hps(void) // hugepages, then the heap page size is the hugepage size. // char* ev; - if (strcmp(CHPL_MEM, "jemalloc") == 0 + if (strcmp(CHPL_TARGET_MEM, "jemalloc") == 0 && chpl_env_rt_get("MAX_HEAP_SIZE", NULL) == NULL && (ev = getenv("HUGETLB_DEFAULT_PAGE_SIZE")) != NULL) { hps = chpl_env_str_to_size("HUGETLB_DEFAULT_PAGE_SIZE", ev, hps); diff --git a/runtime/src/comm/ugni/comm-ugni.c b/runtime/src/comm/ugni/comm-ugni.c index 098a331c8089..4d6d3923dd2b 100644 --- a/runtime/src/comm/ugni/comm-ugni.c +++ b/runtime/src/comm/ugni/comm-ugni.c @@ -1989,7 +1989,7 @@ void chpl_comm_post_task_init(void) 0, 0); } - if (strcmp(CHPL_MEM, "jemalloc") == 0 + if (strcmp(CHPL_TARGET_MEM, "jemalloc") == 0 && getenv(chpl_comm_ugni_jemalloc_conf_ev_name()) == NULL) { char buf[200]; (void) snprintf(buf, sizeof(buf), diff --git a/runtime/src/mem/cstdlib/mem-cstdlib.c b/runtime/src/mem/cstdlib/mem-cstdlib.c index 4ec680c90e8b..5fa9c808cf5b 100644 --- a/runtime/src/mem/cstdlib/mem-cstdlib.c +++ b/runtime/src/mem/cstdlib/mem-cstdlib.c @@ -37,7 +37,7 @@ void chpl_mem_layerInit(void) { chpl_comm_regMemHeapInfo(&start, &size); if (start || size) { - chpl_error("Your CHPL_MEM setting doesn't support the registered heap " + chpl_error("Your CHPL_TARGET_MEM setting doesn't support the registered heap " "required by your CHPL_COMM setting. You'll need to change one " "of these configurations.", 0, 0); } diff --git a/test/chplenv/chplconfig/correctness/chplconfig b/test/chplenv/chplconfig/correctness/chplconfig index 320f87393a20..ffd19b89e453 100644 --- a/test/chplenv/chplconfig/correctness/chplconfig +++ b/test/chplenv/chplconfig/correctness/chplconfig @@ -15,7 +15,7 @@ CHPL_TASKS=qthreads CHPL_LAUNCHER=none CHPL_TIMERS=generic CHPL_UNWIND=none -CHPL_MEM=jemalloc +CHPL_TARGET_MEM=jemalloc CHPL_ATOMICS=intrinsics CHPL_NETWORK_ATOMICS=none CHPL_GMP=none diff --git a/test/chplenv/chplconfig/correctness/correctness.chpl b/test/chplenv/chplconfig/correctness/correctness.chpl index 9d6d59bc83f2..9c7a1f4351ec 100644 --- a/test/chplenv/chplconfig/correctness/correctness.chpl +++ b/test/chplenv/chplconfig/correctness/correctness.chpl @@ -17,7 +17,7 @@ writeln("CHPL_TASKS: qthreads +"); writeln("CHPL_LAUNCHER: none +"); writeln("CHPL_TIMERS: generic +"); writeln("CHPL_UNWIND: none +"); -writeln("CHPL_MEM: jemalloc +"); +writeln("CHPL_TARGET_MEM: jemalloc +"); writeln("CHPL_ATOMICS: intrinsics +"); writeln("CHPL_GMP: none +"); writeln("CHPL_HWLOC: bundled +"); diff --git a/test/chplenv/printchplenv/printchplenv.chpl b/test/chplenv/printchplenv/printchplenv.chpl index ae022b595b74..04a03dc53251 100644 --- a/test/chplenv/printchplenv/printchplenv.chpl +++ b/test/chplenv/printchplenv/printchplenv.chpl @@ -18,7 +18,7 @@ writeln('CHPL_TASKS: ', CHPL_TASKS); writeln('CHPL_LAUNCHER: ', CHPL_LAUNCHER); writeln('CHPL_TIMERS: ', CHPL_TIMERS); writeln('CHPL_UNWIND: ', CHPL_UNWIND); -writeln('CHPL_MEM: ', CHPL_MEM); +writeln('CHPL_TARGET_MEM: ', CHPL_TARGET_MEM); writeln('CHPL_ATOMICS: ', CHPL_ATOMICS); if CHPL_COMM != 'none' then writeln(' CHPL_NETWORK_ATOMICS: ', CHPL_NETWORK_ATOMICS); diff --git a/test/chplenv/printchplenv/printchplenvAll.chpl b/test/chplenv/printchplenv/printchplenvAll.chpl index 152ecea07b30..d66f6c789948 100644 --- a/test/chplenv/printchplenv/printchplenvAll.chpl +++ b/test/chplenv/printchplenv/printchplenvAll.chpl @@ -21,7 +21,7 @@ writeln('CHPL_TASKS: ', CHPL_TASKS); writeln('CHPL_LAUNCHER: ', CHPL_LAUNCHER); writeln('CHPL_TIMERS: ', CHPL_TIMERS); writeln('CHPL_UNWIND: ', CHPL_UNWIND); -writeln('CHPL_MEM: ', CHPL_MEM); +writeln('CHPL_TARGET_MEM: ', CHPL_TARGET_MEM); writeln('CHPL_ATOMICS: ', CHPL_ATOMICS); if CHPL_COMM != 'none' then writeln(' CHPL_NETWORK_ATOMICS: ', CHPL_NETWORK_ATOMICS); diff --git a/test/compflags/albrecht/chplenv/chplenv.chpl b/test/compflags/albrecht/chplenv/chplenv.chpl index 358bd8645122..7c9d257ff7ee 100644 --- a/test/compflags/albrecht/chplenv/chplenv.chpl +++ b/test/compflags/albrecht/chplenv/chplenv.chpl @@ -19,7 +19,7 @@ writeln("CHPL_TASKS=",CHPL_TASKS); writeln("CHPL_LAUNCHER=",CHPL_LAUNCHER); writeln("CHPL_TIMERS=",CHPL_TIMERS); writeln("CHPL_UNWIND=",CHPL_UNWIND); -writeln("CHPL_MEM=",CHPL_MEM); +writeln("CHPL_TARGET_MEM=",CHPL_TARGET_MEM); writeln("CHPL_ATOMICS=",CHPL_ATOMICS); writeln("CHPL_NETWORK_ATOMICS=",CHPL_NETWORK_ATOMICS); writeln("CHPL_GMP=",CHPL_GMP); diff --git a/test/compflags/albrecht/chplenv/chplenv.compenv b/test/compflags/albrecht/chplenv/chplenv.compenv index f911523b5e37..36ff9e25d541 100644 --- a/test/compflags/albrecht/chplenv/chplenv.compenv +++ b/test/compflags/albrecht/chplenv/chplenv.compenv @@ -8,7 +8,7 @@ CHPL_GASNET_SEGMENT=bad CHPL_TASKS=bad CHPL_LAUNCHER=bad CHPL_TIMERS=bad -CHPL_MEM=bad +CHPL_TARGET_MEM=bad CHPL_ATOMICS=bad CHPL_NETWORK_ATOMICS=bad CHPL_GMP=bad diff --git a/test/compflags/albrecht/chplenv/generateChplEnvFiles b/test/compflags/albrecht/chplenv/generateChplEnvFiles index a6b70221a419..b56f91d61763 100755 --- a/test/compflags/albrecht/chplenv/generateChplEnvFiles +++ b/test/compflags/albrecht/chplenv/generateChplEnvFiles @@ -69,7 +69,7 @@ generateCompopts() { "CHPL_TIMERS") compopts="$compopts --$flag=$value" ;; - "CHPL_MEM") + "CHPL_TARGET_MEM") compopts="$compopts --$flag=$value" ;; "CHPL_ATOMICS") diff --git a/test/modules/OS.skipif b/test/modules/OS.skipif index a05ebf58e8c1..2435555da552 100644 --- a/test/modules/OS.skipif +++ b/test/modules/OS.skipif @@ -1,7 +1,7 @@ # This module should be insensitive to the Chapel configuration, so it # should be sufficient to test it only in the standard one. CHPL_COMM != none -CHPL_MEM != jemalloc +CHPL_TARGET_MEM != jemalloc CHPL_TASKS != qthreads COMPOPTS <= --baseline COMPOPTS <= --no-local diff --git a/test/runtime/configMatters/comm/ugni/SIGBUS-heap-extend.skipif b/test/runtime/configMatters/comm/ugni/SIGBUS-heap-extend.skipif index cbd3343d77fb..83514e1072ac 100755 --- a/test/runtime/configMatters/comm/ugni/SIGBUS-heap-extend.skipif +++ b/test/runtime/configMatters/comm/ugni/SIGBUS-heap-extend.skipif @@ -5,7 +5,7 @@ # for a really long time and nevertheless may not fail. import os -print(os.getenv('CHPL_MEM') != 'jemalloc' or +print(os.getenv('CHPL_TARGET_MEM') != 'jemalloc' or os.getenv('HUGETLB_DEFAULT_PAGE_SIZE') == None or os.getenv('CHPL_RT_MAX_HEAP_SIZE') != None or os.getenv('CHPL_TARGET_CPU', '') in ['aarch64', diff --git a/test/runtime/configMatters/comm/ugni/overflow-mem-region-table.skipif b/test/runtime/configMatters/comm/ugni/overflow-mem-region-table.skipif index ab4f43121506..dd0c6716197d 100755 --- a/test/runtime/configMatters/comm/ugni/overflow-mem-region-table.skipif +++ b/test/runtime/configMatters/comm/ugni/overflow-mem-region-table.skipif @@ -4,7 +4,7 @@ # and dynamic heap extension. import os -print(os.getenv('CHPL_MEM') != 'jemalloc' or +print(os.getenv('CHPL_TARGET_MEM') != 'jemalloc' or os.getenv('HUGETLB_DEFAULT_PAGE_SIZE') == None or os.getenv('CHPL_RT_MAX_HEAP_SIZE') != None) diff --git a/test/runtime/configMatters/mem/fragmentation/SKIPIF b/test/runtime/configMatters/mem/fragmentation/SKIPIF index 0fe486e530e2..258dc2896083 100644 --- a/test/runtime/configMatters/mem/fragmentation/SKIPIF +++ b/test/runtime/configMatters/mem/fragmentation/SKIPIF @@ -1,5 +1,5 @@ # skip cstdlib allocator since fragmentation handling will be system specific -CHPL_MEM == cstdlib +CHPL_TARGET_MEM == cstdlib # most tests use a lot of memory, so skip for configs that might share nodes CHPL_LAUNCHER == none diff --git a/test/setchplenv/verify_setchplenv_scripts.py b/test/setchplenv/verify_setchplenv_scripts.py index 92805b2316a8..91f09b3686af 100644 --- a/test/setchplenv/verify_setchplenv_scripts.py +++ b/test/setchplenv/verify_setchplenv_scripts.py @@ -157,7 +157,7 @@ def get_path_var(var_name): self.assertEqual('none', get_var('CHPL_GMP')) self.assertEqual('none', get_var('CHPL_RE2')) self.assertTrue('none' == got_llvm or 'system' == got_llvm) - self.assertEqual('cstdlib', get_var('CHPL_MEM')) + self.assertEqual('cstdlib', get_var('CHPL_TARGET_MEM')) def check_scripts(self, shell, source_cmd, path_sep, post_source_cmd=None, shell_cmd=None): diff --git a/test/types/records/ferguson/parallel/coforall-mod/coforall-mod.skipif b/test/types/records/ferguson/parallel/coforall-mod/coforall-mod.skipif index 645478fd4c76..a9e638a52134 100644 --- a/test/types/records/ferguson/parallel/coforall-mod/coforall-mod.skipif +++ b/test/types/records/ferguson/parallel/coforall-mod/coforall-mod.skipif @@ -1,3 +1,3 @@ -# For some reason compopts: 1 passes with CHPL_MEM=jemalloc, CHPL_COMM=none. +# For some reason compopts: 1 passes with CHPL_TARGET_MEM=jemalloc, CHPL_COMM=none. # Only run under valgrind so we can get a reliable failure mode. CHPL_TEST_VGRND_EXE != on diff --git a/util/build_configs/build_configs.py b/util/build_configs/build_configs.py index 77e1b5340f1b..61a253bb5c01 100755 --- a/util/build_configs/build_configs.py +++ b/util/build_configs/build_configs.py @@ -99,7 +99,7 @@ def validate(self): ( 'launcher', 'CHPL_LAUNCHER', ), ( 'timers', 'CHPL_TIMERS', ), ( 'unwind', 'CHPL_UNWIND', ), - ( 'mem', 'CHPL_MEM', ), + ( 'mem', 'CHPL_TARGET_MEM', ), ( 'atomics', 'CHPL_ATOMICS', ), ( 'network_atomics', 'CHPL_NETWORK_ATOMICS', ), ( 'gmp', 'CHPL_GMP', ), diff --git a/util/cron/common-asan.bash b/util/cron/common-asan.bash index c412b4cb7080..e08ddd29cde2 100644 --- a/util/cron/common-asan.bash +++ b/util/cron/common-asan.bash @@ -4,7 +4,7 @@ UTIL_CRON_DIR=$(cd $(dirname ${BASH_SOURCE[0]}) ; pwd) -export CHPL_MEM=cstdlib +export CHPL_TARGET_MEM=cstdlib export CHPL_HOST_MEM=cstdlib export CHPL_TASKS=fifo export CHPL_LLVM=none diff --git a/util/cron/common-jemalloc.bash b/util/cron/common-jemalloc.bash index a13791404c0d..abd6c39c3fc3 100644 --- a/util/cron/common-jemalloc.bash +++ b/util/cron/common-jemalloc.bash @@ -3,4 +3,4 @@ # Configure environment for jemalloc testing. This should be sourced by other # scripts that wish to make use of the variables set here. -export CHPL_MEM=jemalloc +export CHPL_TARGET_MEM=jemalloc diff --git a/util/cron/common-valgrind.bash b/util/cron/common-valgrind.bash index 382917867fa6..19314446b150 100644 --- a/util/cron/common-valgrind.bash +++ b/util/cron/common-valgrind.bash @@ -11,7 +11,7 @@ export CHPL_RT_NUM_THREADS_PER_LOCALE=450 export CHPL_RT_NUM_THREADS_PER_LOCALE_QUIET=yes # jemalloc doesn't work with valgrind, so use cstdlib -export CHPL_MEM=cstdlib +export CHPL_TARGET_MEM=cstdlib # re2 has opt-in support for valgrind, so enable it export CHPL_RE2_VALGRIND_SUPPORT=true diff --git a/util/devel/test/run-tests-gnu-parallel.sh b/util/devel/test/run-tests-gnu-parallel.sh index 49d294032e09..5e59f4643fb8 100755 --- a/util/devel/test/run-tests-gnu-parallel.sh +++ b/util/devel/test/run-tests-gnu-parallel.sh @@ -57,7 +57,7 @@ fi # Make sure we have basic environment. unset CHPL_DEVELOPER -unset CHPL_MEM +unset CHPL_TARGET_MEM unset CHPL_TASKS unset CHPL_COMM unset CHPL_ATOMICS diff --git a/util/packaging/homebrew/chapel-main.rb b/util/packaging/homebrew/chapel-main.rb index 6c3502ff2c2b..d21e71b45ce8 100644 --- a/util/packaging/homebrew/chapel-main.rb +++ b/util/packaging/homebrew/chapel-main.rb @@ -50,7 +50,7 @@ def install (libexec/"chplconfig").write <<~EOS CHPL_RE2=bundled CHPL_GMP=system - CHPL_MEM=jemalloc + CHPL_TARGET_MEM=jemalloc CHPL_TARGET_JEMALLOC=system CHPL_HWLOC=system CHPL_LLVM_CONFIG=#{llvm.opt_bin}/llvm-config diff --git a/util/quickstart/setchplenv.bash b/util/quickstart/setchplenv.bash index b0271b00f8bb..4d3a800edc8f 100644 --- a/util/quickstart/setchplenv.bash +++ b/util/quickstart/setchplenv.bash @@ -55,8 +55,8 @@ export CHPL_COMM=none echo "Setting CHPL_TASKS to fifo" export CHPL_TASKS=fifo -echo "Setting CHPL_MEM to cstdlib" -export CHPL_MEM=cstdlib +echo "Setting CHPL_TARGET_MEM to cstdlib" +export CHPL_TARGET_MEM=cstdlib echo "Setting CHPL_HOST_MEM to cstdlib" export CHPL_HOST_MEM=cstdlib diff --git a/util/quickstart/setchplenv.csh b/util/quickstart/setchplenv.csh index b0a2229d6cc6..20ab15ad6777 100644 --- a/util/quickstart/setchplenv.csh +++ b/util/quickstart/setchplenv.csh @@ -44,8 +44,8 @@ setenv CHPL_COMM none echo "Setting CHPL_TASKS to fifo" setenv CHPL_TASKS fifo -echo "Setting CHPL_MEM to cstdlib" -setenv CHPL_MEM cstdlib +echo "Setting CHPL_TARGET_MEM to cstdlib" +setenv CHPL_TARGET_MEM cstdlib echo "Setting CHPL_HOST_MEM to cstdlib" setenv CHPL_HOST_MEM cstdlib diff --git a/util/quickstart/setchplenv.fish b/util/quickstart/setchplenv.fish index 9406c2de823c..b5d15f12d815 100644 --- a/util/quickstart/setchplenv.fish +++ b/util/quickstart/setchplenv.fish @@ -48,8 +48,8 @@ set -x CHPL_COMM none echo "Setting CHPL_TASKS to fifo" set -x CHPL_TASKS fifo -echo "Setting CHPL_MEM to cstdlib" -set -x CHPL_MEM cstdlib +echo "Setting CHPL_TARGET_MEM to cstdlib" +set -x CHPL_TARGET_MEM cstdlib echo "Setting CHPL_HOST_MEM to cstdlib" set -x CHPL_HOST_MEM cstdlib diff --git a/util/quickstart/setchplenv.sh b/util/quickstart/setchplenv.sh index ef848df7d777..92575e4ecf56 100644 --- a/util/quickstart/setchplenv.sh +++ b/util/quickstart/setchplenv.sh @@ -57,9 +57,9 @@ export CHPL_TASKS echo " ...fifo" echo " " -echo "Setting CHPL_MEM to..." -CHPL_MEM=cstdlib -export CHPL_MEM +echo "Setting CHPL_TARGET_MEM to..." +CHPL_TARGET_MEM=cstdlib +export CHPL_TARGET_MEM echo " ...cstdlib" echo " " From 7abca0f593f4e16aceb59c0a2495126440ba5ff2 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 25 Nov 2024 11:10:06 -0800 Subject: [PATCH 04/17] add deprecation test Signed-off-by: Jade Abraham --- test/deprecated/chplenv/chplMemConfig.chpl | 2 ++ test/deprecated/chplenv/chplMemConfig.good | 1 + test/deprecated/chplenv/chplMemPrintChplEnv.chpl | 1 + test/deprecated/chplenv/chplMemPrintChplEnv.good | 2 ++ test/deprecated/chplenv/chplMemPrintChplEnv.prediff | 9 +++++++++ 5 files changed, 15 insertions(+) create mode 100644 test/deprecated/chplenv/chplMemConfig.chpl create mode 100644 test/deprecated/chplenv/chplMemConfig.good create mode 100644 test/deprecated/chplenv/chplMemPrintChplEnv.chpl create mode 100644 test/deprecated/chplenv/chplMemPrintChplEnv.good create mode 100755 test/deprecated/chplenv/chplMemPrintChplEnv.prediff diff --git a/test/deprecated/chplenv/chplMemConfig.chpl b/test/deprecated/chplenv/chplMemConfig.chpl new file mode 100644 index 000000000000..17b3d9f8fca5 --- /dev/null +++ b/test/deprecated/chplenv/chplMemConfig.chpl @@ -0,0 +1,2 @@ +use ChplConfig; +assert(CHPL_MEM == CHPL_TARGET_MEM); diff --git a/test/deprecated/chplenv/chplMemConfig.good b/test/deprecated/chplenv/chplMemConfig.good new file mode 100644 index 000000000000..802f6da2dad1 --- /dev/null +++ b/test/deprecated/chplenv/chplMemConfig.good @@ -0,0 +1 @@ +chplMemConfig.chpl:2: warning: 'ChplConfig.CHPL_MEM' is deprecated, please use ChplConfig.CHPL_MEM diff --git a/test/deprecated/chplenv/chplMemPrintChplEnv.chpl b/test/deprecated/chplenv/chplMemPrintChplEnv.chpl new file mode 100644 index 000000000000..4b1056a5dd7c --- /dev/null +++ b/test/deprecated/chplenv/chplMemPrintChplEnv.chpl @@ -0,0 +1 @@ +; // the real test occurs in the prediff diff --git a/test/deprecated/chplenv/chplMemPrintChplEnv.good b/test/deprecated/chplenv/chplMemPrintChplEnv.good new file mode 100644 index 000000000000..8f64e5182b5d --- /dev/null +++ b/test/deprecated/chplenv/chplMemPrintChplEnv.good @@ -0,0 +1,2 @@ +Warning: CHPL_MEM is deprecated, please unset it and use CHPL_TARGET_MEM +Warning: CHPL_JEMALLOC is deprecated, please unset it and use CHPL_TARGET_JEMALLOC diff --git a/test/deprecated/chplenv/chplMemPrintChplEnv.prediff b/test/deprecated/chplenv/chplMemPrintChplEnv.prediff new file mode 100755 index 000000000000..01fa57df273b --- /dev/null +++ b/test/deprecated/chplenv/chplMemPrintChplEnv.prediff @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + + +# exec printchplenv and capture stderr +unset CHPL_TARGET_JEMALLOC +export CHPL_JEMALLOC=bundled +unset CHPL_TARGET_MEM +export CHPL_MEM=jemalloc +$CHPL_HOME/util/printchplenv --all >/dev/null 2>$2 From a3ce2458c04149883ccf0644ab2f28941e9758fe Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 25 Nov 2024 11:15:19 -0800 Subject: [PATCH 05/17] commit header change Signed-off-by: Jade Abraham --- compiler/include/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/include/driver.h b/compiler/include/driver.h index cc2af3464386..00edb4a5cde1 100644 --- a/compiler/include/driver.h +++ b/compiler/include/driver.h @@ -128,7 +128,7 @@ extern const char* CHPL_COMM_OFI_OOB; extern const char* CHPL_TASKS; extern const char* CHPL_LAUNCHER; extern const char* CHPL_TIMERS; -extern const char* CHPL_MEM; +extern const char* CHPL_TARGET_MEM; extern const char* CHPL_MAKE; extern const char* CHPL_ATOMICS; extern const char* CHPL_NETWORK_ATOMICS; From 5ca6753dc0ef51f1007364b83b59776676faa6dc Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 2 Dec 2024 13:46:37 -0600 Subject: [PATCH 06/17] fix driver flag Signed-off-by: Jade Abraham --- compiler/main/driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/main/driver.cpp b/compiler/main/driver.cpp index 667582e6419c..dfc493308db9 100644 --- a/compiler/main/driver.cpp +++ b/compiler/main/driver.cpp @@ -1363,7 +1363,7 @@ static ArgumentDescription arg_desc[] = { {"lib-pic", ' ', "", "Specify whether to use position-dependent or position-independent code", "S", NULL, "_CHPL_LIB_PIC", setChplEnv}, {"locale-model", ' ', "", "Specify locale model to use", "S", NULL, "_CHPL_LOCALE_MODEL", setChplEnv}, {"make", ' ', "", "Make utility for generated code", "S", NULL, "_CHPL_MAKE", setChplEnv}, - {"mem", ' ', "", "Specify the memory manager", "S", NULL, "_CHPL_MEM", setChplEnv}, + {"target-mem", ' ', "", "Specify the memory manager", "S", NULL, "_CHPL_TARGET_MEM", setChplEnv}, {"re2", ' ', "", "Specify RE2 library", "S", NULL, "_CHPL_RE2", setChplEnv}, {"target-arch", ' ', "", "Target architecture / machine type", "S", NULL, "_CHPL_TARGET_ARCH", setChplEnv}, {"target-compiler", ' ', "", "Compiler for generated code", "S", NULL, "_CHPL_TARGET_COMPILER", setChplEnv}, From a439d85f6ce2610df27ff0561e560b304e9b53a0 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 9 Dec 2024 16:20:03 -0800 Subject: [PATCH 07/17] add license change Signed-off-by: Jade Abraham --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a1b6a70b43bd..d13b59dffb4e 100644 --- a/LICENSE +++ b/LICENSE @@ -74,7 +74,7 @@ The Chapel implementation is composed of two categories of code: gasnet only used when CHPL_COMM is 'gasnet' gmp only used when CHPL_GMP is 'gmp' hwloc only used when CHPL_HWLOC is 'hwloc' - jemalloc only used when CHPL_MEM is 'jemalloc' + jemalloc only used when CHPL_TARGET_MEM/CHPL_HOST_MEM is 'jemalloc' libfabric only used when CHPL_COMM is 'ofi' libunwind only used when CHPL_UNWIND is 'libunwind' llvm only used when CHPL_LLVM is 'llvm' From 82d33de1168e9ab16701bc017c82cb89884cee4c Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Fri, 13 Dec 2024 11:10:30 -0800 Subject: [PATCH 08/17] Fix spurious pathchk error output from configure Currently every Chapel `configure` I run on Linux (regardless of whether or not I pass `--prefix` or `--chpl-home`) prints the following spurious error the console as the first line of output: ``` pathchk: '': No such file or directory ``` Source inspection reveals the scripting here appears to be Just Plain Wrong: there's a `pathchk` command that is being passed garbage and doesn't accomplish its apparent intended purpose of validating the PREFIX/DEST_DIR. This commit fixes that scripting defect. Signed-off-by: Dan Bonachea --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1c6b1c192014..bfb3f826911d 100755 --- a/configure +++ b/configure @@ -83,7 +83,7 @@ CONFIGURED="" if [ "$DEST_DIR_SET" -ne 0 ] then case $DEST_DIR in - (/*) pathchk -- "$1";; + (/*) pathchk "$DEST_DIR" || exit -1 ;; (*) echo "error: expected an absolute directory name for --chpl-home: $DEST_DIR" exit -1 @@ -94,7 +94,7 @@ then CONFIGURED=configured-chpl-home else case $PREFIX in - (/*) pathchk -- "$1";; + (/*) pathchk "$PREFIX" || exit -1 ;; (*) echo "error: expected an absolute directory name for --prefix: $PREFIX" exit -1 From 64739307432ffab24d59c6a599955c7fa831c337 Mon Sep 17 00:00:00 2001 From: Brad Chamberlain Date: Fri, 13 Dec 2024 14:43:53 -0800 Subject: [PATCH 09/17] Revert name of dat file back to 8; label graph to indicate renaming The goal here is to avoid having to rename all our extant .dat files for this test --- Signed-off-by: Brad Chamberlain --- test/studies/shootout/submitted/revcomp-submitted.graph | 4 ++-- test/studies/shootout/submitted/revcomp9.perfexecopts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/studies/shootout/submitted/revcomp-submitted.graph b/test/studies/shootout/submitted/revcomp-submitted.graph index bc787373316e..e425335ff13d 100644 --- a/test/studies/shootout/submitted/revcomp-submitted.graph +++ b/test/studies/shootout/submitted/revcomp-submitted.graph @@ -1,5 +1,5 @@ perfkeys: real, real, real, real -graphkeys: release, submitted (3), submitted (5), submitted (9) -files: revcomp.dat, revcomp3-submitted.dat, revcomp5-submitted.dat, revcomp9-submitted.dat +graphkeys: release, submitted (3), submitted (5), submitted (9, was 8) +files: revcomp.dat, revcomp3-submitted.dat, revcomp5-submitted.dat, revcomp8-submitted.dat graphtitle: Submitted Reverse-complement Shootout Benchmark ylabel: Time (seconds) diff --git a/test/studies/shootout/submitted/revcomp9.perfexecopts b/test/studies/shootout/submitted/revcomp9.perfexecopts index c63f42eea5da..820df3ceef3c 100644 --- a/test/studies/shootout/submitted/revcomp9.perfexecopts +++ b/test/studies/shootout/submitted/revcomp9.perfexecopts @@ -1 +1 @@ ---n=0 < $CHPL_TEST_TMP_DIR/fasta.rvcmp # revcomp9-submitted +--n=0 < $CHPL_TEST_TMP_DIR/fasta.rvcmp # revcomp8-submitted From 020f1bcc35a3251e19083abe8ba6c9f31278bef3 Mon Sep 17 00:00:00 2001 From: Brad Chamberlain Date: Fri, 13 Dec 2024 14:56:54 -0800 Subject: [PATCH 10/17] Add a copy of binarytrees5.chpl to our submitted directory --- Signed-off-by: Brad Chamberlain --- .../submitted/binarytrees-submitted.graph | 6 +- .../shootout/submitted/binarytrees5.chpl | 96 +++++++++++++++++++ .../shootout/submitted/binarytrees5.good | 1 + .../submitted/binarytrees5.perfexecopts | 1 + .../shootout/submitted/binarytrees5.perfkeys | 1 + 5 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 test/studies/shootout/submitted/binarytrees5.chpl create mode 120000 test/studies/shootout/submitted/binarytrees5.good create mode 100644 test/studies/shootout/submitted/binarytrees5.perfexecopts create mode 120000 test/studies/shootout/submitted/binarytrees5.perfkeys diff --git a/test/studies/shootout/submitted/binarytrees-submitted.graph b/test/studies/shootout/submitted/binarytrees-submitted.graph index 46a57bef0b4c..a2bca43442e9 100644 --- a/test/studies/shootout/submitted/binarytrees-submitted.graph +++ b/test/studies/shootout/submitted/binarytrees-submitted.graph @@ -1,5 +1,5 @@ -perfkeys: real, real, real -graphkeys: release, submitted (3), submitted (4) -files: binarytrees.dat, binarytrees-submitted.dat, binarytrees4.dat +perfkeys: real, real, real, real +graphkeys: release, submitted (3), submitted (4), submitted (5) +files: binarytrees.dat, binarytrees-submitted.dat, binarytrees4.dat, binarytrees5.dat graphtitle: Submitted Binary Trees Shootout Benchmark (n=21) ylabel: Time (seconds) diff --git a/test/studies/shootout/submitted/binarytrees5.chpl b/test/studies/shootout/submitted/binarytrees5.chpl new file mode 100644 index 000000000000..d152250ab16f --- /dev/null +++ b/test/studies/shootout/submitted/binarytrees5.chpl @@ -0,0 +1,96 @@ +/* The Computer Language Benchmarks Game + https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ + + contributed by Jade Abraham + based on the Chapel #3 version by Casey Battaglino, Ben Harshbarger, and + Brad Chamberlain +*/ + +use Allocators, Math; + +config const n = 10; // the maximum tree depth + +proc main() { + const minDepth = 4, // the shallowest tree + maxDepth = max(minDepth + 2, n), // the deepest normal tree + strDepth = maxDepth + 1, // the depth of the "stretch" tree + depths = minDepth..maxDepth by 2, // the range of depths to create + nodeSize = 24; // the size of a node + var stats: [depths] (int,int); // stores statistics for the trees + + inline proc poolSize(depth, num=1) do return num*2**(depth+1)*nodeSize; + + // + // Create the short-lived "stretch" tree, checksum it, and print its stats. + // + { + const pool = new bumpPtrMemPool(poolSize(strDepth), alignment=0), + strTree = newWithAllocator(pool, unmanaged Tree, strDepth, pool); + writeln("stretch tree of depth ", strDepth, "\t check: ", strTree.sum()); + } + + // + // Build the long-lived tree. + // + const pool = new bumpPtrMemPool(poolSize(maxDepth), alignment=0), + llTree = newWithAllocator(pool, unmanaged Tree, maxDepth, pool); + + // + // Iterate over the depths. At each depth, create the required trees in + // parallel, compute their sums, and free them. + // + for depth in depths { + const iterations = 2**(maxDepth - depth + minDepth), + ps = poolSize(depth, divCeilPos(iterations, here.maxTaskPar)); + var sum = 0; + + forall 1..iterations + with (+ reduce sum, + var pool = new bumpPtrMemPool(ps, alignment=0)) { + const t = newWithAllocator(pool, unmanaged Tree, depth, pool); + sum += t.sum(); + } + stats[depth] = (iterations, sum); + } + + // + // Print out the stats for the trees of varying depths. + // + for (depth, (numTrees, checksum)) in zip(depths, stats) do + writeln(numTrees, "\t trees of depth ", depth, "\t check: ", checksum); + + // + // Checksum the long-lived tree, print its stats, and free it. + // + writeln("long lived tree of depth ", maxDepth, "\t check: ", llTree.sum()); +} + + +// +// A simple balanced tree node class +// +class Tree { + var left, right: unmanaged Tree?; + + // + // A Tree-building initializer + // + proc init(depth, pool) { + if depth > 0 { + const d = depth - 1; + left = newWithAllocator(pool, unmanaged Tree, d, pool); + right = newWithAllocator(pool, unmanaged Tree, d, pool); + } + } + + // + // Add up tree node, freeing as we go + // + proc sum(): int { + var sum = 1; + if left { + sum += left!.sum() + right!.sum(); + } + return sum; + } +} diff --git a/test/studies/shootout/submitted/binarytrees5.good b/test/studies/shootout/submitted/binarytrees5.good new file mode 120000 index 000000000000..5db46adf5a9a --- /dev/null +++ b/test/studies/shootout/submitted/binarytrees5.good @@ -0,0 +1 @@ +binarytrees3.good \ No newline at end of file diff --git a/test/studies/shootout/submitted/binarytrees5.perfexecopts b/test/studies/shootout/submitted/binarytrees5.perfexecopts new file mode 100644 index 000000000000..a249098d8a61 --- /dev/null +++ b/test/studies/shootout/submitted/binarytrees5.perfexecopts @@ -0,0 +1 @@ +--n=21 # binarytrees5 diff --git a/test/studies/shootout/submitted/binarytrees5.perfkeys b/test/studies/shootout/submitted/binarytrees5.perfkeys new file mode 120000 index 000000000000..d5c83453d601 --- /dev/null +++ b/test/studies/shootout/submitted/binarytrees5.perfkeys @@ -0,0 +1 @@ +binarytrees3.perfkeys \ No newline at end of file From bae82acc07a40d4e42dec4949bdb81a15085243f Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 16 Dec 2024 07:56:41 -0800 Subject: [PATCH 11/17] stop setting program_name Signed-off-by: Jade Abraham --- modules/packages/Python.chpl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/modules/packages/Python.chpl b/modules/packages/Python.chpl index 687ae08544ec..40a1eb203b9e 100644 --- a/modules/packages/Python.chpl +++ b/modules/packages/Python.chpl @@ -270,13 +270,6 @@ module Python { PyConfig_InitIsolatedConfig(cfgPtr); defer PyConfig_Clear(cfgPtr); - // set program name - const wideChapel = "chapel".c_wstr(); - checkPyStatus( - PyConfig_SetString( - cfgPtr, c_ptrTo(config_.program_name), wideChapel)); - deallocate(wideChapel); - // check VIRTUAL_ENV, if its set, make it the executable var venv = getenv("VIRTUAL_ENV".c_str()); if venv != nil { From b432c46ee53f87975b2edcbeac8e00e8d565efc0 Mon Sep 17 00:00:00 2001 From: Anna Rift Date: Mon, 16 Dec 2024 09:49:18 -0800 Subject: [PATCH 12/17] Fix unintended not-equals comparison in ct contentsMatchInner Signed-off-by: Anna Rift --- frontend/include/chpl/types/CompositeType.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/include/chpl/types/CompositeType.h b/frontend/include/chpl/types/CompositeType.h index 4b529809f289..3695c1989792 100644 --- a/frontend/include/chpl/types/CompositeType.h +++ b/frontend/include/chpl/types/CompositeType.h @@ -126,7 +126,7 @@ class CompositeType : public Type { bool compositeTypeContentsMatchInner(const CompositeType* other) const { return id_ == other->id_ && - name_ != other->name_ && + name_ == other->name_ && instantiatedFrom_ == other->instantiatedFrom_ && subs_ == other->subs_; } From 1d6704e8e30a517f5ded035fce1197bc142ba159 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Mon, 16 Dec 2024 10:50:15 -0800 Subject: [PATCH 13/17] Respond to PR feedback Add explicit error message when `pathchk` fails Signed-off-by: Dan Bonachea Co-authored-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index bfb3f826911d..e6fea89070c3 100755 --- a/configure +++ b/configure @@ -83,7 +83,7 @@ CONFIGURED="" if [ "$DEST_DIR_SET" -ne 0 ] then case $DEST_DIR in - (/*) pathchk "$DEST_DIR" || exit -1 ;; + (/*) pathchk "$DEST_DIR" || { echo "error: invalid directory name for --chpl-home: $DEST_DIR"; exit -1; };; (*) echo "error: expected an absolute directory name for --chpl-home: $DEST_DIR" exit -1 @@ -94,7 +94,7 @@ then CONFIGURED=configured-chpl-home else case $PREFIX in - (/*) pathchk "$PREFIX" || exit -1 ;; + (/*) pathchk "$PREFIX" || { echo "error: invalid directory name for --prefix: $PREFIX"; exit -1; };; (*) echo "error: expected an absolute directory name for --prefix: $PREFIX" exit -1 From 3a44cccbd64096fc23cb8b81ed2e3147dc1a5af3 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 16 Dec 2024 09:57:16 -0800 Subject: [PATCH 14/17] remove haveTopology Signed-off-by: Jade Abraham --- runtime/src/topo/hwloc/topo-hwloc.c | 55 ++--------------------------- 1 file changed, 3 insertions(+), 52 deletions(-) diff --git a/runtime/src/topo/hwloc/topo-hwloc.c b/runtime/src/topo/hwloc/topo-hwloc.c index f6188ea24ed2..80d264188b2b 100644 --- a/runtime/src/topo/hwloc/topo-hwloc.c +++ b/runtime/src/topo/hwloc/topo-hwloc.c @@ -65,8 +65,6 @@ static chpl_bool debug = true; static chpl_bool debug = false; #endif -static chpl_bool haveTopology = false; - static hwloc_topology_t topology; static const struct hwloc_topology_support* topoSupport; @@ -148,25 +146,11 @@ static void chk_err_errno_fn(const char*, int, const char*); void chpl_topo_pre_comm_init(char *accessiblePUsMask) { // - // accessibleMask is a string in hwloc "bitmap list" format that + // accessiblePUsMask is a string in hwloc "bitmap list" format that // specifies which processing units should be considered accessible // to this locale. It is intended for testing purposes only and // should be NULL in production code. - // - // We only load hwloc topology information in configurations where - // the locale model is other than "flat" or the tasking is based on - // Qthreads (which will use the topology we load). We don't use - // it otherwise (so far) because loading it is somewhat expensive. - // - if (strcmp(CHPL_LOCALE_MODEL, "flat") != 0 - || strcmp(CHPL_TASKS, "qthreads") == 0) { - haveTopology = true; - } else { - haveTopology = false; - return; - } - // // Allocate and initialize topology object. // @@ -247,10 +231,6 @@ void chpl_topo_post_comm_init(void) { void chpl_topo_exit(void) { - if (!haveTopology) { - return; - } - if (physAccSet != NULL) { hwloc_bitmap_free(physAccSet); physAccSet = NULL; @@ -291,7 +271,7 @@ void chpl_topo_exit(void) { void* chpl_topo_getHwlocTopology(void) { - return (haveTopology) ? topology : NULL; + return topology; } // @@ -844,10 +824,6 @@ void chpl_topo_setThreadLocality(c_sublocid_t subloc) { _DBG_P("chpl_topo_setThreadLocality(%d)", (int) subloc); - if (!haveTopology) { - return; - } - if (!topoSupport->cpubind->set_thread_cpubind) return; @@ -877,10 +853,6 @@ c_sublocid_t chpl_topo_getThreadLocality(void) { int flags; int node; - if (!haveTopology) { - return c_sublocid_none; - } - if (!topoSupport->cpubind->get_thread_cpubind) { return c_sublocid_none; } @@ -911,10 +883,6 @@ void chpl_topo_setMemLocality(void* p, size_t size, chpl_bool onlyInside, _DBG_P("chpl_topo_setMemLocality(%p, %#zx, onlyIn=%s, %d)", p, size, (onlyInside ? "T" : "F"), (int) subloc); - if (!haveTopology) { - return; - } - alignAddrSize(p, size, onlyInside, &pgSize, &pPgLo, &nPages); _DBG_P(" localize %p, %#zx bytes (%#zx pages)", @@ -940,10 +908,6 @@ void chpl_topo_setMemSubchunkLocality(void* p, size_t size, _DBG_P("chpl_topo_setMemSubchunkLocality(%p, %#zx, onlyIn=%s)", p, size, (onlyInside ? "T" : "F")); - if (!haveTopology) { - return; - } - alignAddrSize(p, size, onlyInside, &pgSize, &pPgLo, &nPages); _DBG_P(" localize %p, %#zx bytes (%#zx pages)", @@ -977,8 +941,7 @@ void chpl_topo_touchMemFromSubloc(void* p, size_t size, chpl_bool onlyInside, _DBG_P("chpl_topo_touchMemFromSubloc(%p, %#zx, onlyIn=%s, %d)", p, size, (onlyInside ? "T" : "F"), (int) subloc); - if (!haveTopology - || !topoSupport->cpubind->get_thread_cpubind + if (!topoSupport->cpubind->get_thread_cpubind || !topoSupport->cpubind->set_thread_cpubind) { return; } @@ -1056,10 +1019,6 @@ void alignAddrSize(void* p, size_t size, chpl_bool onlyInside, void chpl_topo_interleaveMemLocality(void* p, size_t size) { int flags; - if (!haveTopology) { - return; - } - if (!topoSupport->membind->set_area_membind || !topoSupport->membind->interleave_membind) { return; @@ -1080,10 +1039,6 @@ void chpl_topo_setMemLocalityByPages(unsigned char* p, size_t size, hwloc_obj_t numaObj) { int flags; - if (!haveTopology) { - return; - } - if (!topoSupport->membind->set_area_membind || !do_set_area_membind) return; @@ -1104,10 +1059,6 @@ c_sublocid_t chpl_topo_getMemLocality(void* p) { hwloc_nodeset_t nodeset; int node; - if (!haveTopology) { - return c_sublocid_none; - } - if (!topoSupport->membind->get_area_memlocation) { return c_sublocid_none; } From 338d83d20a2f7d019dc66b0e33448088f16bb170 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 16 Dec 2024 13:36:32 -0800 Subject: [PATCH 15/17] fixup help output Signed-off-by: Jade Abraham --- man/chpl.rst | 7 ++++--- test/compflags/bradc/help/userhelp.good | 2 +- util/chpl-completion.bash | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/man/chpl.rst b/man/chpl.rst index 946672395bf9..a1e2c2045c72 100644 --- a/man/chpl.rst +++ b/man/chpl.rst @@ -977,13 +977,14 @@ doc/rst/usingchapel/chplenv.rst in your Chapel installation. overrides the $CHPL\_MAKE environment variable (defaults to a best guess based on $CHPL\_HOST\_PLATFORM). +.. _man-target-mem: .. _man-mem: -**\--mem ** +**\--target-mem ** Specify the memory allocator used for dynamic memory management. This - flag corresponds with and overrides the $CHPL\_MEM environment variable - (defaults to a best guess based on $CHPL\_COMM). + flag corresponds with and overrides the $CHPL\_TARGET\_MEM environment + variable (defaults to a best guess based on $CHPL\_COMM). .. _man-re2: diff --git a/test/compflags/bradc/help/userhelp.good b/test/compflags/bradc/help/userhelp.good index de0bbbf50374..c2c8c3350d27 100644 --- a/test/compflags/bradc/help/userhelp.good +++ b/test/compflags/bradc/help/userhelp.good @@ -203,7 +203,7 @@ Compiler Configuration Options: position-independent code --locale-model Specify locale model to use --make Make utility for generated code - --mem Specify the memory manager + --target-mem Specify the memory manager --re2 Specify RE2 library --target-arch Target architecture / machine type --target-compiler Compiler for generated code diff --git a/util/chpl-completion.bash b/util/chpl-completion.bash index d11d66efb545..eea3c8f127e4 100644 --- a/util/chpl-completion.bash +++ b/util/chpl-completion.bash @@ -169,7 +169,6 @@ _chpl () --main-module \ --make \ --max-c-ident-len \ ---mem \ --memory-frees \ --minimal-modules \ --mllvm \ @@ -397,6 +396,7 @@ _chpl () --target-arch \ --target-compiler \ --target-cpu \ +--target-mem \ --target-platform \ --task-tracking \ --tasks \ @@ -501,7 +501,6 @@ _chpl () --main-module \ --make \ --max-c-ident-len \ ---mem \ --mllvm \ --module-dir \ --munge-user-idents \ @@ -611,6 +610,7 @@ _chpl () --target-arch \ --target-compiler \ --target-cpu \ +--target-mem \ --target-platform \ --task-tracking \ --tasks \ From 6045ab6181258605da97b23a37101728592e1481 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Mon, 16 Dec 2024 15:41:44 -0600 Subject: [PATCH 16/17] fix filenames Signed-off-by: Jade Abraham --- ...{CMakeChplCompiler.cmake.in => CMakeCHPLCompiler.cmake.in} | 0 ...{CMakeChplInformation.cmake => CMakeCHPLInformation.cmake} | 0 ...ineChplCompiler.cmake => CMakeDetermineCHPLCompiler.cmake} | 4 ++-- ...MakeTestChplCompiler.cmake => CMakeTestCHPLCompiler.cmake} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename util/cmake/{CMakeChplCompiler.cmake.in => CMakeCHPLCompiler.cmake.in} (100%) rename util/cmake/{CMakeChplInformation.cmake => CMakeCHPLInformation.cmake} (100%) rename util/cmake/{CMakeDetermineChplCompiler.cmake => CMakeDetermineCHPLCompiler.cmake} (91%) rename util/cmake/{CMakeTestChplCompiler.cmake => CMakeTestCHPLCompiler.cmake} (100%) diff --git a/util/cmake/CMakeChplCompiler.cmake.in b/util/cmake/CMakeCHPLCompiler.cmake.in similarity index 100% rename from util/cmake/CMakeChplCompiler.cmake.in rename to util/cmake/CMakeCHPLCompiler.cmake.in diff --git a/util/cmake/CMakeChplInformation.cmake b/util/cmake/CMakeCHPLInformation.cmake similarity index 100% rename from util/cmake/CMakeChplInformation.cmake rename to util/cmake/CMakeCHPLInformation.cmake diff --git a/util/cmake/CMakeDetermineChplCompiler.cmake b/util/cmake/CMakeDetermineCHPLCompiler.cmake similarity index 91% rename from util/cmake/CMakeDetermineChplCompiler.cmake rename to util/cmake/CMakeDetermineCHPLCompiler.cmake index 85c24972db70..0b8573bb74b1 100644 --- a/util/cmake/CMakeDetermineChplCompiler.cmake +++ b/util/cmake/CMakeDetermineCHPLCompiler.cmake @@ -42,5 +42,5 @@ find_program( set(CMAKE_CHPL_COMPILER_ENV_VAR "") -configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeChplCompiler.cmake.in - ${CMAKE_PLATFORM_INFO_DIR}/CMakeChplCompiler.cmake) +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeCHPLCompiler.cmake.in + ${CMAKE_PLATFORM_INFO_DIR}/CMakeCHPLCompiler.cmake) diff --git a/util/cmake/CMakeTestChplCompiler.cmake b/util/cmake/CMakeTestCHPLCompiler.cmake similarity index 100% rename from util/cmake/CMakeTestChplCompiler.cmake rename to util/cmake/CMakeTestCHPLCompiler.cmake From c198a30d31ba7f2ce2e2293c3de566c3c2b72030 Mon Sep 17 00:00:00 2001 From: Anna Rift Date: Mon, 16 Dec 2024 13:47:58 -0800 Subject: [PATCH 17/17] Handle PRs not based off recent main in large files check Signed-off-by: Anna Rift --- .github/workflows/CI.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77e037f77858..2928ee699c32 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -153,14 +153,15 @@ jobs: baseSHA=${{github.event.pull_request.base.sha}} headSHA=${{github.event.pull_request.head.sha}} + echo "Base SHA: $baseSHA" + echo "Head SHA: $headSHA" + echo "${{github.event.pull_request.commits}} commits in PR" + # Loop backward through commits added in the PR, starting from the # latest. + commitIdx=0 for commit in $(git rev-list $baseSHA..$headSHA) do - if [ "$commit" = "$baseSHA" ]; then - break - fi - echo "Checking commit: $commit" git checkout -q $commit @@ -180,4 +181,11 @@ jobs: exit 1 fi done <<< "$newFiles" + + # Stop after going through the number of commits this PR has. + commitIdx=$((commitIdx+1)) + if [ "$commitIdx" = "${{github.event.pull_request.commits}}" ]; then + echo "Stopping after $commitIdx commits, on commit $commit" + break + fi done