Skip to content

doru1004/omptests

Folders and files

NameName
Last commit message
Last commit date
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Mar 24, 2022
Sep 5, 2018
Sep 5, 2018
Mar 24, 2022
Jul 23, 2018
Mar 24, 2022
Jul 24, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Nov 10, 2020
Nov 29, 2021
Oct 28, 2021
Jul 23, 2018
Oct 28, 2021
Nov 10, 2020
Oct 28, 2021
Nov 10, 2020
Jan 9, 2019
Jul 23, 2018
Aug 30, 2023
Jul 23, 2018
Apr 22, 2019
Jan 9, 2019
Jul 23, 2018
Jan 9, 2019
Jul 27, 2018
Jul 23, 2018
Jul 23, 2018
Mar 24, 2022
Sep 5, 2018
Jan 9, 2019
Aug 30, 2023
Mar 24, 2022
Jul 23, 2018
Jul 23, 2018
Nov 29, 2021
Jul 23, 2018
Mar 24, 2022
Jul 19, 2019
Mar 24, 2022
Aug 30, 2023
May 1, 2021
May 1, 2021
Nov 29, 2021
Jul 19, 2019
Aug 30, 2023
Jan 9, 2019
Jul 24, 2018
Jan 9, 2019
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 27, 2018
Jul 27, 2018
Mar 24, 2022
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Dec 1, 2020
Jul 1, 2019
Jul 23, 2018
Mar 24, 2022
Mar 24, 2022
Mar 24, 2022
Jul 11, 2019
Jul 27, 2018
Aug 30, 2023
Aug 30, 2023
Aug 30, 2023
Jul 23, 2018
Aug 30, 2023
Aug 30, 2023
Mar 24, 2022
Jul 23, 2018
Oct 28, 2021
Mar 24, 2022
Jul 23, 2018
Jul 23, 2018
Mar 24, 2022
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018
May 1, 2021
Aug 30, 2023
Aug 30, 2023
Jul 23, 2018
Mar 24, 2022
Mar 24, 2022
Jul 23, 2018
Jul 23, 2018
Dec 1, 2020
Dec 1, 2020
Mar 24, 2022
Jul 1, 2019
Mar 24, 2022
Jul 1, 2019
Mar 24, 2022
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Nov 10, 2020
Nov 29, 2021
Oct 28, 2021
Jul 1, 2019
Oct 28, 2021
Nov 10, 2020
Oct 28, 2021
Nov 10, 2020
Jul 1, 2019
Jul 1, 2019
Aug 30, 2023
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Aug 30, 2023
Mar 24, 2022
Jul 1, 2019
Jul 1, 2019
Aug 30, 2023
Mar 24, 2022
Jul 1, 2019
Jul 1, 2019
Nov 29, 2021
Jul 1, 2019
Mar 24, 2022
Jul 1, 2019
May 1, 2021
Jul 1, 2019
Nov 29, 2021
Jul 19, 2019
Aug 30, 2023
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Mar 24, 2022
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Dec 1, 2020
Jul 1, 2019
Jul 1, 2019
Mar 24, 2022
Mar 24, 2022
Mar 24, 2022
Jul 1, 2019
Jul 1, 2019
Aug 30, 2023
Aug 30, 2023
Aug 30, 2023
Aug 30, 2023
Aug 30, 2023
Oct 28, 2021
Jul 1, 2019
Oct 28, 2021
Mar 24, 2022
Jul 1, 2019
Jul 1, 2019
Mar 24, 2022
Jul 1, 2019
Aug 30, 2023
Aug 30, 2023
Mar 24, 2022
Jul 1, 2019
Dec 1, 2020
Dec 1, 2020
Jul 23, 2018
Aug 30, 2023
Jul 23, 2018
Feb 5, 2019
Dec 13, 2021
Jul 23, 2018
Jul 23, 2018
Mar 24, 2022
Jan 15, 2019
May 1, 2021
Jul 23, 2018
Apr 15, 2020
Jul 23, 2018
Aug 23, 2023
Aug 23, 2023
Aug 23, 2023
Jul 23, 2018
Jul 23, 2018
Jul 23, 2018

Repository files navigation

###########################
 clang-coral C/C++ README 
###########################

This file provides a basic description and instructions on how to use the clang-coral C/C++ compiler and runtime libraries and execute applications built with it.

#######################################
 Selecting the right compiler package.
#######################################

We provide packages for different operating system flavors, CUDA versions, and GPU compute capabilities. We also include an x86_64 package. The names of the packages aim at being self-explanatory. E.g.

clang-coral-0.2-pwr8-rhel7.2-cuda7.5-sm3.7.tar.bz2

...refers to a power 8 (pwr8) architecture, RedHat 7.2 OS, version 7.5 of the CUDA toolkit, and is prepared to generated binaries for GPU whose CUDA compute capability is 3.7.

We currently have two distinct versions of the compiler:

0.1 - refers to the compiler implementation based on the github port that had the first clang OpenMP support.
0.2 - refers to the compiler that is based on the latest (or a few days old) upstream clang and is the one that is currently being actively developed.

##################
 Package contents
##################

bin - contains all the clang and llvm tools, including the compiler main driver: clang and clang++

include - contains the clang and llvm header files useful if using clang and llvm as a library. It also contains the LLVM official C++ standard library header files.

lib - contains that clang and llvm libraries as well as the LLVM official C++ standard library.

omprtl - contains the omp.h include file.
omprtl/lib - contains the OpenMP runtime libraries.

tests - contains a set of tests that the current implementation was tested with. To run the tests, run 'make' in this folder.

########################
 Define the environment
########################

The compiler has to be able to locate the OpenMP include files and libraries. Therefore, a few environment variables are recommended to be set:

C_INCLUDE_PATH=<package location>/omprtl
CPLUS_INCLUDE_PATH=<package location>/omprtl
LIBRARY_PATH=<package location>/omprtl/lib
LD_LIBRARY_PATH=<package location>/omprtl/lib:/usr/local/cuda/lib64

Alternatively the user can explicitly define the library and include path by using the -I and -L compiler options.

#####################
 Using the compiler
#####################

To use the compiler the user should select the right driver for C (clang) or C++ (clang++).

To compile code with OpenMP support:

> clang -fopenmp a.c -o a.bin

To compile code with OpenMP support including NVIDIA GPU offload support:

> clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda a.c -o a.bin

Note that the CUDA compute capability is not required to be specified, as the compiler is only prepared to deal with the single compute capability specified in the package name.

Separate compilation is supported as long as no static libraries are used. The compiler is not prepared to look for host and device code in static libraries. Dynamic libraries are supported.

By the default the system gcc C++ standard library is used by clang, unless the user explicitly request the LLVM C++ standard library. To use the LLVM C++ library one can use:

> clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -stdlib=libc++ -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc  a.c -o a.bin

###########################
 Executing the application
###########################

As long as the right environment is defined, namely LD_LIBRARY_PATH pointing to <package location>/omprtl/lib:/usr/local/cuda/lib64, the binary generated by the compiler can be executed as usually:

> ./a.bin

or by using the user favorite dispatching tools.

If the user desires to use the LLVM C++ standard library, <package location>/lib should also be present in LD_LIBRARY_PATH.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published