Skip to content

Commit

Permalink
Merge pull request #20565 from mppf/follow-20471-gasnet-mpi
Browse files Browse the repository at this point in the history
Use GASNET_LD_REQUIRES_MPI from .pc file



Completes a Future Work item from #20385 now that #20471 is merged.

- [x] works on a Cray CS with openmpi and CHPL_COMM_SUBSTRATE=mpi

Reviewed by @ronawho - thanks!
  • Loading branch information
mppf authored Aug 31, 2022
2 parents 08e50ad + 6a309bb commit b1b494f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ ifneq ($(CHPL_MAKE_LAUNCHER),none)
@$(MAKE) -f Makefile.help MAKE_LAUNCHER=1 CHPL_MAKE_RULE=$* $*
endif

# save output of printchplenv into #defines but munge away
# characters that can't be in #defines
$(CHPL_ENV_HEADER): $(CHPL_MAKE_HOME)/util/printchplenv $(CHPL_MAKE_HOME)/util/chplenv/*
@mkdir -p $(CHPL_ENV_HEADER_DIR)
@echo "Generating $(CHPL_ENV_HEADER)"
@cp $(CHPL_ENV_HEADER_TEMPLATE) $(CHPL_ENV_HEADER)
@echo "/* THIS FILE IS AUTOMATICALLY GENERATED */" >> $(CHPL_ENV_HEADER)
@echo "#ifndef _CHPL_ENV_GEN_H_" >> $(CHPL_ENV_HEADER)
@echo "#define _CHPL_ENV_GEN_H_" >> $(CHPL_ENV_HEADER)
# save output of printchplenv into #defines but munge away
# characters that can't be in #defines
@$(CHPL_MAKE_HOME)/util/printchplenv --runtime --no-tidy --anonymize --simple | \
sed 's/^ *//;s/ *$$//' | \
sed 's/[^0-9A-Za-z]/_/g' | \
Expand Down
6 changes: 1 addition & 5 deletions util/chplenv/chpl_gasnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,10 @@ def get_override_ld():
gasnet_ld = d['GASNET_LD']
gasnet_cc = d['GASNET_CC']
gasnet_cxx = d['GASNET_CXX']
gasnet_ld_requires_mpi = d.get('GASNET_LD_REQUIRES_MPI', False)

ld = None # no ld override

gasnet_ld_requires_mpi = False
ld_name = os.path.basename(gasnet_ld).split()[0]
if 'mpi' in ld_name:
gasnet_ld_requires_mpi = True

mpi_cxx = overrides.get('MPI_CXX')
if not mpi_cxx:
mpi_cxx = 'mpicxx'
Expand Down

0 comments on commit b1b494f

Please sign in to comment.