How to invoke Rnmrtk

  1. -- Locate the Toolkit executable programs

    In order to use the Toolkit you have to know where the programs reside on your computer. Once you know where they are located, the easiest way to use the Toolkit is to add the name of the directory they reside in to your PATH environment variable.
    For example, on vp3 the Toolkit resides in /usr3/rnmrtk/rnmrtk.v3/exe. Once you have added the directory name to your PATH, you invoke the Toolkit and its ancillary tools simply by typing their names, e.g., rnmrtk.

    
    [29] setenv PATH ${PATH}:/usr3/rnmrtk/rnmrtk.v3/exe
    [30] printenv PATH
    :/usr/bsd:/usr/bin:/bin:/usr3/rnmrtk/rnmrtk.v3/exe
  2. -- Create a shared memory section

    The Toolkit needs a "scratch pad" to store the data while it carries out computations. It uses something called a shared memory section to do this. Shared memory resides in the virtual address space of the computer; if there is lots of random access memory available, it will usually reside there, but when there is not enough memory, parts of the shared memory section may by written out to the disk, in an area reserved for use by the operating system called swap space. Shared memory is just that: it can be shared by more than one program at a time. For example, you could run rnmrtk in one window, and run Seepln or Contour in another window to display the results processing by Rnmrtk. It is also possible to have more than one window running Rnmrtk connected to the same shared memory section; usually this is not a good idea, since it easy to get into conflicts.

    Whenever Rnmrtk or one of the other programs is invoked, it will tell you if there are other programs attached to the same shared memory section. One additional feature of shared memory sections is worth noting: they are not permanent -- the data they contain will not be saved unless you explicitly tell Rnmrtk to save it for you. Shared memory sections are destroyed whenever the system re-boots, but otherwise they linger. They occupy system resources (memory or swap space) even when they are not being used, so it is always good etiquette to remove shared memory sections when you are finished using them.

    Before creating a shared memory section, you first need to know how much space you will need. The amount is determined by the size of the spectrum you want to compute. The program used to create a shared memory section, called Section (appropriately enough) prompts you for the size of the spectrum in each dimension. You should give it large enough numbers so that the spectrum will not grow larger than the space available during the data processing steps, but no larger than necessary. For example, if you want to generate a 2048 by 4096 hypercomplex two-dimensional spectrum, you would invoke section and give respond with 2048 4096 4 to the prompt. The program multiplies the sizes of the dimensions together to determine the size of the shared memory section. Once it has created the section, it asks you if you want to remove it. If you are happy with the size, say no.

    
    [31] section
    Current NMR UID: hoch      2101 (0x0835)
    
    Found 1 NMR shared memory sections
     UID: fezoui    2105 (0x0839)   Attached: 2    Size: 131073 pages
    Did not find your shared memory section: No such file or directory
    Enter the dimensions (real points): 2048 4096 4
    Created your NMR shared memory section.
    Section size = 262145 pages.
    
    Attached at address 600000.
    Detached from the shared memory section.
    Remove the shared memory section? n
    All done.

    Section is also used to remove existing shared memory sections. If you already have an active section, it will simply ask you if you want to remove it.

    
    [32] section
    Current NMR UID: hoch      2101 (0x0835)
    
    Found 2 NMR shared memory sections
     UID: hoch      2101 (0x0835)   Attached: 0    Size: 262145 pages
     UID: fezoui    2105 (0x0839)   Attached: 2    Size: 131073 pages
    Found your NMR shared memory section.
    Section size = 262145 pages.
    
    Attached at address 600000.
    Detached from the shared memory section.
    Remove the shared memory section? y
    Removal was successful.
    All done.
  3. -- Invoke Rnmrtk

    Start Rnmrtk by typing its name; it responds with the prompt

    
    [33] rnmrtk
    RNMRTK> 

    If the shared memory section deosn't exist, it complains and quits:

    
    [34] rnmrtk
    Could not find shared memory section.

    If you see this message you need to go back to Step 2.

  4. -- Load the data, process it, and plot it!
  5. -- Don't forget to remove the shared memory section when you are done!


Last modified August 30, 1996