add libfuse, libfabric, ucx, mpich (#579)
* update autoconf * update leptonica * add libxnvctrl * add libfuse * add libfabric * add ucx * add mpichpull/580/head
parent
5ff67da583
commit
d09cd552c3
9 changed files with 187 additions and 7 deletions
@ -0,0 +1,27 @@ |
||||
package("libfabric") |
||||
|
||||
set_homepage("https://ofiwg.github.io/libfabric/") |
||||
set_description("Open Fabric Interfaces") |
||||
set_license("BSD-2-Clause") |
||||
|
||||
add_urls("https://github.com/ofiwg/libfabric/releases/download/v$(version)/libfabric-$(version).tar.bz2") |
||||
add_versions("1.13.0", "0c68264ae18de5c31857724c754023351614330bd61a50b40cef2b5e8f63ab28") |
||||
|
||||
if is_plat("linux") then |
||||
add_syslinks("pthread", "dl", "rt") |
||||
add_extsources("apt::libfabric-dev") |
||||
end |
||||
|
||||
on_install("macosx", "linux", function (package) |
||||
local configs = {} |
||||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||
if package:config("pic") ~= false then |
||||
table.insert(configs, "--with-pic") |
||||
end |
||||
import("package.tools.autoconf").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("fi_getinfo", {includes = "rdma/fabric.h"})) |
||||
end) |
@ -0,0 +1,24 @@ |
||||
package("libfuse") |
||||
|
||||
set_homepage("https://github.com/libfuse/libfuse") |
||||
set_description("FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the Linux kernel.") |
||||
set_license("GPL-2.0") |
||||
|
||||
add_urls("https://github.com/libfuse/libfuse/releases/download/fuse-$(version)/fuse-$(version).tar.xz") |
||||
add_versions("3.10.4", "9365b74fd8471caecdb3cc5adf25a821f70a931317ee9103d15bd39089e3590d") |
||||
|
||||
if is_plat("linux") then |
||||
add_extsources("apt::fuse3") |
||||
add_syslinks("pthread", "dl", "rt") |
||||
end |
||||
|
||||
add_deps("meson") |
||||
on_install("linux", function (package) |
||||
local configs = {"-Dtests=false", "-Dexamples=false", "-Dutils=false"} |
||||
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) |
||||
import("package.tools.meson").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("fuse_version", {configs = {defines = {"FUSE_USE_VERSION=30"}}, includes = "fuse3/fuse.h"})) |
||||
end) |
@ -0,0 +1,40 @@ |
||||
package("libxnvctrl") |
||||
|
||||
set_homepage("https://www.nvidia.com/en-us/drivers/unix/") |
||||
set_description("NVIDIA driver control panel") |
||||
|
||||
if is_plat("linux") then |
||||
add_extsources("apt::libxnvctrl-dev") |
||||
end |
||||
|
||||
on_fetch("linux", function (package, opt) |
||||
if opt.system then |
||||
import("lib.detect.find_path") |
||||
import("lib.detect.find_library") |
||||
|
||||
-- init search paths |
||||
local paths = { |
||||
"/usr" |
||||
} |
||||
|
||||
-- find library |
||||
local result = {links = {}, linkdirs = {}, includedirs = {}} |
||||
local arch = package:is_arch("x86_64") and "x86_64" or "x86" |
||||
local archsuffix = arch .. "-linux-gnu" |
||||
local linkinfo = find_library("XNVCtrl", paths, {suffixes = {"lib", path.join("lib", archsuffix)}}) |
||||
if linkinfo then |
||||
table.insert(result.linkdirs, linkinfo.linkdir) |
||||
table.insert(result.links, "XNVCtrl") |
||||
end |
||||
result.linkdirs = table.unique(result.linkdirs) |
||||
|
||||
-- find headers |
||||
local path = find_path("NVCtrl/NVCtrl.h", paths, {suffixes = "include"}) |
||||
if path then |
||||
table.insert(result.includedirs, path) |
||||
end |
||||
if #result.includedirs > 0 and #result.linkdirs > 0 then |
||||
return result |
||||
end |
||||
end |
||||
end) |
@ -0,0 +1,48 @@ |
||||
package("mpich") |
||||
|
||||
set_homepage("https://www.mpich.org/") |
||||
set_description("MPICH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard.") |
||||
|
||||
add_urls("http://www.mpich.org/static/downloads/$(version)/mpich-$(version).tar.gz") |
||||
add_versions("3.4.2", "5c19bea8b84e8d74cca5f047e82b147ff3fba096144270e3911ad623d6c587bf") |
||||
|
||||
add_configs("device", {description = "Specify the communication device for MPICH.", default = "ofi", type = "string", values = {"ofi", "ucx"}}) |
||||
add_configs("x11", {description = "Use the X Window System.", default = false, type = "boolean"}) |
||||
|
||||
if is_plat("linux") then |
||||
add_extsources("apt::libmpich-dev") |
||||
add_syslinks("pthread", "dl", "rt") |
||||
end |
||||
|
||||
add_deps("hwloc") |
||||
on_load("macosx", "linux", function (package) |
||||
if package:config("x11") then |
||||
package:add("deps", "libx11") |
||||
package:add("deps", "libxnvctrl", {system = true, optional = true}) |
||||
end |
||||
end) |
||||
|
||||
on_install("macosx", "linux", function (package) |
||||
local configs = {"--disable-fortran", |
||||
"--without-slurm", |
||||
"--without-xpmem", |
||||
"--without-hcoll", |
||||
"--without-blcr", |
||||
"--without-papi", |
||||
"--without-pmix"} |
||||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||
if package:config("pic") ~= false then |
||||
table.insert(configs, "--with-pic") |
||||
end |
||||
table.insert(configs, "--with-device=ch4:" .. package:config("device")) |
||||
table.insert(configs, "--with-hwloc-prefix=" .. package:dep("hwloc"):installdir()) |
||||
table.insert(configs, "--with-x=" .. (package:config("x11") and "yes" or "no")) |
||||
import("package.tools.autoconf").install(package, configs) |
||||
package:addenv("PATH", "bin") |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
os.vrun("mpicc --version") |
||||
assert(package:has_cfuncs("MPI_Init", {includes = "mpi.h"})) |
||||
end) |
@ -0,0 +1,31 @@ |
||||
package("ucx") |
||||
|
||||
set_homepage("https://openucx.org/") |
||||
set_description("Unified Communication X") |
||||
set_license("BSD-3-Clause") |
||||
|
||||
add_urls("https://github.com/openucx/ucx/releases/download/v$(version)/ucx-$(version).tar.gz") |
||||
add_versions("1.11.0", "b7189b69fe0e16e3c03784ef674e45687a9c520750bd74a45125c460ede37647") |
||||
|
||||
add_configs("cuda", {description = "Enable CUDA support.", default = false, type = "boolean"}) |
||||
|
||||
on_load("linux", function (package) |
||||
if package:config("cuda") then |
||||
package:add("deps", "cuda") |
||||
end |
||||
end) |
||||
|
||||
on_install("linux", function (package) |
||||
local configs = {"--disable-doxygen-doc", "--without-java", "--without-rte", "--without-fuse3", "--without-gdrcopy", "--without-rdmacm", "--without-knem", "--without-xpmem", "--without-ugni"} |
||||
if package:config("cuda") then |
||||
local cuda = package:dep("cuda"):fetch() |
||||
table.insert(configs, "--with-cuda=" .. path.directory(cuda.sysincludedirs[1])) |
||||
else |
||||
table.insert(configs, "--without-cuda") |
||||
end |
||||
import("package.tools.autoconf").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("ucp_get_version_string", {includes = "ucp/api/ucp.h"})) |
||||
end) |
Loading…
Reference in new issue