I’ve recently run into the problem of trying to compile the source for NEURON 7.3a that includes support for parallel NEURON (using MPI) and Python on Mac OS X Lion. Using a number of helpful web resources, I wanted to cobble together an “as-of-this-writing” practice to get a kitchen sink working install for all components.
Heat sinks - metal components designed to draw heat away; Rogue Apps. Rogue, or runaway, apps can put addition load on the processor and/or graphics card that can affect your Mac in a number of ways. They may require more battery power, in the case of portable Macs, because the CPU/GPU is having to do more work. Scribus desktop (free) Scribus is a professional page layout OSS for Linux/UNIX, Mac OS X, OS/2 Warp 4/eComStation and Windows desktops. It is for working on print-based documents of all kinds. OSS alternative to Adobe’s InDesign.
Enter Mac Kitchen into the equation.What a welcome surprise! We’ve loved everything on the menu, especially the pad Thai, which has become a go-to for both of us. The staff is friendly and food of prepared expeditiously. I very highly recommend Mac Kitchen! Surfaces serves kitchen and bath designers, architectural millwork shops, interior design firms, and specialty segments of the industry. We provide templating, fabrication, delivery, and installation of kitchen and bathroom countertops, sinks, tables, fireplace surrounds, and other specialty applications.
UPDATED 01-Sept-2012: Added instructions for mpi4py
Because I don’t have the resources to test many version combinations, etc., this assumes OS X 10.7.4 on a Retina MacBook Pro 10,1 (Mid 2012), with a working copy of XCode 4.4.1 installed (available for free from the Mac App Store). I suspect but cannot verify that this will work with many different versions of all of these components. Note: MacPorts is particularly sensitive to very new XCode and OS releases, so right after a new one, things don’t always work right away.
Finally this assumes you have admin access to the computer on which you are installing things and that you will use
sudo
for good and not evil.And super-finally, this is basically an aggregate of web sources, some of which I had to modify to get it working. Sources are inline, below. Much is duplicated here because of the transience of web links.
0. Install XCode.
1. Install MacPorts
2. This step will take awhile!1 Open a terminal and type at your prompt ($):
1. Install MacPorts
2. This step will take awhile!1 Open a terminal and type at your prompt ($):
Running:
should result in: ‘/opt/local/bin/python’.
3. Now install the message passing interface (MPI) components. On Mountain Lion (10.8.x), I’ve only gotten OpenMPI working, and only from source (and not MacPorts). But on Lion, I’ve gotten MPICH2 working from MacPorts to play nicely with Neuron (sudo port install mpich2). However here are instructions for how to install MPICH2 from source, with these minimal steps:
a. Download MPICH2 from this website. Look for an
b. In the terminal, follow these commands2,3,4:
http
link. Do not worry about Hydra unless you know why (and don’t forget to tell me).b. In the terminal, follow these commands2,3,4:
![Sink Sink](https://www.cnet.com/a/img/B33RI6WsUloOjNhMvM9UlhxrVSI=/940x0/2016/09/19/742a0878-f856-43cd-bc59-9edd2f053108/icloud-drive-sync.png)
It installs in /usr/local/bin, which you can verify by running: “which mpicc”. (MacPorts version installs in /opt/local/bin by default.)
4. Install NEURON from source with support for MPI and Python:
4a. Download the latest NEURON. Get both InterViews (IV) and NEURON (nrn) and issue the following commands in a terminal window3,5:
4b. Compile and install InterViews:
4c. Compile and install NEURON with python and MPI support:
$ IDIR=/Applications/NEURON-X.X
$ cd ~/Downloads/neuron/
$ tar xvzf nrn-X.X.tar.gz
$ cd nrn-X.X/
$ ./configure --prefix=$IDIR/nrn --with-iv=$IDIR/iv --with-nrnpython=/opt/local/bin/python --with-paranrn
$ make
$ sudo make install
$ sudo make after_install
5. Add the new NEURON directory to your PATH variable. If you are using the bash shell (often default), edit the file ~/.bashrc by adding or modifying a line that looks like:
where
ARCH
is most often one of i386, i686, or x86_64 and can be found in the terminal by going to /Applications/NEURON-X.X
and looking for one of these.6. You need to build in support to run NEURON as a module:
This can be tested:
That last statement should not complain at you. Instructions on how to start NEURON with python and vice versa are found on this website.
7. Now, let’s install mpi4py, which is necessary for letting Python handle MPI. I could not get the MacPorts py27-mpi4py package working, but it works from source. It’s important that the right python is run on this command and that it knows where mpicc lives.
Kitchen Sink Mac Os Pro
a. Download the mpi4py source from here.
b. Now unzip and compile here:
Kitchen Sink Mac Os X
Per the installation instructions in mpi4py, this can all be tested:
![Sink Sink](https://www.imore.com/sites/imore.com/files/styles/large/public/field/image/2019/06/macos-finder-sync-screen.jpg)
This should also have reasonable output. Please leave comments if certain aspects worked or did not work or if anything here needs clarification!
1 I am not sure if numpy and scipy are required for NEURON, but they may be useful to you, and I’ve found MacPorts to be the most straightforward, clean installation of it.
2 Assumes that the file downloaded to your
3 Please, replace the X’s with the version number that you downloaded, such as ‘1.6’ or ‘1.4.3’
4 You may need to issue the command
5 The trailing ‘/’ may be important. For safety sake, just include it.
2 Assumes that the file downloaded to your
~/Downloads/
folder (often defaults here)3 Please, replace the X’s with the version number that you downloaded, such as ‘1.6’ or ‘1.4.3’
4 You may need to issue the command
'sudo make all'
instead of 'make all'
5 The trailing ‘/’ may be important. For safety sake, just include it.