Elegant & SDDS on Mac OS X 10.5
Posted: 12 Jun 2008, 17:51
The elegant web page references the following URL as a guide for installation of elegant on Mac OS X (http://www.slac.stanford.edu/~hogan/elegant.html). This guide seemed to be out of date for Mac OS X 10.5 (Leopard) so I decided to try to update it. Below are my notes that I used to arrive at a working copy of elegant19 and SDDS on Mac OS X 10.5.3. By "working" I mean that I can successful execute all the elegant demos including graphics. I thought others might find the info useful.
Installation of elegant and SDDS Utilities on Leopard Mac OS X 10.5
Revision 2 Date: June 6, 2008: Upgrade to elegant 19
Mac OS Version: Mac OS X 10.5.3
Elegant Version: 19
1. Download elegant 19 binaries from the ANL OAG website and combine with SDDS binaries in the same folder (e.g., /OAG_Apps).
2. You must install one additional library using the fink application:
/sw/bin/fink install readline-shlibs
3. Now the elegant 18.1.4 demos still run
4. The install procedure given below in Revision 0 should still work on Leopard Mac OS X 10.5.3 with elegant 19 if steps 1 & 2 above where added
Revision 1 Date: May 28, 2008: Upgrade to Mac OS X 10.5.3
Mac OS Version: Mac OS X 10.5.3
Elegant Version: 18.1.4
1. Used Apple’s “Software Update” to upgrade to Leopard Mac OS X 10.5.3
2. elegant 18.1.4 demos still run
3. The install procedure given below in Revision 0 should still work on Leopard Mac OS X 10.5.3
Revision 0 Date: May 22, 2008: Installation of elegant 18.1.4 & SDDS on Leopard Mac OS X 10.5.2
Mac OS Version: Mac OS X 10.5.2
Elegant Version: 18.1.4
Modification of an earlier installation guide by Borland, Hogan & Soliday: (http://www.slac.stanford.edu/~hogan/elegant.html )
1. Perform Apple’s “Software Update” from the System Preferences application on Leopard Mac OS X 10.5 to update all applications and the operating system to the latest version.
2. XCode3.0 (includes gcc, g77 etc for compiling software). Using the Leopard MAC OS X 10.5 software distribution disk, install the XCode3.0 tools. The XCode software must be installed before fink (see below).
3. Apple's X11 & Terminal apps should already be installed. Click on the “Applications” icon in the dock; you’ll find a folder called “Utilities”. Inside this folder you will find both the “X11” and “Terminal” applications
4. fink is a package for installing UNIX packages that have been ported to OS X. Unfortunately as of May 22, 2008 there is no binary available for Download; you must go to the source release page (http://www.finkproject.org/download/srcdist.php ) and follow the instructions to download and build fink-0.28.1 (Current version as of May 22, 2008). You may need an application like “Stuffit Expander” to unpack the tar archive into a folder. When installing fink you will be asked some questions on how to configure it. The default answers are OK for everything except that you must select to use the “unstable” version of the libraries instead of the “stable” version to get the latest versions required by elegant 18.1.4 and the SDDS Utilities. Fink Commander is also not available for Leopard MAC OS X 10.5 as of May 22, 2008. So as not to corrupt the MAC OS X directories, fink will install itself in /sw .
5. You must install several libraries using the fink application:
/sw/bin/fink install libpng3-shlibs
/sw/bin/fink install openmotif3-shlibs
/sw/bin/fink install readline5-shlibs
/sw/bin/fink install gd2-shlibs
/sw/bin/fink install libtiff-shlibs
6. OAG Downloads Key – Elegant and the SDDS Utilities are available from the ANL OAG website . You must obtain a free OAG Download Key which is done by providing your email address when prompted, and you'll be emailed the key (a password) to allow you to download ELEGANT and related files from the ANL OAG website.
7. ELEGANT - all the files are contained in a binary archive. As of May 22, 2008 the version number is elegant 18.1.4. Download the compiled binaries (darwin-x86_elegant.tar.gz) for MAC OS X via this link.
8. The SDDS Utilities are not required to run ELEGANT, but if you want to take advantage of all the post processing routines that have been written, you'll need the SDDS Utilities. All the necessary files are in the binary archive (darwin-x86_SDDS.tar.gz ), and the version used here was dated Feb. 14, 2008.
9. Once ELEGANT and the SDDS Utilities are unpacked into their respective folders it is recommended to copy the contents of both folders into a single folder (e.g., /OAG_Apps).
10. defns.rpn - put this in the same folder as all the ELEGANT and SDDS files (e.g., /OAG_Apps). This is called the "rpn definitions file" and is needed mainly for doing optimization runs. Be sure to define the environment variable RPN_DEFNS to point to this file. You can run ELEGANT without this file, but it will not work if you try and run any of the optimization routines or have simple arithmetic expressions in your lattice file. Example statements to define this variable is:
setenv RPN_DEFNS /OAG_Apps/defns.rpn
or
export RPN_DEFNS=/OAG_Apps/defns.rpn
11. You must include the folder with all the applications in your PATH as follows:
setenv PATH $PATH:/OAG_Apps
or
export PATH=$PATH:/OAG_Apps
Running ELEGANT:
1. If you are new to ELEGANT, get the example files and scripts. Then get the ELEGANT manual and SDDS Utilities manuals and start reading. A typical command to run elegant in a Terminal or X11 window is: elegant bunchcompress.ele .
2. You can run ELEGANT from either the Terminal application or an X11 xterm. The Terminal application is nicer and lets you cut & paste etc, as well as a few handy tricks like dragging any folder into an open terminal window & you instantly get the path typed for you.
3. Once you have run ELEGANT, you can run the SDDS Utilities to manipulate and plot the output. If you get a "broken pipe" message from the Terminal application, you need to tell the X-windows where to go by typing:
setenv DISPLAY <computer name or ip number>:0
or
export DISPLAY=<computer name or ip number>:0
4. If you have files you have used with the PC version of ELEGANT, you can use these but be sure that the lattice file is saved with UNIX linebreaks - not Mac or PC linebreaks. Use either a UNIX editor of your choice like vi, pico, emacs or BBEdit and use the options to specify UNIX linebreaks.
Installation of elegant and SDDS Utilities on Leopard Mac OS X 10.5
Revision 2 Date: June 6, 2008: Upgrade to elegant 19
Mac OS Version: Mac OS X 10.5.3
Elegant Version: 19
1. Download elegant 19 binaries from the ANL OAG website and combine with SDDS binaries in the same folder (e.g., /OAG_Apps).
2. You must install one additional library using the fink application:
/sw/bin/fink install readline-shlibs
3. Now the elegant 18.1.4 demos still run
4. The install procedure given below in Revision 0 should still work on Leopard Mac OS X 10.5.3 with elegant 19 if steps 1 & 2 above where added
Revision 1 Date: May 28, 2008: Upgrade to Mac OS X 10.5.3
Mac OS Version: Mac OS X 10.5.3
Elegant Version: 18.1.4
1. Used Apple’s “Software Update” to upgrade to Leopard Mac OS X 10.5.3
2. elegant 18.1.4 demos still run
3. The install procedure given below in Revision 0 should still work on Leopard Mac OS X 10.5.3
Revision 0 Date: May 22, 2008: Installation of elegant 18.1.4 & SDDS on Leopard Mac OS X 10.5.2
Mac OS Version: Mac OS X 10.5.2
Elegant Version: 18.1.4
Modification of an earlier installation guide by Borland, Hogan & Soliday: (http://www.slac.stanford.edu/~hogan/elegant.html )
1. Perform Apple’s “Software Update” from the System Preferences application on Leopard Mac OS X 10.5 to update all applications and the operating system to the latest version.
2. XCode3.0 (includes gcc, g77 etc for compiling software). Using the Leopard MAC OS X 10.5 software distribution disk, install the XCode3.0 tools. The XCode software must be installed before fink (see below).
3. Apple's X11 & Terminal apps should already be installed. Click on the “Applications” icon in the dock; you’ll find a folder called “Utilities”. Inside this folder you will find both the “X11” and “Terminal” applications
4. fink is a package for installing UNIX packages that have been ported to OS X. Unfortunately as of May 22, 2008 there is no binary available for Download; you must go to the source release page (http://www.finkproject.org/download/srcdist.php ) and follow the instructions to download and build fink-0.28.1 (Current version as of May 22, 2008). You may need an application like “Stuffit Expander” to unpack the tar archive into a folder. When installing fink you will be asked some questions on how to configure it. The default answers are OK for everything except that you must select to use the “unstable” version of the libraries instead of the “stable” version to get the latest versions required by elegant 18.1.4 and the SDDS Utilities. Fink Commander is also not available for Leopard MAC OS X 10.5 as of May 22, 2008. So as not to corrupt the MAC OS X directories, fink will install itself in /sw .
5. You must install several libraries using the fink application:
/sw/bin/fink install libpng3-shlibs
/sw/bin/fink install openmotif3-shlibs
/sw/bin/fink install readline5-shlibs
/sw/bin/fink install gd2-shlibs
/sw/bin/fink install libtiff-shlibs
6. OAG Downloads Key – Elegant and the SDDS Utilities are available from the ANL OAG website . You must obtain a free OAG Download Key which is done by providing your email address when prompted, and you'll be emailed the key (a password) to allow you to download ELEGANT and related files from the ANL OAG website.
7. ELEGANT - all the files are contained in a binary archive. As of May 22, 2008 the version number is elegant 18.1.4. Download the compiled binaries (darwin-x86_elegant.tar.gz) for MAC OS X via this link.
8. The SDDS Utilities are not required to run ELEGANT, but if you want to take advantage of all the post processing routines that have been written, you'll need the SDDS Utilities. All the necessary files are in the binary archive (darwin-x86_SDDS.tar.gz ), and the version used here was dated Feb. 14, 2008.
9. Once ELEGANT and the SDDS Utilities are unpacked into their respective folders it is recommended to copy the contents of both folders into a single folder (e.g., /OAG_Apps).
10. defns.rpn - put this in the same folder as all the ELEGANT and SDDS files (e.g., /OAG_Apps). This is called the "rpn definitions file" and is needed mainly for doing optimization runs. Be sure to define the environment variable RPN_DEFNS to point to this file. You can run ELEGANT without this file, but it will not work if you try and run any of the optimization routines or have simple arithmetic expressions in your lattice file. Example statements to define this variable is:
setenv RPN_DEFNS /OAG_Apps/defns.rpn
or
export RPN_DEFNS=/OAG_Apps/defns.rpn
11. You must include the folder with all the applications in your PATH as follows:
setenv PATH $PATH:/OAG_Apps
or
export PATH=$PATH:/OAG_Apps
Running ELEGANT:
1. If you are new to ELEGANT, get the example files and scripts. Then get the ELEGANT manual and SDDS Utilities manuals and start reading. A typical command to run elegant in a Terminal or X11 window is: elegant bunchcompress.ele .
2. You can run ELEGANT from either the Terminal application or an X11 xterm. The Terminal application is nicer and lets you cut & paste etc, as well as a few handy tricks like dragging any folder into an open terminal window & you instantly get the path typed for you.
3. Once you have run ELEGANT, you can run the SDDS Utilities to manipulate and plot the output. If you get a "broken pipe" message from the Terminal application, you need to tell the X-windows where to go by typing:
setenv DISPLAY <computer name or ip number>:0
or
export DISPLAY=<computer name or ip number>:0
4. If you have files you have used with the PC version of ELEGANT, you can use these but be sure that the lattice file is saved with UNIX linebreaks - not Mac or PC linebreaks. Use either a UNIX editor of your choice like vi, pico, emacs or BBEdit and use the options to specify UNIX linebreaks.