ERROR

Invalid LUN (KLOC)

Last Published: April 25, 2020

Error Message

Starting Arctools or a custom AML application causes the following error: "Invalid LUN (KLOC)"

Cause

There is not enough swap space (virtual memory) allocated on the system.

The AML processor has built in file caching capabilities. The file cache is an area of reserved memory where AML can quickly access AML and MENU files, especially if they are called repeatedly. Before executing an AML or MENU file, the AML processor loads it into the cache. LUN stands for 'Logical Unit Number', and is a pointer the AML processor uses to access certain lines of certain files in the cache. If a large application with many AML and MENU files are running and there is a limited amount of swap space available, the AML processor may try to load more files into the AML cache than it can hold. The AML processor may then attempt to access a file that it expects is present in the cache. If the LUN has a value greater than the number of files in the cache and is trying to access a file that doesn't exist, and execution is halted. The FORTRAN subroutine 'KLOC' is responsible for locating line numbers in a cached file. KLOC stands for 'cache-locate'.

Solution or Workaround

The amount of memory available for the cache is related to the amount of swap space allocated and therefore increasing the swap space is most often the solution to this problem. If the message is still encountered after increasing the swap space, try breaking up the application so that smaller amounts are processed at a time. For example, try to reduce long or nested loops, or try running the application for shorter periods. If possible, clear the cache by quitting ARC/INFO between executions.

For help in setting up or adding swap space on the system, ask your System Administrator or refer to the related articles below.

Article ID:000006812

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic