Using the GNU Fortran 90/95 Compiler on Mace01
- Version 4.1.2 GNU compilers is installed on Mace01.
- Code may be compiled on the login node, but aside from 'very' short test runs (e.g., one minute), executables must always be run by submitting to the batch system. SGE.
No special configuration is necessary to use the GNU Fortran 90/95 compiler. To compile a source file hello.f90 into an executable binary, hello, enter
gfortran hello.f90 -o hello
Submitting an Executable to the Batch System SGE
To submit the executable binary hello to the batch system, first create a qsub script (by using your favourite editor) like this
#!/bin/bash #$ -S /bin/bash #$ -cwd #$ -q serial.q ./hello
and then, assuming your save the above script as hello.qsub, send the job to SGE by entering
prompt> qsub hello.qsub