-
Notifications
You must be signed in to change notification settings - Fork 73
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
Compilation of ExaFMM on MacOS #26
Comments
We recommend the use of LLVM Clang to compile the binaries of ExaFMM. The manual procedure explained here can be adapted as follows. An automated procedure is also under development (see branch
EDIT: MPI in not required per se, see below.
Then, you must edit
EDIT: first open
This should match the location where you installed Julia and what you did in step 2. Then,
EDIT: if you are having troubles related to MPI, add
This should return a "hello, world" message. If you get an error for a missing |
NOTE TO SELF: Use the flag |
When I run the configure line in step 3, I get an error:
This is probably related to the instructions from the first step that indicate that OpenMPI should point to CLang, which I was unable to figure out how to do. After working with DeeGee, here are the solutions we found: First, if OpenMPI causes problems, add After running this command, the makefile in FLOWExaFMM/deps/3d needs to be modified to work properly.
Lines 585-592 should be changed to match the following:
Finally, the installation location for FLOWExaVPM needs to be /.julia/packages so that the Julia compiler reads it. |
Thanks for documenting this Eric! |
Compilation notes on my mac with an M2 chip with Ventura 13.2.1:
|
@tylercritchfield , did you do the |
Yes, I did include that first |
@tylercritchfield, would you mind running After following your instructions I'm still getting Rachels-MBP:FLOWExaFMM.jl edoalvar$ sh build_macos.sh
Removing existing build
rm: src/fmm.dylib: No such file or directory
Copying files
Configuring build
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /opt/homebrew/bin/gcc-12/ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of /opt/homebrew/bin/gcc-12/... gcc3
checking for ftn... no
checking for ifort... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for ranlib... ranlib
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for OpenMP flag of C++ compiler... -fopenmp
checking for mpiicpc... /opt/homebrew/bin/mpicxx
checking for mpxlf90_rftn... no
checking for mpiifort... no
checking for mpif90... mpif90
checking for MPI_Init... yes
checking for MPI_Init in -lmpi... yes
checking for MPI_Init in -lmpich... no
checking for MPI_Init in -lmpicxx... no
checking for MPI_Init in -lfmpi... no
checking for MPI_Init in -lmpichf90... no
checking for MPI_Init in -lmpi_cxx... no
checking for mpirun... mpirun
checking build system type... arm-apple-darwin20.6.0
checking host system type... arm-apple-darwin20.6.0
checking for x86 cpuid output... unknown
checking for x86-AVX xgetbv output... unknown
checking for C++ compiler vendor... clang
checking for C++ compiler vendor... (cached) clang
checking for a sed that does not truncate output... /usr/bin/sed
checking whether C++ compiler accepts -Werror=unknown-warning-option... yes
checking whether C++ compiler accepts -diag-error warn... no
checking whether C++ compiler accepts -O0... yes
checking whether C++ compiler accepts -g... yes
checking whether C++ compiler accepts -Werror=unknown-warning-option... yes
checking whether C++ compiler accepts -check all... no
checking whether C++ compiler accepts -debug all... no
checking whether C++ compiler accepts -diag-disable remark... no
checking whether C++ compiler accepts -fmudflap... yes
checking whether C++ compiler accepts -fno-strict-aliasing... yes
checking whether C++ compiler accepts -fsanitize=address... yes
checking whether C++ compiler accepts -fsanitize=leak... no
checking whether C++ compiler accepts -fstack-protector... yes
checking whether C++ compiler accepts -ftrapuv... no
checking whether C++ compiler accepts -ftrapv... yes
checking whether C++ compiler accepts -traceback... no
checking whether C++ compiler accepts -Wall... yes
checking whether C++ compiler accepts -Warray-bounds... yes
checking whether C++ compiler accepts -Wbad-function-cast... yes
checking whether C++ compiler accepts -Wcast-align... yes
checking whether C++ compiler accepts -Wcast-qual... yes
checking whether C++ compiler accepts -Wextra... yes
checking whether C++ compiler accepts -Wfatal-errors... yes
checking whether C++ compiler accepts -Wformat=2... yes
checking whether C++ compiler accepts -Wformat-nonliteral... yes
checking whether C++ compiler accepts -Wformat-security... yes
checking whether C++ compiler accepts -Winit-self... yes
checking whether C++ compiler accepts -Winline... yes
checking whether C++ compiler accepts -Wmissing-format-attribute... yes
checking whether C++ compiler accepts -Wmissing-include-dirs... yes
checking whether C++ compiler accepts -Wmissing-noreturn... yes
checking whether C++ compiler accepts -Wnested-externs... yes
checking whether C++ compiler accepts -Wno-missing-field-initializers... yes
checking whether C++ compiler accepts -Wno-overloaded-virtual... yes
checking whether C++ compiler accepts -Wno-unused-local-typedefs... yes
checking whether C++ compiler accepts -Wno-unused-parameter... yes
checking whether C++ compiler accepts -Wno-unused-variable... yes
checking whether C++ compiler accepts -Wpointer-arith... yes
checking whether C++ compiler accepts -Wredundant-decls... yes
checking whether C++ compiler accepts -Wreturn-type... yes
checking whether C++ compiler accepts -Wshadow... yes
checking whether C++ compiler accepts -Wsign-compare... yes
checking whether C++ compiler accepts -Wstrict-aliasing... yes
checking whether C++ compiler accepts -Wstrict-overflow=5... yes
checking whether C++ compiler accepts -Wstrict-prototype... no
checking whether C++ compiler accepts -Wswitch-enum... yes
checking whether C++ compiler accepts -Wuninitialized... yes
checking whether C++ compiler accepts -Wunreachable-code... yes
checking whether C++ compiler accepts -Wunused-but-set-variable... no
checking whether C++ compiler accepts -Wwrite-strings... yes
checking whether C++ compiler accepts -Wno-error=missing-field-initializers... yes
checking whether C++ compiler accepts -Wno-error=overloaded-virtual... yes
checking whether C++ compiler accepts -Wno-error=unused-local-typedefs... yes
checking whether C++ compiler accepts -Wno-error=unused-parameter... yes
checking whether C++ compiler accepts -Wno-error=unused-variable... yes
configure: OpenMP : yes
configure: MPI : yes
configure: CUDA : yes
configure: FP32 : no
configure: SIMD :
configure: Assert : yes
configure: Debug : no
configure: Vendor : clang
configure: CXX : /opt/homebrew/bin/mpicxx
configure: FC : mpif90
configure: CXXFLAGS : -g -O2
configure: FCFLAGS : -g -O2
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating 3d/Makefile
config.status: creating config.h
config.status: executing depfiles commands
Compiling 3d
/opt/homebrew/bin/mpicxx -DHAVE_CONFIG_H -DJULIA_ENABLE_THREADING -Dhello_EXPORTS -I/Users/edoalvar/.julia/artifacts/434257acf70ce7407e3946f2c8452e814d7cca64/include -I/Users/edoalvar/Programs/Julia-1.8.app/Contents/Resources/julia/include/julia -Wunused-parameter -Wextra -Wreorder -std=gnu++1z -O3 -DNDEBUG -fPIC -I. -I.. -DEXAFMM_WITH_OPENMP -DNDEBUG -DEXAFMM_EAGER -ffast-math -funroll-loops -Wfatal-errors -fopenmp -g -O2 -MT fmm-fmm.o -MD -MP -MF .deps/fmm-fmm.Tpo -c -o fmm-fmm.o `test -f 'fmm.cxx' || echo './'`fmm.cxx
clang: fatal error: unsupported option '-fopenmp'
make: *** [fmm-fmm.o] Error 1
cp: build/3d/fmm: No such file or directory
Done! |
|
@tylercritchfield What is the version of julia are you using? |
OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized. This is the error I am getting when I run the example cases for FLOWUnsteady. What are the possible solutions for this? |
I had this same issue, I had tried to use the python installation behind .julia as opposed to the top level python, and installed the suggested python packages etc. When I switched, per the installation instructions for setting up pycall, it worked - precompilation was broken, but it all worked including good parallel resource utilization on my m1 processor. |
Thanks for sharing your solution, Kevin! Also, it's great to hear from you! |
Compilation of ExaFMM using GCC triggers an unstable behavior of the related package.
After compiling CxxWrap and ExaFMM with GCC v10, I encountered the following. In a fresh Julia REPL, I can do
(or equivalently
] test FLOWExaFMM
) which seems to show that the package is ready and working. However, when proceeding further with FLOWVPM, this occurs:Guidelines for compilation under MacOS could be included in the documentation.
The text was updated successfully, but these errors were encountered: