charm icon indicating copy to clipboard operation
charm copied to clipboard

Is hwloc module new? It fails immediately on MacOSX.

Open BJWiley233 opened this issue 3 years ago • 2 comments

I get a failure installing with mpi-darwin-x86_64-gcc IMMEDIATELY building charm because of hwloc module. This is the error in the config.log. I wonder if it has to do with the fact I installed mpi4py with conda just recently? Wondeirng if installing a new hwloc submodule is best for darwin as people (including me :) ) will install open-mpi along with hwloc together. Does hwloc/your version of hwloc work with any package installer of mpi?

$ /Users/brian/tools/NAMD_Git-2022-01-26_Source/charm/build_charm/hwloc-prefix/src/hwloc/configure --disable-cairo --disable-cuda --disable-gl --disable-libxml2 --disable-nvml --disable-opencl --disable-pci --disable-libudev --disable-visibility --enable-embedded-mode --enable-shared=no --enable-static --with-hwloc-symbol-prefix=cmi_ --without-x HWLOC_FLAGS=-fPIC -dynamic -fno-common -DCMK_GFORTRAN -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -D_DARWIN_C_SOURCE -mmacosx-version-min=10.7 -I/Users/brian/tools/NAMD_Git-2022-01-26_Source/charm/build_charm/include -D__CHARMC__=1 -g -fno-stack-protector -ftls-model=initial-exec CFLAGS=-fPIC -dynamic -fno-common -DCMK_GFORTRAN -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -D_DARWIN_C_SOURCE -mmacosx-version-min=10.7 -I/Users/brian/tools/NAMD_Git-2022-01-26_Source/charm/build_charm/include -D__CHARMC__=1 -g -fno-stack-protector -ftls-model=initial-exec CXXFLAGS=-fPIC -dynamic -fno-common -stdlib=libc++ -DCMK_GFORTRAN -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -D_DARWIN_C_SOURCE -mmacosx-version-min=10.7 -I/Users/brian/tools/NAMD_Git-2022-01-26_Source/charm/build_charm/include -D__CHARMC__=1 -g -fno-stack-protector -ftls-model=initial-exec -std=gnu++11 CC=mpicc CXX=mpicxx CC_FOR_BUILD=mpicc CPP= CXXCPP= CPPFLAGS= LDFLAGS= LIBS=
...
...
configure:4304: mpicc -fPIC -dynamic -fno-common -DCMK_GFORTRAN -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -D_DARWIN_C_SOURCE -mmacosx-version-min=10.7 -I/Users/brian/tools/NAMD_Git-2022-01-26_Source/charm/build_charm/include -D__CHARMC__=1 -g -fno-stack-protector -ftls-model=initial-exec   conftest.c  >&5
/Users/brian/anaconda3/bin/mpicc: line 289: x86_64-apple-darwin13.4.0-clang: command not found

When I revert to adding openMPI first in my path I get something that works:

configure:4374: mpicc -o conftest -fPIC -dynamic -fno-common -DCMK_GFORTRAN -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -D_DARWIN_C_SOURCE -mmacosx-version-min=10.7 -I/Users/brian/tools/NAMD_Git-2022-01-26_Source/charm/build2/include -D__CHARMC__=1 -g -fno-stack-protector -ftls-model=initial-exec   conftest.c  >&5
ld: warning: dylib (/usr/local/Cellar/open-mpi/4.1.2/lib/libmpi.dylib) was built for newer macOS version (11.0) than being linked (10.7)

BJWiley233 avatar Feb 13 '22 11:02 BJWiley233

The MPI machine layer always uses mpicc and mpicxx as its compilers, with the effect that you cannot specify a compiler as part of the build command as with other machine layers. Instead, try setting the OMPI_CC and OMPI_CXX environment variables to tell Open MPI's compiler wrappers to use GCC.

evan-charmworks avatar Feb 17 '22 22:02 evan-charmworks

sounds like a plan, I will give that a try

BJWiley233 avatar Feb 18 '22 05:02 BJWiley233