Changes between Initial Version and Version 1 of MacM1Notes


Ignore:
Timestamp:
Jun 24, 2021 5:15:17 PM (6 months ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacM1Notes

    v1 v1  
     1= Installing a Native "Apple Silicon" GSAS-II Version on MacOS =
     2
     3After something like 4 months of occasional trial and much error, I was finally able to get GSAS-II to run on a ARM Mac running 11.2.3.
     4
     5As of right now (6/24/21), Anaconda is not supporting ARM Macs and the wxpython version of miniforge is broken, so I had to install Python and associated packages with [https://brew.sh homebrew].
     6
     7== Installing Homebrew ==
     8
     9See [https://docs.brew.sh/Installation this page]. Note that access to a Admin level account is a requirement for this. Use these steps:
     10
     11 1. Install command line tools. Use command:
     12{{{
     13xcode-select --install
     14}}}
     15 1. Log into a admin account (I used `su admin` in a terminal)
     16 3. Install homebrew using command:
     17{{{
     18/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
     19}}}
     20 4. To add brew to path, use command:
     21{{{
     22eval "$(/opt/homebrew/bin/brew shellenv)"
     23}}}
     24
     25== Install stuff with brew ==
     26
     27Brew is used to install a bunch of things. Here are the commands I used:
     28
     29{{{
     30brew install svn
     31brew install python
     32brew install scipy
     33brew install wxpython
     34}}}
     35
     36== Install more stuff with pip ==
     37
     38{{{
     39python3 -m pip install -U matplotlib
     40python3 -m pip install -U pyopengl 
     41}}}
     42
     43
     44== Install GSAS-II ==
     45
     46{{{
     47mkdir ~/GSASII
     48cd ~/GSASII
     49curl https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py -o bootstrap.py
     50python3 bootstrap.py
     51}}}
     52
     53== Compiling GSAS-II fortran routines ==
     54
     55You probably do not need this. There is now a set of M1 (ARM aka Apple Silicon) binaries in
     56
     57This was fairly hard and I don't know what steps were required in retrospect. Also, it might have been better to use `brew install gfortran scons` rather than using miniforge to install gfortran. (I downloaded https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh from
     58Miniforge3-MacOSX-arm64 link on https://github.com/conda-forge/miniforge
     59{{{
     60bash ~/Downloads/Miniforge3-MacOSX-arm64.sh
     61source /Users/toby/miniforge3/bin/activate
     62conda create -n buildg10.2 gfortran=10.2 gfortran_impl_osx-arm64=10.2 scons numpy
     63}}}
     64I installed all of Xcode to get file headers, but that may not have been needed. I had a lot of problems getting gcc to find them, but that should now be changed in Sconstruct