-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_instructions_Mac.txt
executable file
·66 lines (43 loc) · 2.29 KB
/
install_instructions_Mac.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ==================================================== #
# Thorsten Zirwes (04/06/2023) #
# Guillaumne Vignat (04/10/2023) #
# ==================================================== #
Install instructions for MacOS:
Install Anaconda with Python 3 (if required, it should not be necessary to reinstall python/anaconda)
Install Homebrew:
>/bin/bash -c "$(curl -fsSL https://github.com/Homebrew/install/HEAD/install.sh)"
Install Xcode command line utils
>xcode-select --install
install pre-requisite packages:
>brew install cmake scons boost
>conda create -n ct-PMB python=3.8
>conda activate ct-PMB
>conda install ipython matplotlib numpy ruamel.yaml cython pytest
>conda install setuptools==58.3.0
add this line to your ~/.bashrc
>export PATH="$HOME/.local/bin:$PATH"
then re-load the bashrc:
>source ~/.bashrc
>conda activate ct-PMB
Set some temporary environment variables for the installation
>which gcc
>export compilerg=XXX !! Copy path from previous command
>which g++
>export compilergpp=XXX !! Copy path from previous command
>which python
>export pythonver=XXX !! Copy path from previous command. Check that it is pointing to your Anaconda python!
>export boostpath=!!!Path to boost within homebrew, should be /opt/homebrew/Cellar/boost/1.81.0_1/include/!!!
Prepare directory for installation:
>mkdir -p ~/Programs/Cantera && cd ~/Programs/Cantera
>git clone --recursive https://github.com/IhmeGroup/PMCToolbox
>cd PMCToolbox
Adapt the prefix path in the command below
>scons build prefix=/Users/gvignat/Documents/CanteraPMB/Cantera_PMB_install/ python_cmd=$pythonver CC=$compilerg CXX=$compilergpp debug=no optimize=yes python_package=full system_sundials=n boost_inc_dir=$boostpath
>scons install
Note: Python 3.11 removed the "rU" option in open. You can modify this option in the source code in case it poses some issue
in your ~/.bashrc, add the following line:
export PATH="$HOME/Programs/Cantera/Cantera_PMB_install/local/bin/:$PATH" !!! Adapt to your path you are using
then, source the bashrc again:
>source ~/.bashrc
To run the example case, go into the folder "PMB_example_cases" and run the compile script
Don't forget to add Mac specific compiler flags to the "compile_example.sh" files before running (see also "compile_example.sh_MACOSX")