Skip to content
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

Add option to build Chapel with mimalloc as either the host or target allocator #26246

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Nov 15, 2024

Adds the ability to set CHPL_HOST_MEM and/or CHPL_TARGET_MEM to mimalloc.

This PR only provides the option to use mimalloc, it does not change the default from jemalloc

Performance comparisons for CHPL_TARGET_MEM on linux64

test/performance/memory/microMemoryAllocation.chpl

Using --trials=2_000_000

  • jemalloc: 1.38
  • mimalloc: 7.79

test/studies/shootout/binary-trees/binarytrees-inner.chpl

Using --n=21

  • jemalloc: 2.274
  • mimalloc: 0.984

Performance comparisons for CHPL_HOST_MEM on linux64

Compiling examples/hello.chpl

  • jemalloc: 6.0s
  • mimalloc: 5.1s

Compiling Arkouda

  • jemalloc: TODO
  • mimalloc: TODO

Major changes in this PR

  • Add support to use mimalloc from $CHPL_HOME/third-party/mimalloc or from the system
  • Add a bundled mimalloc 2.1.7

Correctness testing

  • paratest with/without gasnet with CHPL_TARGET_MEM=mimalloc on linux64
  • paratest with/without gasnet with CHPL_HOST_MEM=mimalloc on linux64
  • make check with/without gasnet with CHPL_TARGET_MEM=mimalloc on MacOS
  • make check with/without gasnet with CHPL_HOST_MEM=mimalloc on MacOS
  • Test that fixed heap config with SS11 gives proper errors

Future work:

  • enable fixed heap configs
  • enable asan builds

Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant