Elegant & SDDS on Mac OS X 10.5

Moderators: cyao, soliday

jbm
Posts: 4
Joined: 06 Jun 2008, 17:22

Elegant & SDDS on Mac OS X 10.5

Post by jbm » 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.

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Elegant & SDDS on Mac OS X 10.5

Post by michael_borland » 13 Jun 2008, 07:56

Jim,

Thanks for posting this. I've changed the software documentation page to point to this entry.

--Michael

mjhogan
Posts: 4
Joined: 27 Feb 2009, 19:49

Re: Elegant & SDDS on Mac OS X 10.5

Post by mjhogan » 27 Feb 2009, 19:52

Hello 'jbm',

Thank you so much for updating this. I'm using elegant and shower almost daily but confess I got so busy I forgot to update the installation guide. Thanks for picking up the ball and running with it! Also, thank you Michael & Robert for supporting our platform!

Take care,

Mark Hogan

hsayed
Posts: 8
Joined: 22 Jul 2008, 12:51

Re: Elegant & SDDS on Mac OS X 10.5

Post by hsayed » 02 Feb 2010, 17:34

Hi,

I was trying to install Elegant 22.1 on mac os x 10.6.2 but after doing all above tips when I run elegant I get this error message.


dyld: Library not loaded: /sw/lib/libreadline.5.dylib
Referenced from: /OAG_Apps/elegant
Reason: no suitable image found. Did find:
/sw/lib/libreadline.5.dylib: mach-o, but wrong architecture
Trace/BPT trap


Did anyone come across this problem before (I have tried reinstalling fink, readlin-lib did'nt work)
Thanks
Hisham

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: Elegant & SDDS on Mac OS X 10.5

Post by soliday » 03 Feb 2010, 10:43

I think you downloaded the wrong version of elegant. Does your computer have an Intel CPU or an older PPC cpu?
We offer elegant for both:
darwin-x86_elegant.tar.gz is for Intel CPU
darwin-ppc_elegnat.tar.gz is for PPC CPU

I just tried running the PPC version on an Intel machine and got the same error you got.

hsayed
Posts: 8
Joined: 22 Jul 2008, 12:51

Re: Elegant & SDDS on Mac OS X 10.5

Post by hsayed » 03 Feb 2010, 10:47

Hi Soliday,

Thanks, that was the problem. I did download the Intel version and it worked ( sorry did not note that there were two different versions for mac)
Hisham

Thorsten
Posts: 2
Joined: 29 Oct 2010, 02:09

Re: Elegant & SDDS on Mac OS X 10.5

Post by Thorsten » 29 Oct 2010, 06:58

Hey,

first I had the same problems as Hisham had, but with SDDS. After replacing the SDDS files with the new x86 ones, I got this error message when starting any SDDS command:

dyld: Library not loaded: /sw/lib/libtiff.3.dylib
Referenced from: /applications/elegant/sddsprocess
Reason: image not found
Trace/BPT trap

I don't know why the lib-files have been removed, but they are just not there anymore. Any guess?

Thanks,

Thorsten

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: Elegant & SDDS on Mac OS X 10.5

Post by soliday » 29 Oct 2010, 10:37

This file comes from Fink. I have the following libtiff packages installed:
libtiff 3.8.2-1002 TIFF image format library and tools
libtiff-bin 3.8.2-1002 Executables for libtiff package
libtiff-shlibs 3.8.2-1002 Shared libraries for libtiff package

Dmarinov
Posts: 1
Joined: 07 Feb 2011, 17:31
Contact:

Re: Elegant & SDDS on Mac OS X 10.5

Post by Dmarinov » 08 Feb 2011, 12:37

Thank you!! You solve my problem!

sizar
Posts: 1
Joined: 01 May 2011, 08:32

Re: Elegant & SDDS on Mac OS X 10.5

Post by sizar » 02 May 2011, 15:23

Thanks for the tutorial. It's very helpful for me.
Zapraszamy do odwiedzenia bazy noclegowej. Tanie noclegi

Post Reply