Skip to content

Commit

Permalink
Merge pull request #33 from DimaSaz/upd-cmake/ccl
Browse files Browse the repository at this point in the history
Update cmake/ccl
  • Loading branch information
ykiryano authored Nov 6, 2020
2 parents 1dbc150 + 0e6b2af commit 7490aa7
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions cmake/ccl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
## Intel(R) oneAPI Collective Communications Library modulefile
##

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
}

# get full pathname for this script file
set scriptpath "${ModulesCurrentModulefile}"

Expand Down Expand Up @@ -44,39 +36,24 @@ set oneapiroot "[file dirname "$componentroot"]"

# On load print component name and version being loaded
if { [ module-info mode load ] } {
puts stderr "Loading $modulefilename version $modulefilever"
puts stderr "Loading $modulefilename"
}

# On remove print component name and version being removed
if { [ module-info mode ] == "unload" || [ module-info mode ] == "remove" } {
puts stderr "Removing $modulefilename version $modulefilever"
puts stderr "Removing $modulefilename"
}


# ###### Component Specific env vars setup ###################################

module-whatis "Intel(R) oneAPI Collective Communications Library"

set ccl_conf "cpu_gpu_dpcpp"

if { [info exists ::env(CCL_CONFIGURATION) ] } {
switch "$::env(CCL_CONFIGURATION)" {
"cpu_gpu_dpcpp" -
"cpu_icc" {
set ccl_conf "$::env(CCL_CONFIGURATION)"
}
default {
}
}
}

set topdir "$componentroot/$modulefilever"

setenv CCL_ROOT "$topdir"
setenv CCL_CONFIGURATION "$ccl_conf"
setenv CCL_ATL_TRANSPORT_PATH "$topdir/lib/$ccl_conf"

prepend-path LD_LIBRARY_PATH "$topdir/lib/$ccl_conf"
prepend-path LIBRARY_PATH "$topdir/lib/$ccl_conf"
prepend-path CPATH "$topdir/include/$ccl_conf"
setenv CCL_ATL_TRANSPORT_PATH "$topdir/lib"

prepend-path LD_LIBRARY_PATH "$topdir/lib"
prepend-path LIBRARY_PATH "$topdir/lib"
prepend-path CPATH "$topdir/include"

0 comments on commit 7490aa7

Please sign in to comment.