Installing CNS 1.1 on OS X
From OS X Scientific Computing
CNS compiles with g77, gfortran, the IBM fortran compiler, and the Intel fortran compiler. I suggest you install the fast version, but you may instead or in addition wish to install the fink package, so I will continue to maintain it. I have a CNS on OS X web page that will gradually phase out in favor of this wiki page.
Contents |
Fast versions of CNS compiled with IBM & Intel compilers
David Gohora has very kindly made available binaries of CNS for both ppc and intel. He has put a lot of effort into optimizing these and they are remarkably fast. This is what I use, and I recommend you download the version appropriate for your computer.
Obtaining the software
- You can obtain David Gohora's precompiled ultra-fast CNS binaries from the SBGrid website
Installing it
Just download the directory and place it into /usr/local/whereveryouwantit and read the enclosed instructions.
Useful additions
I've made several customizations that will make your life easier. I think some of these might have made their way into David Gohara's package, but if not, you can either get these from my CNS web page or just install the fink version of CNS (see below) and these will be set up automatically for you.
Compiling CNS with an "unofficial" fink package
The most current version of my "unofficial" fink package comes with a shell script, called cns, that gets installed into /sw/bin. This shell script will look for one of David Gohara's binaries, and if it succeeds, it will run that in preference to the one compiled with gfortran. I keep the latter on hand in case there is a run-time bug in the fast one (I haven't encountered one in quite awhile), and also because it semi-automatically sets up cns_edit and cns_web to use the Camino web browser for the GUI interface. There's a few other things too, like a Patterson plotter that makes pdf's and opens them in preview, and a cns_env.sh taylored for zsh and bash, as well as the tcsh version, which are set up for you automatically.
Here's what you need to do:
Obtain my unofficial fink info and patch files
Download my cns.info and cns.patch scripts. Then copy both into /sw/fink/dists/local/main/finkinfo, i.e.,
sudo cp cns.* /sw/fink/dists/local/main/finkinfo/.
Register for CNS
Go to the CNS registration page to register for CNS and to obtain via email the password for the ftp site and directions. (Yes, you have to do this even if you are installing the binaries!).
Obtain the source code
Download these three tarballs without unpacking them (control-click the link or use ftp):
- cns_solve_1.1_basic_inputs.tar.gz
- cns_solve_1.1_test.tar.gz
- cns_solve_1.1_data.tar.gz
Put the tarballs where Fink can find them
Put these three files, in their original tar.gz form, into /sw/src , i.e.,
sudo cp cns_solve_1.1_*.gz /sw/src/.
Install CNS along with all its dependencies
Now just issue the command
fink install cns
and go have some coffee.
To use cns_edit and cns_web
I've modified the cns_edit and cns_web commands to work with the Camino web browser. If you don't have it already, get it. Then please have each user do the following to allow you to save edited cns scripts wherever suits you:
mkdir ~/Library/Application\ Support/Camino
cd ~/Library/Application\ Support/Camino
then create and edit a file called user.js and put in it the following line:
user_pref("browser.download.autoDownload", false);
Doing so will now allow you to choose the directory into which you can save the edited input file.
I've put further details on this web page, which includes instructions on how to do this with other browsers if you don't like my Camino solution.
Installing Pre-Compiled Fink binaries
Obtaining the software
- You can either configure fink to use my pre-compiled packages, or you can do this manually, as described below.
Installing it
If you have configured fink to use my pre-compiled packages, just issue the commands
sudo apt-get update; sudo apt-get dist-upgrade sudo apt-get install cns
If you would rather do this manually, you can download my debian package file and install it with the command
sudo dpkg -i cns*.deb
and then you are done.
- Right-click or control-click this link to download my cns.deb file for ppc
- Right-click or control-click this link to download my cns.deb file for intel
Be sure to get the most recent version.

