#%Module1.0
# Copyright (c) Intel Corporation
# SPDX-License-Identifier: MIT
# https://opensource.org/licenses/MIT

# This modulefile requires Environment Modules 4.1 or later.

set min_tcl_ver 8.4
if { $tcl_version < $min_tcl_ver } {
    puts stderr " "
    puts stderr "ERROR: This modulefile requires tcl $min_tcl_ver or greater."
    puts stderr "Your system reports that tclsh version $tcl_version is installed."
    exit 1
}

set script_path "[file normalize [exec readlink -f ${ModulesCurrentModulefile}]]"
set modulefile_name "[file tail [file dirname $script_path]]"
module-whatis "Intel(R) VTune(TM) Profiler 2025.0.1"
proc ModulesHelp { } {
    global modulefilename
global "2025.0.1"
}

set PRODUCT_INSTALL_DIR "[file dirname [file dirname $script_path]]"
set BIN_DIR ""

if { "Darwin" == [uname sysname] } {
set BIN_DIR
} elseif { "x86_64" == [uname machine] } {
set BIN_DIR bin64
} else {
set BIN_DIR bin32
}

prepend-path PATH "${PRODUCT_INSTALL_DIR}/${BIN_DIR}"
setenv VTUNE_PROFILER_2025_DIR "$PRODUCT_INSTALL_DIR"

setenv VTUNE_PROFILER_DIR "$PRODUCT_INSTALL_DIR"
