LLVM-Clang

Description

From the Clang website: The goal of the Clang project is to create a new C based language front-end: C, C++, Objective C/C++, OpenCL C and others for the LLVM compiler.

Version

  • 4.0.1

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster

Modules

LLVM-Clang requires the following module file to run:

  • apps/llvm/4.0.1

Using LLVM/Clang on CIRCE/SC

Once you add the module above, you can either invoke the Clang compiler by typing:

[user@itn0 ~]$ clang helloworld.c -o helloworld

 

Jobs Longer than 30 Minutes in Length

To run Clang compiling jobs on CIRCE/SC, users will need to submit their jobs to the scheduling environment if their jobs take more than 30 minutes to run on a standard PC.

If, for example, you have a Clang source code file named clang-test.c, you would set up a submit script to use like this:

  • The script below (for testing, name it “clang-test.sh”) can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue.
#!/bin/bash 
#SBATCH --job-name=clang-test 
#SBATCH --time=01:00:00 
#SBATCH --nodes=2 
#SBATCH --ntasks-per-node=4 
#SBATCH --mem-per-cpu=2048 
#SBATCH --output=clang-test.%j.txt 


module purge 
module add apps/llvm/4.0.1 

clang clang-test.c -o clang-test

 
Next, verify that you are in your job’s directory, and run the sbatch command to submit the job:

[user@itn0 ~]$ cd my/jobdir
[user@itn0 jobdir]$ sbatch ./clang-test.sh

 
This will submit a 2 node, 8 total cpu core job with 2 GB of memory per core and a 1 hour job time.

Documentation

Home Page, User Guides, and Manuals

Reporting Bugs

Report bugs with LLVM-Clang to the IT Help Desk: rc-help@usf.edu