Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

ARCHIVED: At IU, how do I access the NAG library on Libra?

NAG (Numerical Algorithms Group) is a collection of Fortran subroutine libraries. NAG Mark 18 is available on the Libra Cluster at Indiana University.

Note: UITS will retire Libra in spring 2009. Accounts are available on Quarry, a general-purpose Unix computing environment. For more, see ARCHIVED: About the Libra retirement.

Accessing the NAG library from Libra

  1. To access the library, at the system prompt, enter: xlf -o program -lnag program.f program < data.d > output

    Replace program, program.f, and data.d with your own parameters. For example, to compile and link your command file called nagjob1.f and your data file called nagjob1.d and store the output as nagjob1.out, at the system prompt, enter:

    xlf -o nagjob -lnag nagjob1.f nagjob < nagjob1.d > nagjob1.out

    If the data file is embedded within the program, you can omit the datafile parameter.

  2. You must submit CPU-intensive jobs (requiring more than 20 minutes of CPU time) to IBM's LoadLeveler batch queuing system. Two classes of queues are available for NAG jobs on Libra. Class A is for jobs requiring up to 24 hours of CPU time, and Class B is for jobs requiring more than 24 hours of CPU time.

    To submit a NAG job to LoadLeveler, create a script file (e.g., nagwork) with the following lines:

    #@ initialdir = /'directory' #@ error = 'nagjob.err' #@ class = a #@ queue xlf -o myjob -lnag myjob.f myjob < datafile > outputfile

    Replace directory with the directory where the command file is stored, inputfile with the name of the NAG command file, datafile with the name of the data file, and outputfile with an appropriate name to store the output. The error/log file will be stored in the same directory in a file named nagjob.err.

    Note: The line class = a is for jobs that require up to 24 hours of CPU time. If your job is going to require more than 24 hours of CPU time, replace class = a with class = b .

  3. To submit the job, at the system prompt, enter: llsubmit nagwork

    The output files will be stored in the directory specified in the script file. You may log out after submitting the job.

Help files

NAG help is an extensive online help system that defaults to use your workstation window system (X Window System or compatible). A number of files with general information regarding NAG Mark 18 (e.g., user notes, news, a summary of all the routines) are stored in the directory /libapps/naglib18/flib618da/doc/. The user notes contain detailed information on how to access the different NAG libraries. The /nag/examples/ directory contains a source directory and a data directory with sample programs and corresponding data files. You may view, copy, or print files from any of the above directories.

To access NAG online help, at the system prompt, enter naghelp .

For help on a specific topic, you can enter either of the following commands at the system prompt:

naghelp topic naghelp -tscript filename topic

Replace topic with the topic for which you want help; you do not have to supply a topic. If you specify the -tscript option, a transcript of the session (if enabled during the session) is written to the specified file.

NAG documentation is available for reference at the Swain, Business/SPEA, and Education Libraries and at the UITS Stat/Math Center. You can also order documents through the bookstore in IMU M074.

Note: For more details about the NAG and other subroutine libraries (including information about how to compile, link to, and run programs that invoke them), see the IU High Performance Applications subroutine library page.

For a list of research software available on UITS research computing systems, see:

This is document afcb in domain all.
Last modified on June 30, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.