Opened 3 years ago

Last modified 3 years ago

#1776 confirmed defect

Wrong mpirun copied to utilities directory in MPI thorn

Reported by: Ian Hinder Owned by:
Priority: minor Milestone:
Component: Other Version: development version
Keywords: ExternalLibraries/MPI Cc:


On Mac OS, if I set MPI_DIR=BUILD in order to build OpenMPI using the MPI thorn, Cactus should copy the built version of mpirun into exe/<config>. However, if it finds one in /usr/local/bin, it copies that one instead.

NB: to compile OpenMPI, you need gnu99 or later in CFLAGS, as OpenMPI needs the 'asm' directive, which is a GNU extension.

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by Ian Hinder

Status: newconfirmed

comment:2 Changed 3 years ago by Roland Haas

The recipe for the utilities (MPI/src/make.configuration.defn) reads:

ALL_UTILS += $(shell cd $(MPI_DIR)/bin 2>/dev/null && ls mpirun ompi-clean ompi-iof ompi-probe ompi-profiler ompi-ps ompi-server ompi-top ompi_info 2>/dev/null)

and (MPI/src/make.configuration.deps)

$(UTIL_DIR)/%: $(MPI_DIR)/bin/%
	@echo "Copying $* from $< to $(UTIL_DIR)"
	-$(MKDIR) $(MKDIRFLAGS) $(UTIL_DIR) 2> /dev/null
	cp $< $@

so as long as MPI_DIR is set properly (and seems to do so) it should copy the correct executables. Can you check if perhaps homebrew itself sets and MPI_DIR environment variable which make take precendence?

comment:3 Changed 3 years ago by Ian Hinder

I checked that there was no MPI_DIR set in the shell which I used to launch the build. I agree that seems to be setting MPI_DIR correctly; the output indicates that the install location is correct, and from the code, this seems to propagate directly to the setting of MPI_DIR. Nonetheless, the wrong executable is copied, suggesting that by the time the code above gets called, something has changed MPI_DIR, or the code above is not working how it's supposed to. It's possible that if you put a dummy executable in /usr/local/bin/mpirun, you might be able to trigger the same behaviour on any system.

Modify Ticket

Change Properties
Set your email in Preferences
as confirmed The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.