1#%Module1.0################################################################### 2# 3# Copyright (c) 2020-2023 Intel Corporation 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17# This modulefile requires Environment Modules 4.1 or later. 18# Type `module --version` to determine the current installed version. 19 20############################################################################## 21 22set min_tcl_ver 8.4 23if { $tcl_version < $min_tcl_ver } { 24 puts stderr " " 25 puts stderr "ERROR: This modulefile requires tcl $min_tcl_ver or greater." 26 puts stderr "Your system reports that tclsh version $tcl_version is installed." 27 exit 1 28} 29 30# if modulefile script name is a symlink, resolve it to get the fully 31# qualified pathname that points to the actual modulefile script 32# see: https://wiki.tcl-lang.org/page/file+normalize 33set scriptpath "${ModulesCurrentModulefile}" 34set scriptpath "[file dirname [file normalize "$scriptpath/___"]]" 35 36# define componentroot, modulefilepath, modulefilename and modulefilever 37set modulefilename "[file tail [file dirname "${scriptpath}"]]" 38set modulefilever "[file tail "${scriptpath}"]" 39set modulefilepath "${scriptpath}" 40set componentroot "[file dirname [file dirname [file dirname [file dirname "${scriptpath}"]]]]" 41 42############################################################################## 43 44module-whatis "Name: Intel(R) oneAPI Threading Building Blocks" 45module-whatis "Version: $modulefilename/$modulefilever" 46module-whatis "Description: Flexible threading library for adding parallelism to complex applications across accelerated architectures." 47module-whatis "URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html" 48module-whatis "Dependencies: none" 49 50proc ModulesHelp { } { 51 global modulefilename 52 global modulefilever 53 module whatis "${modulefilename}/${modulefilever}" 54} 55 56############################################################################## 57 58# Define environment variables needed for an isolated component install. 59 60set tbbroot "$componentroot" 61set tbb_target_arch "intel64" 62 63setenv TBBROOT "$tbbroot" 64 65prepend-path CPATH "$tbbroot/include" 66prepend-path LIBRARY_PATH "$tbbroot/lib" 67prepend-path LD_LIBRARY_PATH "$tbbroot/lib" 68prepend-path CMAKE_PREFIX_PATH "$tbbroot" 69prepend-path PKG_CONFIG_PATH "$tbbroot/lib/pkgconfig" 70