From 81fc89e064d613d2550b94ae49f083b91d680028 Mon Sep 17 00:00:00 2001 From: Manas Rachh Date: Sun, 9 Jun 2024 01:29:53 -0400 Subject: [PATCH 1/3] small changes --- docs/getchunkie.rst | 8 ++++++++ startup.m | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/getchunkie.rst b/docs/getchunkie.rst index 6ee8a0c..6b10d86 100644 --- a/docs/getchunkie.rst +++ b/docs/getchunkie.rst @@ -58,6 +58,14 @@ 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. 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. In the fmm2d make.inc file (if it doesn't exist create one), + set ``MEX=``. +- On MacOS, if you open MATLAB using spotlight, the MATLAB path fails to find the gfortran compiler. In order to + avoid this issue, we recommend starting MATLAB from the command line, by finding its executable in + the ``bin`` directory of your MATLAB installation. * MacOS 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 From 4fc4da64102d71a53e8ffc0df059584ca48668f3 Mon Sep 17 00:00:00 2001 From: Travis Askham Date: Sun, 9 Jun 2024 09:30:14 -0400 Subject: [PATCH 2/3] Update getchunkie.rst --- docs/getchunkie.rst | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/getchunkie.rst b/docs/getchunkie.rst index 6b10d86..aa8e5fa 100644 --- a/docs/getchunkie.rst +++ b/docs/getchunkie.rst @@ -59,10 +59,24 @@ Troubleshooting 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. Find your MATLAB installation directory using ``${MATLABROOT}`` on linux, + 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. In the fmm2d make.inc file (if it doesn't exist create one), - set ``MEX=``. + 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=``. Then, run + + .. code:: bash + + make matlab + - On MacOS, if you open MATLAB using spotlight, the MATLAB path fails to find the gfortran compiler. In order to avoid this issue, we recommend starting MATLAB from the command line, by finding its executable in the ``bin`` directory of your MATLAB installation. From c9433d4d340a2cb79ee6912a1e08f4339632b880 Mon Sep 17 00:00:00 2001 From: Travis Askham Date: Sun, 9 Jun 2024 09:33:04 -0400 Subject: [PATCH 3/3] Update getchunkie.rst --- docs/getchunkie.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getchunkie.rst b/docs/getchunkie.rst index aa8e5fa..30dcc7f 100644 --- a/docs/getchunkie.rst +++ b/docs/getchunkie.rst @@ -71,7 +71,8 @@ Troubleshooting 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=``. Then, run + 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