NRAO
 

Astronomical Image Processing System
Special MacIntosh OS X instructions

[AIPS]

The 31DEC09 version of AIPS is available as our active development version. It is likely to change on a daily, weekly, and monthly basis. The older 31DEC08 version is "frozen" although some patches for it may be made. They both contain a ports to the MacIntosh OS X (Darwin) operating system for PPC and Intel cpus. These ports are still relatively new and the code and instructions below are likely to need revisions as more experience is obtained. In particular, users doing a text installation will need to follow new instructions to install the full set of GNU compilers and readline from GNU-provided source code. However, a binary installation is now available, including the update process known as the "Midnight Job." The binary installation provides load modules and run-time libraries build by the (somewhat expensive) IBM xlf or Intel ifort compilers. These executables appear to run up to 50% faster than those produced by the GNU compilers.

Many thanks to Kristy Dyer and Michael Rupen of NRAO who loaned an iBook computer for this development and who provided much need help and encouragement in the process. Boyd Waters (NRAO) and Miguel F. Morales (MIT) also provided considerable advice. Juan Cabanela (St. Cloud State University) has been at the forefront in dealing with problems in more recent versions. A number of other Mac owners have also contributed time and effort. Wes Young of the NRAO AIPS Group has been instrumental in developing the binary installation process and debugging recent OS/X issues.

Table of Contents


Basic downloads required

Binary installations of AIPS will need the basic tools "cvs" and "XWindows" in non-developer form. If you are doing a text installation, i.e. are compiling the code yourself, then you will need Fortran and C compilers and a variety of software developers tools including those for XWindows.
  1. Mac OS X Developer Tools: You will need the basic software developers' kit from Apple. It contains the C compiler and lots of other goodies, and is available for free. The developers' kit may be available in "/Applicatons/Installers/Developer Tools". Use the finder to see if it's there, click on Applications, then Installers, then Developer Tools. If it exists then double click on the package icon and install the compiler. If the Developers' Tools are not available on your hard drive, they may be available from CD if you bought Jaguar or Panther. If you have the CD's locate the Developers' Tools CD (Xcode disk for Panther) and install the "Developers' Tools" package from disk. One final place to get the "Developers' Tools" is from the Apple Developer Connection (ADC). Details on the ADC are available at the ADC membership page, while details of the Developer Tools are available at the tools page. Once you're a member, you can go to http://connect.apple.com site log in and snag the software.
  2. You will need XWindows for either a binary or a text installation. With the Panther (X 10.3) version, X11 is installed from disc 3 of the Panther distribution. The developer tools may be installed from the Xcode CD. Alternatively, the sites mentioned below may be used to obtain X11.
  3. Apple supplies X11R6. Go to the X11 download page and click on "Download X11". Do the usual installation by clicking on the icon of the downloaded object. Note that the version of X11 now available only works on Panther. Jaguar users see below.
  4. For a text installation, you also need the XWindows software developers kit which contains the C include files needed to compile XAS. Apple gives this away too. Go to the main X11 page. At the bottom to the very right hand side is, in small letters, a button to click which will download the SDK. Do the usual installation by clicking on the icon of the downloaded object.
  5. Jaguar users may obtain X11 via sourceforge. The easiest way to do this is to grab XonX. Go to XonX homepage and get Download of X11 4.3.0. That is a simple Mac Installer based package for installing X11 including all the libraries.
    Next, you need a simple Xserver window server. The most "mac-like" one other than Apple's is OroborusX available at: Oroborus homepage. It provides a nice installer and users can then just double click the OroborusX application to launch their X11 server.

Installing the GNU compilers and readline: text installations only

  1. Download the GNU tar balls from GNU or, more simply, from NRAO. They are gcc-3.3.2.tar.gz (31548232 bytes) and readline-4.3.tar.gz (961662 bytes).
  2. Disable the line
             source /sw/bin/init.csh; rehash
    from your account's .tcshrc, .cshrc, or .bashrc file if present. Note that this may have dire consequences for other Fink-supplied utilities and is probably not needed any more. The default Fink gcc has also been of an acceptabloe flavor of late.
  3. Install the compilers using
             ./configure --prefix=/usr/local/gnu
             gnumake bootstrap
             sudo gnumake install
  4. Install readline using
    	 export CC=/usr/local/gnu/bin/gcc 
    	     or
    	 setenv CC /usr/local/gnu/bin/gcc
             ./configure --prefix=/usr/local/gnu --with-curses --disable-shared
             gnumake
             sudo gnumake install

Alternate compilers

  1. IBM sells a Mac OS/X version of their xlf compiler. This has produced improved performance in our tests and is now understood in $SYSLOCAL files CCOPTS.SH, FDEFAULT.SH, and LDOPTS.SH.
  2. Go to IBM and fill out their marketing survey to get a temporary free trial version of the compiler.
  3. Install it following IBM's instructions.
  4. We have made binary versions of the Mac load modules build with the xlf compiler available to our users, including the necessary run-time libraries. This is now offered for the 31DEC05 and later releases.

File systems

  1. The file systems that you use for AIPS should be fully modern ones. Please use "MACos extended, with lower-case support" file systems. The "FAT32" file system does not allow, among other things, the rename system operation which AIPS requires.

