Indiana University
University Information Technology Services
  
What are archived documents?

On Libra, how do I link a Fortran job to IMSL and execute it?

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

Define variables

Before compiling, linking, and running a Fortran program under IMSL on the Libra Cluster, you must define several environment variables, as follows:

  • If you are using csh, enter the following at the Unix system prompt: source /software/libapps/imsl50/imsl.csh
  • If you are using ksh or bash, enter the following at the Unix system prompt: . /software/libapps/imsl50/imsl.sh

You can add these lines to your .login file (for csh users) or .profile file (for ksh/bash users) to automatically activate the environment variables every time you log in.

Compile and link

To compile and link a program under IMSL, at the Unix prompt, enter:

$F90 $F90FLAGS -o filename filename.f $LINK_F90

Replace filename.f with the name of your Fortran command file, and replace filename with the name you want your compiled and linked version of the program to be.

Note: If your Fortran code is in fixed source form format, then before you execute the command shown above, append -qfixed after $LINK_F90. Otherwise the -qfree flag (used for free-form formatted code) defined, by default, in $F90FLAGS might result in many error messages.

Run

To execute the program, at the Unix prompt, enter:

./filename

The executable program is written to the file filename. The environment variables $F90, $F90FLAGS, and $LINK_F90 are defined in the imsl30.csh and imsl30.ksh files.

Sample program

The IMSL installation on Libra comes bundled with an example program. To try it, enter:

$F90 $F90FLAGS -o imslmp /software/libapps/imsl50/CTT5.0/examples/rs6000/f90/validate/imslmp.f $LINK_F90 ./imslmp

The expected output is explained in /software/libapps/imsl50/CTT5.0/examples/rs6000/f90/validate/README.

Note: For more details about the IMSL, 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:

Also see:

This is document behz in domain all.
Last modified on October 30, 2008.
Please tell us, did you find the answer to your question?