gcc

Note

SCARF is migrating to the SLURM batch system, instructions on this page which refer to LSF commands, parameters or configuration do not apply to SLURM. Please see our SLURM page for more information.

RHEL7 Modules:

GCC/10.2.0.lua
GCC/10.3.0.lua
GCC/11.3.0.lua
GCC/12.2.0.lua
GCC/6.3.0-2.27.lua
GCC/6.4.0-2.28.lua
gcc/7.2.0
GCC/7.2.0-2.29.lua
GCC/7.3.0-2.30.lua
GCC/7.4.0-2.31.1.lua
gcc/8.1.0
GCC/8.1.0-2.30.lua
GCC/8.2.0-2.31.1.lua
GCC/8.3.0.lua
GCC/9.2.0-2.32.lua
GCC/9.3.0.lua
GCC/9.4.0.lua
GCCcore/5.4.0.lua
GCCcore/6.3.0.lua
GCCcore/6.4.0.lua
GCCcore/7.3.0.lua
GCCcore/8.2.0.lua
gcccuda/2019a.lua
gcccuda/2019b.lua

Description for gcc:

The collection of GNU compilers. SCARF already has a version of gcc available without loading any modules. This module provides alternative versions, if required.

Using gcc:

Please run launch an interactive session:

$srun --pty bash -i

And then,

$ module load gcc/4.8.2

This will load gcc binaries to your path.

$ which gcc
/apps/gcc/4.8.2/bin/gcc

Here is a classis hello world example for GCC:

#include <stdio.h>

int main ()
{
  printf ("Hello World!\n");
}

To compile:

gcc -o helloworld -ansi helloworld.c

Assuming the file name is ‘helloworld.c’

$ ./helloworld
Hello World!

There is also GCC version 4.4.7 installed via rpm. With no modules loaded:

$ which gcc
/usr/bin/gcc
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Documentation for gcc:

https://gcc.gnu.org/onlinedocs/