Now install AIPS

  1. Following the instructions for installing the 31DEC09 version of AIPS. After install.pl has been downloaded, it will need to be made executable. Run it with the command perl install.pl or edit it to set /usr/bin/perl rather than /usr/local/bin/perl in its first line. (The command perl install.pl -n is used for the binary installation.)
  2. Make sure on screen 10 that readline points to the /usr/local/gnu/libreadline.a version.
  3. When the installation has finished, copy /etc/services to some area you own and edit it, adding the lines
    sssin           5000/tcp        SSSIN      # AIPS TV server
    ssslock         5002/tcp        SSSLOCK    # AIPS TV Lock
    msgserv         5008/tcp        MSGSERV    # AIPS Message Server
    tekserv         5009/tcp        TEKSERV    # AIPS TekServer
    aipsmt0         5010/tcp        AIPSMT0    # AIPS remote FITS disk access
    aipsmt1         5011/tcp        AIPSMT1    # AIPS remote tape 1
    aipsmt2         5012/tcp        AIPSMT2    # AIPS remote tape 2
    

    You will have to comment out some conflicting services, all of which we believe are obsolete. Then
    sudo cp services /etc
    and enter your password when required.

Now run AIPS

  1. Start up /Applications/X11.ap/Contents/MacOS/X11.
  2. In the xterm that this creates, type the aips command line and begin your aips session.

But there are problems

  1. If things do not work properly, e.g. the TV does not start, see the AIPS Manager FAQ for suggestions. On leopard systems, you will need to reset the DISPLAY environment variable
                export DISPLAY=localhost:0
    or
                setenv DISPLAY localhost:0
    in the xterm that you run aips from to get the local tv.

  2. The default Mac system limits shared memory pages to 4 Mbytes. When XAS starts it tells you that it is making a screen x pixels by y pixels. The memory you will need is at least 4 x y bytes. For the new large screens this is more than 8 Mbytes. On Panther stsems (X 10.3), you can change this limit by changing (as root or admin) the rc file in /etc, adjusting the kern.sysv.shm* line to
             #Setting the shared memory to something a bit more reasonable.
                sysctl -w kern.sysv.shmmax=10485760
                sysctl -w kern.sysv.shmmin=1
                sysctl -w kern.sysv.shmmni=32
                sysctl -w kern.sysv.shmseg=8
                sysctl -w kern.sysv.shmall=4096
  3. On the latest "leopard" systems, /etc/rc is gone and creating it will have no effect. You need to create an /etc/sysctl.conf file and put the values in it,
                kern.sysv.shmmax=10485760
                kern.sysv.shmmin=1
                kern.sysv.shmmni=32
                kern.sysv.shmseg=8
                kern.sysv.shmall=4096
    You should use the values you had when you were running tiger. Those could be in /Previous\ System/etc/rc, assuming you have "Previous System". So three different OS upgrades and three different ways to adjust the default shared memory.

  4. On older Jaguar systems (X 10.2), you can change this limit by changing the SystemTuning file in
     
             /System/Library/StartupItems/SystemTuning
    Look for the lines
             sysctl -w kern.sysv.shmmax=4194304
             sysctl -w kern.sysv.shmall=1024
    Change the 4194304 to 10485760 (for 10 Mbytes) and change the 1024 to 4096 (allows 16 Megabytes).

  5. Note that you must re-boot the computer after making the above changes to the shared memory.

Performance measurements

We have made binary installations available for Macs including a binary update as part of the MNJ (see below) for both the 31DEC05 and later releases. As part of the testing for this, we have tested 3 compilers and two architectures so far. Current results appear below:

    Machine   Machine         Compiler    DDTL      Y2KL     Y2KL cpu  AMark
    run on    compiled on     type        sec       sec      min        2000
    -------   -----------     --------   -------   --------  --------  -----

1      4         4  .           A GNU    121-124     1126     16.28      35
2.     4         4              GNU      115-120     1060     15.14      38
3.     4         4 (b)          IBM       81- 83      748      9.58      53
5.     4         5 (gen)        IBM       77- 79      748      9.55      53
7.     4         4 (gen)        IBM       78- 83      759      9.57      53

11.    5         5              A GNU     69- 73      582      9.29      69
12.    5         5              GNU       68- 70      558      7.77      72
13.    5         5 (a)          IBM       33- 36      310      4.60     129
13.    5         5 (b)          IBM       32- 38      305      4.42     131
15.    5         5 (gen)        IBM       33- 34      300      4.46     133
16.    5         5 (gen -O5)    IBM       34- 39   313-322  4.66-4.82  >124

The G5 used is hakone a 2.0 GHz, dual-headed machine with 8 Gbyte ram,
       3 Terabytes disk!
The G4 used is pippin a 1.33 GHz, single-headed, rack-mounted machine
       with 1 Gbyte of ram.

Putting aips on a "disk image" slows things down (e.g. 47 sec DDT on
the G5 with the IBM compiler, 90 sec on G4)

IBM options (a) are -qthreaded -qunroll=auto -qtune=auto -qarch=auto
            (b) are -qtune=auto -qarch=auto
    all including (gen) use -O3.

The A GNU is the Apple-provided version of the GNU compilers while GNU
is one installed by Wes (~ 3.4.1).

The IBM xlf compiler (expensive) is clearly much more effective on Macs than the (free) GNU compiler. The license agreement on that compiler does allow us to make the run-time libraries and load modules available to our user community, so we have bought a copy and have revised the install.pl and MNJ scripts to carry out the binary installation and later updates.

You WILL want a Midnight Job!

If your site has a need for the current version of AIPS with updates via the Internet and the so-called midnight job, Read this information. It has additional information and instructions. Or contact Eric Greisen for further information.

Since releases of AIPS are planned to be only on an annual basis, the midnight job (now with easier setup and NO ssh) will be the only way for AIPS users outside of NRAO to avail themselves in a timely fashion of whatever enhancements, changes, or new functionality we add to Classic AIPS.


Modified on $Date: 2008/12/08 22:45:58 $
[Eric W. Greisen]