Modulesfile environment file?

Hi,
did anyone hack together a modules file?

Brgds,
Tor

Hi Tor,
Welcome. When you say a modules file can you let us know what you are trying to do and what you mean by that?
Thanks,
Rod

Module environment as in Environment Modules — Modules 4.7.1+25-gdb74c4c documentation

Created one that seems to work. Any other variables that need to be included?

$ cat /cm/shared/modulefiles/computecpp/ce/2.5.0
#%Module

ComputeCPP Sycl compiler 2.5.0

set version 2.5.0

proc ModulesHelp { } {
puts stderr “\tSets up the environment for ComputeCpp Community Edition (CE) $version SYCL compiler \n”
puts stderr “\theterogeneous parallel programming platform that provides a conformant implementation of SYCL™ 1.2.1 Khronos specification. \n”
}

module-whatis "ComputeCPP is a SYCL compiler complient with Khronos 1.2.1 specifications. "
module-whatis "https://developer.codeplay.com/products/computecpp/ce/download "
module-whatis “Docs: $ firefox file:///cm/shared/apps/computecpp/ce/2.5.0/doc/api_pages/index.html &”

setenv ComputeCpp_DIR /cm/shared/apps/computecpp/ce/$version
setenv COMPUTECPP_ROOT /cm/shared/apps/computecpp/ce/$version
setenv COMPUTECPP_INCDIR /cm/shared/apps/computecpp/ce/$version/include
setenv COMPUTECPP_INCLUDEDIR /cm/shared/apps/computecpp/ce/$version/include
setenv COMPUTECPP_LIBDIR /cm/shared/apps/computecpp/ce/$version/lib
setenv COMPUTECPP_LIBRARYDIR /cm/shared/apps/computecpp/ce/$version/lib
prepend-path PATH /cm/shared/apps/computecpp/ce/$version/bin
prepend-path C_INCLUDE_PATH /cm/shared/apps/computecpp/ce/$version/include
prepend-path CPLUS_INCLUDE_PATH /cm/shared/apps/computecpp/ce/$version/include
prepend-path LIBRARY_PATH /cm/shared/apps/computecpp/ce/$version/lib
prepend-path LD_LIBRARY_PATH /cm/shared/apps/computecpp/ce/$version/lib
prepend-path PKG_CONFIG_PATH /cm/shared/apps/computecpp/ce/$version/lib/pkgconfig
prepend-path INFOPATH /cm/shared/apps/computecpp/ce/$version/doc/api_pages

set MSG “ComputeCPP CE $version (ComputeCpp-CE-2.5.0-aarch64-linux-gnu)”

Added COMPUTECPP_PACKAGE_ROOT_DIR for cmake.

Thank you. I’ve not seen that before but it looks like a useful set of information. I’ll ask the team if there is anything else that could be included there.

Module environment is very common in HPC systems to allow for clean install of many versions of compilers, tools and frameworks/SDKs. There are 2 variants of it. Environment modules and lmod. I use the former. Maybe you should include a section on it in your documentation? I would much appreciate feedback from you if I have left something out. Maybe OPENCL_VENDOR_PATH?

For instance, I notice that on a pure aarch64 node (Cavium Tx2 CN9980) without GPGPU I get

torel@n005:~$ module load computecpp/ce/2.5.0
torel@n005:~$ computecpp_info


ComputeCpp Info (CE 2.5.0 2021/04/23)

SYCL 1.2.1 revision 3


Device Info:

Cannot find any devices on the system. Please refer to your OpenCL vendor documentation.
Note that OPENCL_VENDOR_PATH is not defined. Some vendors may require this environment variable to be set.
torel@n005:~$

ARM computers don’t generally ship with a CPU OpenCL implementation (I don’t think ARM even provides such a thing). That seems to be the case here - so there’s nothing to run your code.

OpenCL with ARM NEON (without Mali GPU) available? - Stack Overflow this link seems to indicate that this is still true - though it is 5 years old, I haven’t heard anything to suggest the situation’s changed.

True. Will be adding some GPUs to the arm64 nodes now that Nvidia supports Cuda on aarch64 as well as nvhpc compiler. Must be ready for Grace. I suppose it will be exported. Will computecpp work with Nvidia offload engine?

torel@n005:~$ du -a /cm/shared/apps/computecpp/ce/2.5.0 | grep -i nvptx
22372 /cm/shared/apps/computecpp/ce/2.5.0/lib/ComputeCppTargets/nvptx64–nvidiacl.bc

ComputeCpp support for Nvidia devices is no longer officially supported. I would point you towards the work we are doing to add Nvidia device support to DPC++ however.

To add to it. Installed 2.11.0, and on aarch64 (Ubuntu 18.04.6LTS) with A40 GPU:

torel@n009:/cm/shared/apps/computecpp/ce/2.11.0$ uname -ar
Linux n009 5.4.0-148-generic #165~18.04.1-Ubuntu SMP Thu Apr 20 01:13:55 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
torel@n009:/cm/shared/apps/computecpp/ce/2.11.0$ cd
torel@n009:~$ module load computecpp/ce/2.11.0
torel@n009:~$ computecpp_info 
********************************************************************************

ComputeCpp Info (CE 2.11.0 2022/08/08)

SYCL 1.2.1 revision 3

********************************************************************************


Device Info:

Discovered 1 devices matching:
  platform    : <any>
  device type : <any>

--------------------------------------------------------------------------------
Device 0:

  Device is supported                     : UNTESTED - Untested OS
  Bitcode targets                         : spirv64 ptx64 
  CL_DEVICE_NAME                          : NVIDIA A40
  CL_DEVICE_VENDOR                        : NVIDIA Corporation
  CL_DRIVER_VERSION                       : 510.85.02
  CL_DEVICE_TYPE                          : CL_DEVICE_TYPE_GPU 

If you encounter problems when using any of these OpenCL devices, please consult
this website for known issues:
https://developer.codeplay.com/products/computecpp/ce/guides/platform-support?version=2.11.0

********************************************************************************

torel@n009:~$ compute
compute          compute++        compute-cl       computecpp_info  
torel@n009:~$ compute-cl --version
Codeplay ComputeCpp - CE 2.11.0 Device Compiler - clang version 8.0.0  (based on LLVM 8.0.0svn)
Target: aarch64-pc-windows-msvc
Thread model: posix
InstalledDir: /cm/shared/apps/computecpp/ce/2.11.0/bin
torel@n009:~$ 

Windows?