On Libra and Big Red at IU, how do I compile my C, Fortran, or Java programs?
You can compile programs written in C, Fortran, or Java on Libra and Big Red at Indiana University, as shown below. See the home pages for Libra and Big Red for more information about available compilers, libraries, and other tools.
Fortran 77 programs
To compile the Fortran 77 program simple.f,
use the following command:
C programs
To compile the C program simple.c,
use the following command:
Java programs
To compile the Java program simple.java,
use the following command:
After you compile your program, you could use
serialjob to run it as follows:
Alternatively, you could use a LoadLeveler script to submit batch jobs. For more information, see Getting started on Big Red.
This document was developed with support from the National Science Foundation (NSF) under Grant No. 0503697 to the University of Chicago and subcontracted to Indiana University. Additional support was provided by IU through its participation in the TeraGrid, which is supported by the NSF under Grants No. 0833618, SCI451237, SCI535258, and SCI504075. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.
Also see:
- On Big Red, Libra, or Quarry, how do I link to a library?
- On Libra, how do I compile an OpenMP program?
- On IU's research systems, how do I compile my C or Fortran programs using GNU compilers?
Last modified on June 10, 2008.






