next up previous contents
Next: Running SCHED Up: INSTALLING, AND RUNNING SCHED Previous: INSTALLING, AND RUNNING SCHED   Contents


Installing SCHED

This section is only needed if you do not have access to an installed copy of SCHED.

It is important that users obtain and use the latest version of SCHED when scheduling observations. SCHED is evolving with time to add new features, to correct bugs, to keep up with hardware changes, and to enhance its ability to prevent errors from being made in schedules, based on experience. There are typically one or two releases each year and they are announced on the VLBI email exploder. At institutions where there are several VLBI users, someone should be in charge of making sure that the latest version is available. When that option is not available, the user should check that he/she has the latest version before attempting to schedule a project.

The SCHED software, catalogs, auxiliary files, and documentation all reside in subdirectories under a parent directory. Installing SCHED  involves unpacking the tar file of the distribution into such a directory. If a canned executable is available for your type of computer, it can hopefully, used as is. Otherwise it will be necessary to compile the program. The SCHED environment variable should be set to the root directory where SCHED is installed. The PGPLOT subroutine library is required. See below if you need to install it.

The installation can be tested using the Verify script in the examples subdirectory. That script runs all the examples and compares the results with results obtained at the time the release was created.

SCHED is written in FORTRAN 77 using only a few common extensions from the standard. Development has occurred on a variety of machines including VAXes, PCs, SUNs and Macs. Current development is done under Linux and Mac OSX, with pre-release testing on a Sun. Old versions were tested on Hp, SGI, IBM (AIX), and DEC Alpha, but such machines are no longer being used for SCHED as far as I know. A big ``thank you'' to Franco Tinarelli at Bologna for performing many of these tests. Machine dependent code has been isolated in special subdirectories under the src/Cit code directory. There are very few. All other FORTRAN files should compile without changes on a wide variety of machines. Note, however, that all current testing is under one or another flavor of unix. There has been no recent testing under other operating systems. This will only change if there is pressure to do so. Please inform the developers if you install it on something else.

Note that the usual fortran compiler on unix machines (including Macs) these days are those from the GNU Project. In the past, the compiler was g77. That works with gcc versions 3 and lower. But development of g77 is long finished. For gcc 4 and higher, you must use gfortran which was written from scratch. We are in the process of switching the support of SCHED to gfortran and have done so for various architectures as can be seen in the configure scripts. For some older versions, we may not bother switching, but simply stop supporting, for example, 32 bit machines. By stop supporting, we mean not provide configure scripts or test before releases. It is likely you could still use such machines. We will also need to migrate the spice code for spacecraft tracking before we can abandon g77 completely.

If you plan to support SCHED under more than one computer architecture, you may wish to have subdirectories under bin and point to the appropriate one in the PATH environment variable. Or you may wish to have entirely separate installations.

