diff --git a/docs/getchunkie.rst b/docs/getchunkie.rst index 6ee8a0c..e5df1c9 100644 --- a/docs/getchunkie.rst +++ b/docs/getchunkie.rst @@ -58,7 +58,29 @@ Troubleshooting - "CHUNKIE STARTUP: unable to find a suitable compiler for FMM2D." fmm2d mex installation depends on gfortran. In case a compiler is not found, the installation will be skipped. To install dependencies follow the procedure below based on your OS +- "mex" redirects to LaTeX compilation. This can happen on either MacOS or Linux, and in both situations the path + to mex is not correctly set. We recommend doing a manual install in the fmm2d folder. + Find your MATLAB installation directory using ``${MATLABROOT}`` on linux, + and on MacOS, typically MATLAB is installed at ``/Applications/MATLAB_R(version number)/``. + The mex executable can then be found in the ``bin`` directory. Navigate to chunkie/fmm2d. + Create a make.inc file by copying one of the template files (make.inc.*) into make.inc. For example, + on MacOS you might do + + .. code:: bash + + cp make.inc.macos.gnu make.inc + + There are other make.inc templates for special situations; see the fmm2d folder. + Then add the following to a new line at the end of make.inc: ``MEX=``. Note: you + should use the absolute path, not a relative path. Then, run + + .. code:: bash + make matlab + + +- "CHUNKIE STARTUP: unable to find a suitable compiler for FMM2D". You may not have gfortran installed (if you do and you're on MacOS, see further below). To install gfortran, try: + * MacOS Get xcode, command line tools by running @@ -85,4 +107,10 @@ Troubleshooting sudo yum install make gcc gcc-c++ gcc-gfortran libgomp +- "CHUNKIE STARTUP: unable to find a suitable compiler for FMM2D". If you have gfortran installed but you still get this message on MacOS, try starting MATLAB from the command line (as opposed to opening MATLAB via spotlight). To do this, you may have to find the location of the MATLAB binary in the bin folder of MATLAB's install directory and run that path directly. See also `instructions from MathWorks `_ + + .. code:: bash + + ./ + - "{hypoct, rskelf, ifmm} is not found". These are part of the FLAM library. If you've already run startup.m, then it may be that you downloaded from git but forgot to recurse submodules. Do the download from git again and be sure to include the submodules. diff --git a/startup.m b/startup.m index 0844dfe..000fed4 100644 --- a/startup.m +++ b/startup.m @@ -60,8 +60,12 @@ function startup(opts) path1 = [path1 cmdout2]; setenv('PATH', path1); if ismac - fprintf('Here\n'); - !cp -f make.inc.macos.gnu make.inc; + [~, result] = system('uname -m'); + if strcmpi(result, 'x86_64') + !cp -f make.inc.macos.gnu make.inc; + else + !cp -f make.inc.macos_arm64.gnu make.inc; + end end if fmmrecompile !make clean