NAGWareCompiler: Difference between revisions

From UMIACS
Jump to navigation Jump to search
No edit summary
No edit summary
Line 23: Line 23:
  [jlent@opensub00 jlent]$ ./hello  
  [jlent@opensub00 jlent]$ ./hello  
   Hello World!
   Hello World!
==See Also==
* [http://www.nag.com/nagware/np/doc_index.asp NAG Compiler Documentation Index]
* [http://www.nag.com/nagware/np.asp NAG Compiler Product Page]

Revision as of 14:43, 20 June 2014


The NAGWare Fortran compiler is available under /opt/common/NAGWare_f95* on our supported RHEL6/RHEL7/Ubuntu hosts, and /opt/NAGWare_f95* on our supported RHEL5 hosts. You can either load the binaries into your environment with the GNU Modules we created, reference the paths directly, else add them to your PATH.

Example use of the compiler

Here is a very basic example compilation and execution of Hello World using the NAGWare fortran compiler. This example will use the GNU Module we setup to quickly load the binaries into your environment.

First, in a working directory, create a file hello.f95 with the following contents:

PRINT *, "Hello World!" 
END

Then, load the NAGWare modules into your environment and verify that the compiler is in your path (libraries, MANpages, and license server information will be loaded as well):

[jlent@opensub00 jlent]$ module load nagware
[jlent@opensub00 jlent]$ which f95
/opt/common/NAGWare_f95-5.1/bin/f95

Compile and then run the program:

[jlent@opensub00 jlent]$ f95 -o hello hello.f95 
[jlent@opensub00 jlent]$ ./hello 
 Hello World!

See Also