To install SCHED, the following steps can be followed. Users of anything but unix or linux (who don't exist as far as we know) will have to make some modifications.

Users of Mac OSX will need to have X windows and the compiler installed. Also for full functionallity, pgplot should be installed. There are some more details at the end of this section.

Environment and PATH (unix systems):
Set the environment variable SCHED to the base directory under which SCHED will be installed. To do this type, for example, either setenv SCHED /users/cwalker/sched or export SCHED=/users/cwalker/sched depending on the shell you use. Add the bin subdirectory to your PATH, be prepared to specify the full path name when you run the program, or put a copy of the binary (or a link to it) in some directory that is in your PATH. If the plotting capabilities are used, which is highly recommended, PGPLOT will need to have been installed and the environoment variables PGPLOT_DIR and maybe PGPLOT_FONT will need to be set. In Socorro, the path and environment variables can be established by adding setup_vlba and setup_pgplot to your .tcshrc.Linux (or equivalent file for other shells).

ftp the tar file:
Use anonymous ftp to ftp.aoc.nrao.edu (user "anonymous", password should be your full email address). cd to pub/sched. Tell ftp to do binary file transfers (type binary). List the tar files and subdirectories present. The latest version will be in a subdirectory with the highest version number. Go to that subdirectory and copy the sched.<version>.tar.gz to your $SCHED directory. As of Version 8.0, that tar file contains everything except the binaries for the common architectures. There will also be a binaries subdirectory which has subdirectories for several architectures which are obvious from their names ("spice" in the name implies a version with satellite tracking enabled, which may only work at the AOC). Inside the architecture subdirectory is an executable version of SCHED. If one of these works for you, you can skip compiling the program and just use it.

Unpack the tar file:
To unpack the tar file, type tar -xvf <filename> -gunzip while in the $SCHED directory. This will unload all files from the tar file, creating the necessary subdirectory structure in the process. A README file will appear in the top level directory which contains useful information on the directory structure and on installing SCHED.

Note that, after this step, a local html version of this manual will be available in the doc/sched/sched.html under the parent SCHED  directory ($SCHED). Your browser will probably run much faster pointing at that version than at the version at NRAO.

Try the binary for your system:
If you downloaded an executable file, put it in the $SCHED/bin directory. Note that we are at a time of change in the computer world so there are a lot of options, not all of which are covered. Intel and equivalent machines are changing from 32 to 64 bit. GNU fortran is switching from g77 (with gcc version 3.x and below) to gfortran (with gcc version 4+). Macs have moved from PPC chips to Intel chips. And some versions of SCHED are set up to do satellite tracking with extra software not normally distributed with the package. The architectures covered are what are immediately available to the developers. The subdirectories are LINUX64 (64 bit Intel based Linux using g77), LINUX64SPICE (like LINUX64 but enabled for spacecraft tracking), and OSX_INTEL (Intel based Mac with gfortran). For a while, there may also be one or more of LINUX (32 bit Intel based Linux using g77), OSXPPC (PPC based Mac using gfortran), and SUN (SUN workstation running Solaris using f77). If one of the binaries works for you, use it. If not, you will need to recompile.

PGPLOT:
If the plotting capabilities are desired (believe me -- you want them), you should make the PGPLOT libraries and the font file available. Check if your system already has them. That is fairly likely at astronomy sites. If not, they can be obtained from many repositories of open source code. But if that doesn't work, as of July 2011, PGPLOT 5.3.1 (which is not obviously available on the PGPLOT website) is included with the SCHED distribution in the $SCHED/PGPLOT subdirectory. Simplified instructions for installation are given in $SCHED/PGPLOT/README_PGPLOT. There is extensive information on PGPLOT available from the WWW page at http://www.astro.caltech.edu/~tjp/pgplot/. Those web pages are also included with the PGPLOT distribution. Note that PGPLOT should be built with the same compiler and machine architecture as SCHEDfor everything to function properly.

Robert Mutel provided the following suggestion if you are running into problems on a MAC with the use of the pgplot libraries (complaints about being a FAT file): Edit the PGPLOT makefile to eliminate the ranlib indexing steps, and add a 's' option to the ar steps (this is equivalent to indexing with ranlib, but ranlib chokes because it cannot read 'fat' libraries, which contain both 32bit and 64 bit versions of the routines. 'Fat' libraries seem to be created by default by ar, at least in the recent Mac OSX release.

Compiling the program:
If you need to compile SCHED , you will need to construct an appropriate Makefile and run make. There is a template Makefile (Makefile.master) showing lots of possible options and a number of simple scripts that edit the template to build Makefiles for specific cases using the line editor sed. You can either modify the template Makefile or one of the scripts to match your system configuration. Basically what you need to do with the required edits is tell make what FORTRAN compiler you use and where various required libraries reside. There are lots of comments in the template Makefile to guide the process. Once ready, run make. Many routines are compiled so it will take a few minutes. Under gfortran, there will be some warnings that can be ignored, especially about character variables being truncated.

There is some oddity that has been seen on Mac OSX (May 2008) where it is not equivalent to just type make when the Makefile is what you want and typing, for example, make -f Makefile.MacOSX. The latter doesn't seem to work with what look to be problems finding libraries. We don't understand it.

Note that the Makefile requires the use of GNU make. Check for GNU make on your system. It is installed on many if not most and is the standard make under Linux and OSX. If you don't have it, it can be obtained from prep.ai.mit.edu. Also a version (probably not current) is available in the same ftp area as SCHED.

SCHED can be compiled with or without the plotting capabilities. It is highly recommended that you compile with those capabilites. To do so, you will need PGPLOT (version 5.2 or later) installed on your system. See above for more information on getting PGPLOT if you don't already have it.

There is also a stub for the routines related to use of the JPL emphemeris, in case that code causes problems. The JPL routines are used for observations of planets, which are probably only of interest for single-dish testing of the VLBA by staff. Using the stub requires changing some comments in the Makefile. Similarily, there is a stub to avoid using the NAIF software related to satellite tracking. The normal user will use that stub because the NAIF libraries are not normally distributed with SCHED.

Testing:
The examples in the examples subdirectory can be used to test the code once it has been installed. A few outputs from each example are stored in the Stdout subdirectory. For unix systems, the routine Verify can be used to run all of the examples and compare results with those in Stdout. The output from Verify will be in the file testruns.out. Any differences are in the output from diff. It is common to have differences in items such as source positions in the last significant figure. Different machines handle rounding differently. Such differences can be ignored. Any more serious differences are cause for concern.

Some VAX FORTRAN features that are commonly supported by other FORTRAN compilers remain in the code. These features are supported by all of the compilers that we are aware of that are being used for SCHED  currently. They include long variable names, in-line comments, and END DO. If you have problems with these features, please email cwalker@nrao.edu. Considerable use was made of the SLALIB (STARLINK) routines for precession, etc. These routines use long variable names so removing this non-standard feature would not be easy. (email permission to use the FORTRAN SLALIB routines has been obtained from P. Wallace, although the version under the GNU licence was installed in March 2013).

If the code or any other files are moved from a unix or VMS machine to a machine using DOS or Windows, beware that the end-of-line characters are different. At least on SUN and Linux, a pair of utilities unix2dos and dos2unix can be used to fix the files. As of Dec. 2009, SCHED under Unix and Unix-like operating systems can read DOS format files.

We are always interested in hearing about people's experiences installing SCHED on various machines. If you have problems, or even success on machines other than those listed earlier, please let us know (email to cwalker@nrao.edu). We would be especially interested if someone ports SCHED to a non-unix, or unix-like (eg Linux) operating system. SCHED was supported under VMS and DOS in the past and the coding style hasn't changed, so a port to such operating systems would probably not be difficult.

A recent experience installing SCHED on a MacOSX 10.5.4 system showed the need to be careful about compiler versions. That version of OSX uses version 4.0.1 of the gcc compiler. You have to use gfortran, a Fortran 95 compiler, with gcc versions above 4.0 and g77 with lower gcc versions. PGPLOT was loaded from the Fink, as were both g77 and gfortran, and the PGPLOT was first built with gfortran. The build of SCHED only went smoothly after switching to gfortran for SCHED. There will be similar issues wherever the switch from gcc 3 to 4 occurs. For some details of my first install of SCHED on a Mac in 2003, see Appendix B.8.


next up previous contents
Next: Running SCHED Up: INSTALLING, AND RUNNING SCHED Previous: INSTALLING, AND RUNNING SCHED   Contents
Craig Walker 2014-04-14