Skip to content

FindOpenMP: option for Cray Clang-based Compilers

This is related to discussion on discourse.

The new family of cray compilers is clang based and the openmp option is... well that depend.

From the documentation of their compiler/wrapper:

17:23:25 [alainm@login5 ~]#CC --version
Cray clang version 15.0.1  (971f0d58a66a088d800599498fccd8fe4c470226)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cray/pe/cce/15.0.1/cce-clang/x86_64/share/../bin
17:26:55 [alainm@login5 ~]# CC --craype-help
[...]
OpenMP support:
   -homp		Enables OpenMP and links in OpenMP libraries when
			possible using CCE-Classic.
			(This is the default.)

   -hnoomp		Disables OpenMP and links in non-OpenMP libraries
			when using CCE-classic.

   -fopenmp		Enables OpenMP and links in OpenMP libraries when
			possible using CCE, AOCC, and GNU.

   -openmp		Enables OpenMP and links in OpenMP libraries when
			possible.

   -noopenmp		Disables OpenMP.

   -mp			Enables OpenMP and links in OpenMP libraries when
			possible using PGI.

   -Mnoopenmp		Disables OpenMP and links in non-OpenMP libraries
			when using PGI.

   -qopenmp		Enables OpenMP and links in OpenMP libraries when
			possible when using Intel.

   -qno-openmp		Disables OpenMP and links in non-OpenMP libraries when
			possible when using Intel.

17:27:30 [alainm@login5 ~]#

So I suspect -openmp could be considered the right choice that will forward automagically the right options to their backend compiler. Or one could consider CCE as the "main" Cray backend and go with -fopenmp.

Cheers

Edited by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information