Logical Names (Equivalences)

Most sites set up their machines so that they all have uniform mountpoints and view of the filee ystems. A common scheme is to place all user home directories under a single parent directory, often called /home. The actual file system is mounted using automount, and the physical file system is located by an NIS map.

Unlike some other batch/network computing systems, Accelerator does not require that all the compute machines have a uniform set of mountpoints. Accelerator can use what are called logical names or equivalences, to locate the data.

The default equiv.tcl file which is shipped with the software defines a logical name for the path to VOVDIR.

The equiv.tcl file in some versions also defines a logical name HOMES for whatever the parent of your home directory as set in the environment variable HOME. The default one shipped with an early version did not, so we will show the steps to define a logical name using the browser-based setup.
Note: When doing the exercises, remember to give these commands from a shell where you have set the environment variable NC_QUEUE to the name of your training tutorial queue. Otherwise, you will need to use the -queue option.

Define a Logical HOME Directory Name

  1. Use the browser-based setup to view the logical names that are defined. First, find the URL of the queue's server, and connect a web browser to it.
    % nc cmd vovbrowser --> http://host:port/project
    % firefox http://host:port/cgi/setup.cgi
    The initial page will have a link on the left called FileSystems.
  2. Left-click on this link to display the logical names defined for the queue.
    You will see VOVDIR and VNCSWD.
  3. Run a job in your home directory.
    % cd
    % nc run sleep 10

    This will often run, because the default is to require the architecture from which the job was submitted as a resource, so the job may run on your machine.

  4. Now try the job, but request an architecture different from the machine on which you are working. This job will fail, because the directory on the remote machine does not have a logical name.
    % nc run -r linux64 -e BASE pwd
    Resources= linux64 Env	= BASE
    Command = vw vwrap pwd
    Logfile = vnc_logs/20030108/143125.27906 JobId	= 00000021
    vnc: message: Scheduled jobs: 1	Total estimated time: 0s
    
    % nc list
    00000011 Done	sleep 10
    00000021 Failed pwd
    % nc info -l 21
    
    Log file is: '${VNCSWD}/vncjohn.swd/vnc_logs/20030108/143125.27906'
    vnc: message: File ${VNCSWD}/vncjohn.swd/vnc_logs/20030108/143125.27906 does not exist (yet)
        (mapped to /usr2/home/john/ncadmin/vncjohn.swd/vnc_logs/20030108/143125.27906)
  5. Run the job in the /tmp directory.
    /tmp exists on all UNIX machines, but is not usually exported to the network.
    % cd /tmp
    % nc run sleep 10
    This fails, because /tmp is not a network path.
    % nc run sleep 10
    
    WARNING:
       The path to the current directory is not 'LOGICAL',
       i.e.	it does not begin with a '$' sign. 
    EXPLANATION:
       The current directory
       /tmp
       may not be a valid directory path for all hosts in the network.
    OPTIONS:
       (1)   Continue.
             By choosing this option, you assert that the path
             is valid everywhere. If it is not, the job is likely to fail, 
             because the remote host cannot reach the current directory.
             This option causes the creation of a flag file called .vnc which has the 
             purpose of avoiding the repetition of this question for this directory and 
             its subdirectories
        (2)  Abort.
             Please ask your NetworkComputer administrator to change the equiv.tcl file to 
             define the rules that give a logical name to the current directory.

    If you respond 2, the job will not be submitted.

    If you respond 1, a file named .vnc will be created in the directory, and the job will be submitted. In the future, you will not receive the warning so long as the .vnc file exists.

    The Altair Accelerator software internally uses logical names to refer to files.

Advanced Commands

  1. Resource the cache file.
    ls ~/ncadmin/vncjohn.swd/equiv.caches 
    cayman pluto
    cayman abbcanova@cayman DEFAULT+SUPPORT html/ftnctraining > cat !$/pluto
    cat ~/ncadmin/vncjohn.swd/equiv.caches/pluto 
    VOVDIR /remote/release/VOV/7.0u2/linux64
    VOVDIR /remote/release/VOV/7.0u2/linux64/../common
  2. Run the vovequiv command.
    % vovequiv -p . # show the logical name for this directory