Environment Setup for CLASSE Releases

Releases builds of Bmad, CESR control system, and other software on the CLASSE Linux Computers. CLASSE Releases are only used by people working on the CLASSE network and is separate from Bmad on GitHub.

Access to the CLASSE network requires a CLASSE account. Releases are for " ON-Site" work.

CLASSE Release Overview

About once a day (done in the morning at 3 am), a script is run on the CLASSE Linux cluster that does the following:
  1. Creates a directory in the $ACC_BASE directory. This directory will have a name of the form: cesr_YYYY_MMDD_d where YYYY is the year, MM is the month, and DD is the day.
  2. Checks out code from the ACC Code Repository into this newly created directory
  3. Compiles the libraries and compiles/links programs.
The directory so created along with the libraries, executables, etc within it is known as a Release. Each Release is named and dated and can be selected for use when running programs or building user created code. Old Releases are periodically purged.

At any one time, three Releases are tagged with the names: nightly, devel, and current. Which releases are so tagged is changed periodically.
  • The nightly Release is the latest successful build. nightly builds are kept for a week.
  • The devel Release is the latest stable Release generated on or about the last Tuesday. A stable Release is one where there have been no reported bugs. devel builds are kept for two months.
  • The current Release is a former devel Release generated on or about the first Tuesday of the previous month. The current build is kept for two years.
Since current Releases are older than devel Releases, in theory the latest current Release should be more stable than the latest devel Release since there has been more time for bugs to have been reported. In practice, this advantage is typically more than offset by improvements to the code base that are happening constantly.


Third party libraries (for example the LAPACK, Numerical Recipes, etc.) that are part of the ACC Code Repository are called "packages" and are treated differently from Cornell developed "local" libraries. The reason for this comes from the fact that these libraries are infrequently modified so that they do not have to be compiled on a daily basis. The package libraries are thus compiled separately from the Release build which only involves the local libraries.

When any one of the package libraries has been updated, all the package libraries are checked out from the ACC Code Repository and compiled in a subdirectory of $ACC_BASE with a name of the form: packages_YYYY_MMDD_d where YYYY is the year, MM is the month, and DD is the day. Then, when a Release is built, a link is made to current "active" package so that the local code is compiled against the appropriate package libraries. The active package is determined by a soft link called packages in the $ACC_BASE directory.

For most purposes, one can ignore the fact that the package libraries are compiled separately from the local libraries since the appropriate bookkeeping is built into the system.

Enable the ACC Environment in Your Shell

Each shell session (terminal window) you spawn will need to have the ACC environment set up within it in order to use release components of the "Active" Release. The Active Release is the release the ACC Build System will link against when building code. For this reason, it is wise to place the environment setup and release selection script invocation into your login script.

For those people who work with the Online CESR control system: Please follow the instructions as described in https://cesrwww.lepp.cornell.edu/wiki/CESR/CesrUserLoginScripts

For those who do not develop on a Online CESR system: Add the following your ".bashrc":

if ( [ -f ${ACC_SETUP_SCRIPT} ] ); then
      source ${ACC_SETUP_SCRIPT}

This will cause all new terminal sessions to use the current release as the active release.

Setting The Active Release

In the course of your development or application running activities, you may want to select a different active release. Provided your login script invokes the ACC setup mechanism shown above, this is quite easy, simply type one of the following:

current         # Sets your active release to the current release.
devel           # Sets your active release to the devel release.
nightly         # Sets your active release to the nightly release.

Note: All releases consist entirely of 64-bit binaries!

To list all the releases, type command:

ls -l $ACC_BASE 

Releases will have name of the form cesr_YYYY_MMDD_d. Also shown will be the soft links for current, devel and nightly, as well as package directories with names of the form packages_YYYY_MMDD_d.

The following command can then be used to set up one's environment to use one of the releases found:
setrel release_name   # Make a specific release the active release.

To see what Release is being used by a terminal session, use the command:

This will display a summary of the active release's short name ('devel', 'current' etc), its true (dated) name, build architecture, and selected Fortran compiler.

Remote Computer Access (NoMachine)

Important: Using the X11 windowing system when accessing LEPP computers from a remote computer can be slow due to the firewall between the LEPP computers and the outside world. X11 is used, for example, when any program, like Tao, pops open a window to display graphics output.

To overcome this, NoMachine servers have been setup on LEPP computers. NoMachine is a computer program that handles remote X Window System connections, and attempts to greatly improve on the performance of the native X display protocol to the point that it can be usable over a slow link.

Another advantage of using NoMachine is that if the connection is lost between the remote computer and LEPP, the state of the windows is saved by the NoMachine server and everything is restored upon a reconnection to the server.

To use NoMachine for remote access:
  1. Follow the setup instructions.
Note: For computation intensive jobs, In order to keep from saturating a shared NoMachine server computer, consider connecting from the NoMachine server computer to a fast "farm" computer using the command:

qrsh -q interactive.q

Behind the Scenes

This information is more technical in nature and most users will have no need for it, but it is made available for the curious and for completeness. The environment variables that are set up by the above initializations are:
ACC Variables  
ACCR URL of the ACC Code Repository
ACC_ARCH Indicates which operating system and CPU type you are building on (duplicated for flexibility)
ACC_BASE Indicates the top of the library search tree for a particular OS/CPU
ACC_BIN Path to the prebuilt executables area for the active release
ACC_BUILD_EXES Logical to switch on/off building of executables in addition to the libraries
ACC_BUILD_SYSTEM Directory of Master.cmake file used in building.
ACC_CMAKE_VERSION Minimum version of CMake needed.
ACC_CONFIG Path to the configuration file area for the active release.
ACC_DEBUG Directory of the executables built with the debug switch.
ACC_EXE Path to the prebuilt executables area for the active release (duplicated for backwards compatibility)
ACC_FC Indicates the Fortran90 compiler selected for use
ACC_GMAKE Path to the build system's GNU Makefile area
ACC_OS_ARCH Operating system architecture.
ACC_PKG Path to the 3rd party software packages area used in conjunction with the active release
ACC_PLATFORM Indicates which operating system and CPU type you are building on
ACC_PLOT_PACKAGE Sets plotting package
ACC_RELEASE Shortcut name of the selected release (if 'devel', 'current' or some special name, the true name otherwise.)
ACC_RELEASE_DIR Path to the CESR code release that you are building against (the active release). Also see: ACC_ROOT_DIR
ACC_REPO URL of the ACC Code Repository (duplicated for flexibility)
ACC_ROOT_DIR Same as ACC_RELEASE_DIR except that, when working with Distributions, ACC_ROOT_DIR wil point to the Distribution root directory.
ACC_SET_F_COMPILER Sets Fortran90 compiler
ACC_TRUE_RELEASE The true name of the selected release
ACC_UTIL Path to the utility scripts area
For build system environment variables, please visit the Environment Variables That Control The Build Process section of the Accelerator Build System wiki.
Topic revision: r59 - 19 Apr 2024, DavidSagan

  • ACC/ACL Web

  • CLASSE Computing Info

Create personal sidebar

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback