McIDAS User's Guide
Version 2017.2

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


Preparing the Workstation

Before installing McIDAS-X, verify that the workstation is configured to the specifications listed in the table on the previous page. Then continue with the section below for information about memory usage in McIDAS-X.

A Note About Memory

Each McIDAS-X session can have up to 9,999 frames. However, not all workstations can reasonably accommodate one or more users running sessions with thousands of frames. This is because system performance is reliant on several factors, including how much memory the workstations has, how many frames are created, how large the frames are, and how many graphics are drawn on the frames. McIDAS-X uses shared memory (a subset of system memory) to store image and graphics data for quick retrieval, while the X11 display subsystem uses a separate allocation of system memory for its own frame buffers. Shared memory usage in bytes is approximately equal to the number of pixels of imagery plus pixels of graphics and is allocated on the machine running the McIDAS-X commands. The number of pixels of imagery is LINES x ELEMENTS x FRAMES, while the number of pixels of graphics is usually far less than the number of image pixels, with each graphics pixel on screen using eight bytes of memory. Graphics covering 10% of your imagery pixels will approximately double the shared memory requirements. Erasing graphics does not free up memory, though the space is reused when new graphics are drawn. System memory usage for the X11 display subsystem is about LINES x ELEMENTS x FRAMES x 4 due to the high bit-depth of the frame buffers, and is allocated on the computer being used to display the McIDAS-X session.

For example, a McIDAS-X session consisting of 2000 frames at 960 x 1280 pixels each, with a total of 10% of the frames' content covered by graphics command output, will require approximately 4.9 GB (2000 x 960 x 1280 x 2) of shared memory (a subset of system memory) on the workstation running the session. The computer that is being used to display the McIDAS-X session will require approximately 9.8 GB of system memory for X11. If the workstation running the session is also the display machine, the total system memory requirement will be about 15 GB.


Now go to the section below that applies to your configuration and complete its instructions.

Linux Workstations

Read the five sections below and complete the tasks that apply to your configuration.

Checking for Required Packages

On Linux systems, the libX11-devel, libXt-devel, libXpm-devel, libXext-devel, ncurses and ncurses-devel packages must be installed in order for McIDAS-X to build successfully. You can run the command below as user root to check for the packages and install them if they are not already present.

Type:   yum install libX11-devel libXt-devel libXpm-devel libXext-devel ncurses ncurses-devel

If the compilation fails due to a missing library or header file, you can run the command below (where "file" is a regular expression identifying the missing library or header file enclosed in quotes, e.g., "*/Intrinsic.h") as user root to have yum report the required package name.

Type:   yum whatprovides "file"

Then run this command to install the required package:   yum install package

Enabling Inter-Process Communication

On Linux systems, the system administrator should use the command ipcs to verify that your workstation configuration has Inter-Process Communication (IPC) enabled in the system kernel. If IPC is not running, rebuild your system kernel with all IPC functions enabled.

Allocating Sufficient Shared Memory

McIDAS-X uses shared memory for frame allocation. On some operating systems, the shared memory facility is activated by default and has a sufficient maximum segment size for most McIDAS-X sessions. However, this is not always true for Linux systems. Therefore, on Linux systems the system administrator must complete the steps below to check and, if necessary, force the kernel to activate the shared memory system at boot time and set the maximum segment size to 512 MB or greater the first time McIDAS-X is installed on a Linux workstation. Note: The 4.9 GB of shared memory in the A Note About Memory example above does not have to be allocated in one large block. Shared memory is made up of multiple segments, whose minimum size is determined by the system memory requirement of one frame.

  1. Edit the file /etc/sysctl.conf.
  2. Check for lines similar to the two below. If the lines do not exist then add them to the end of the file. If the lines exist and are set to the value below (536870912) or greater you can leave them as is. If the lines exist but are set to a smaller value, change the values to those below.

    kernel.shmmax = 536870912
    kernel.shmall = 536870912
  3. Run the following command from the Unix prompt.

    Type:  /sbin/sysctl -p

Every time the machine reboots, the shared memory segment size will be set to the value above.

Allocating Sufficient Swap Space

If your system has less than the sum of the memory requirements described in the A Note About Memory section above plus overhead for the OS and other programs, you may experience slower performance as memory is swapped to disk. This is normal behavior and can be alleviated by adding additional physical memory. If both memory and swap are exhausted, the kernel will kill your user processes, including any McIDAS-X tasks, and log you out. More swap space can be added by modifying your filesystem configuration or by creating a new swap file of the desired size. See the Swap Space chapter of the Red Hat Enterprise Linux Storage Administration Guide for more information.

Increasing the Stack Size

Some Linux operating systems have hard and soft limits on the stack size that are too small for large local grids. This results in commands like GRDDISP giving an Error: Unix system stack size on server machine insufficient for grib decoding message when trying to display those grids. If this occurs you will need to increase the stack size limits by editing the /etc/security/limits.conf file and adding the lines below.

* hard stack 20480
* soft stack 20480


macOS Workstations

Read the section below and complete the tasks as instructed.

Allocating Sufficient Shared Memory

McIDAS-X uses shared memory for frame allocation. On some operating systems, the shared memory facility is activated by default and has a sufficient maximum segment size for most McIDAS-X sessions. However, this is not always true for macOS systems. Therefore, on macOS systems the system administrator must complete the steps below to check and, if necessary, force the kernel to activate the shared memory system at boot time and set the maximum segment size to 512 MB or greater the first time McIDAS-X is installed on a macOS workstation. Note: The 4.9 GB of shared memory in the A Note About Memory example above does not have to be allocated in one large block. Shared memory is made up of multiple segments, whose minimum size is determined by the system memory requirement of one frame.

  1. As user root, create the launchctl startup script /Library/LaunchDaemons/edu.wisc.ssec.sharedMemory.plist with the content below.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>edu.wisc.ssec.sharedMemory</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/sbin/sysctl</string>
    <string>-w</string>
    <string>kern.sysv.shmmax=536870912</string>
    <string>kern.sysv.shmall=131072</string>
    <string>kern.sysv.shmmin=1</string>
    <string>kern.sysv.shmmni=128</string>
    <string>kern.sysv.shmseg=32</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>

    Note the relationship between shmall and shmmax. shmall is the number of pages (4k in size) and shmmax=shmall*4096. The example values above allow shared memory to be addressed in 512 MB segments.

  2. As user root, load the new .plist file created in step 1.

    Type:   launchctl load /Library/LaunchDaemons/edu.wisc.ssec.sharedMemory.plist

  3. Reboot the workstation.

NOTE: If you previously allocated shared memory on your OS X/macOS workstation using the procedure documented in version 2017.1 or earlier of this manual, you must remove those changes so they don't conflict with the new settings above. (The previous procedure was valid for OS X versions 10.11 and earlier that were supported on those versions of McIDAS-X. Starting with version 2017.2, McIDAS-X is supported on OS X/macOS versions 10.11 and later, which use the new procedure in steps 1 through 3 above for allocating shared memory.)

To remove the previous settings so they don't conflict with the new ones, first check whether file /etc/sysctl.conf exists. If it does, and if it contains five kern.sysv.shm* lines like those in the example below, remove them from the file.

kern.sysv.shmmax=536870912
kern.sysv.shmmin=1
kern.sysv.shmmni=128
kern.sysv.shmseg=32
kern.sysv.shmall=131072

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]