Compare commits
10 Commits
fec4ddf6ab
...
5d3820631a
Author | SHA1 | Date | |
---|---|---|---|
5d3820631a | |||
9c8a077828 | |||
fce556cb28 | |||
37ce5ef391 | |||
|
3b21a32d83 | ||
c4d5135fde | |||
3f2b9a766b | |||
|
3ed644b88f | ||
|
8ceaddfea7 | ||
2a953d811c |
18
overlay.nix
18
overlay.nix
@ -13,10 +13,9 @@ let
|
|||||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||||
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nanos6; };
|
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nanos6; };
|
||||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; };
|
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
||||||
clangOmpss2OpenmpNodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; clangOmpss2Unwrapped = final.clangOmpss2OpenmpUnwrapped; };
|
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
||||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||||
clangOmpss2OpenmpUnwrapped = final.clangOmpss2Unwrapped.override { enableNosv = true; };
|
|
||||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||||
@ -31,6 +30,8 @@ let
|
|||||||
#nix-wrap = callPackage ./pkgs/nix-wrap/default.nix { };
|
#nix-wrap = callPackage ./pkgs/nix-wrap/default.nix { };
|
||||||
nodes = callPackage ./pkgs/nodes/default.nix { };
|
nodes = callPackage ./pkgs/nodes/default.nix { };
|
||||||
nosv = callPackage ./pkgs/nosv/default.nix { };
|
nosv = callPackage ./pkgs/nosv/default.nix { };
|
||||||
|
openmp = callPackage ./pkgs/llvm-ompss2/openmp.nix { monorepoSrc = final.clangOmpss2Unwrapped.src; version = final.clangOmpss2Unwrapped.version; };
|
||||||
|
openmpv = final.openmp.override { enableNosv = true; enableOvni = true; };
|
||||||
osumb = callPackage ./pkgs/osu/default.nix { };
|
osumb = callPackage ./pkgs/osu/default.nix { };
|
||||||
ovni = callPackage ./pkgs/ovni/default.nix { };
|
ovni = callPackage ./pkgs/ovni/default.nix { };
|
||||||
ovniGit = final.ovni.override { useGit = true; };
|
ovniGit = final.ovni.override { useGit = true; };
|
||||||
@ -41,7 +42,7 @@ let
|
|||||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2OpenmpNodes = final.stdenv.override { cc = final.clangOmpss2OpenmpNodes; allowedRequisites = null; };
|
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||||
@ -76,10 +77,13 @@ in bscPkgs // {
|
|||||||
stdenv = final.stdenvClangOmpss2Nodes;
|
stdenv = final.stdenvClangOmpss2Nodes;
|
||||||
};
|
};
|
||||||
clangNosvOpenmp-task = callPackage ./test/compilers/clang-openmp.nix {
|
clangNosvOpenmp-task = callPackage ./test/compilers/clang-openmp.nix {
|
||||||
stdenv = final.stdenvClangOmpss2OpenmpNodes;
|
stdenv = final.stdenvClangOmpss2Nodes;
|
||||||
};
|
};
|
||||||
clangNosvOpenmp-nosv = callPackage ./test/compilers/clang-openmp-nosv.nix {
|
clangNosvOmpv-nosv = callPackage ./test/compilers/clang-openmp-nosv.nix {
|
||||||
stdenv = final.stdenvClangOmpss2OpenmpNodes;
|
stdenv = final.stdenvClangOmpss2NodesOmpv;
|
||||||
|
};
|
||||||
|
clangNosvOmpv-ld = callPackage ./test/compilers/clang-openmp-ld.nix {
|
||||||
|
stdenv = final.stdenvClangOmpss2NodesOmpv;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
, elfutils
|
, elfutils
|
||||||
, libffi
|
, libffi
|
||||||
, zlib
|
, zlib
|
||||||
, nosv
|
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, gcc # needed to set the rpath of libstdc++ for clang-tblgen
|
, gcc # needed to set the rpath of libstdc++ for clang-tblgen
|
||||||
, enableDebug ? false
|
, enableDebug ? false
|
||||||
, enableNosv ? false
|
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git"
|
, gitUrl ? "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
@ -25,12 +23,12 @@ let
|
|||||||
stdenv = llvmPackages_latest.stdenv;
|
stdenv = llvmPackages_latest.stdenv;
|
||||||
|
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "2023.11";
|
version = "18.0.0-ompss-2";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-pm";
|
owner = "bsc-pm";
|
||||||
repo = "llvm";
|
repo = "llvm";
|
||||||
rev = "refs/tags/github-release-${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-XLYS401BixGw3Ke/JKuikVKvbA92ENCdUvYLyZX9UtI=";
|
hash = "sha256-Z0TVrujOQNHiAuTlyexbIBA2pOk2Tdmv7JuQn3M3foY=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -73,8 +71,6 @@ in stdenv.mkDerivation rec {
|
|||||||
pkg-config
|
pkg-config
|
||||||
zlib
|
zlib
|
||||||
gcc.cc.lib # Required for libstdc++.so.6
|
gcc.cc.lib # Required for libstdc++.so.6
|
||||||
] ++ lib.optionals enableNosv [
|
|
||||||
nosv
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Error with -D_FORTIFY_SOURCE=2, see https://bugs.gentoo.org/636604:
|
# Error with -D_FORTIFY_SOURCE=2, see https://bugs.gentoo.org/636604:
|
||||||
@ -107,27 +103,19 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
|
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
|
||||||
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,--gdb-index"
|
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,--gdb-index"
|
||||||
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
|
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
|
||||||
"-DLLVM_ENABLE_PROJECTS=clang;openmp;compiler-rt;lld"
|
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld"
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=ON"
|
"-DLLVM_ENABLE_ASSERTIONS=ON"
|
||||||
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
||||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||||
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
||||||
"-DLLVM_ENABLE_LIBXML2=OFF"
|
"-DLLVM_ENABLE_LIBXML2=OFF"
|
||||||
'' + (lib.optionalString enableNosv ''
|
|
||||||
"-DCLANG_DEFAULT_NOSV_HOME=${nosv}"
|
|
||||||
'') + ''
|
|
||||||
# Set the rpath to include external libraries (zlib) both on build and
|
# Set the rpath to include external libraries (zlib) both on build and
|
||||||
# install
|
# install
|
||||||
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
||||||
"-DCMAKE_INSTALL_RPATH=${zlib}/lib:${gcc.cc.lib}/lib"
|
"-DCMAKE_INSTALL_RPATH=${zlib}/lib:${gcc.cc.lib}/lib"
|
||||||
|
"-DLLVM_APPEND_VC_REV=ON"
|
||||||
|
"-DLLVM_FORCE_VC_REVISION=${source.version}"
|
||||||
)
|
)
|
||||||
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Remove support for GNU and Intel Openmp
|
|
||||||
postInstall = ''
|
|
||||||
rm -f $out/lib/libgomp*
|
|
||||||
rm -f $out/lib/libiomp*
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# About "-DCLANG_DEFAULT_NANOS6_HOME=${nanos6}", we could specify a default
|
# About "-DCLANG_DEFAULT_NANOS6_HOME=${nanos6}", we could specify a default
|
||||||
|
@ -3,15 +3,24 @@
|
|||||||
, lib
|
, lib
|
||||||
, gcc
|
, gcc
|
||||||
, clangOmpss2Unwrapped
|
, clangOmpss2Unwrapped
|
||||||
|
, openmp ? null
|
||||||
, wrapCCWith
|
, wrapCCWith
|
||||||
, llvmPackages_latest
|
, llvmPackages_latest
|
||||||
, ompss2rt ? null
|
, ompss2rt ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
||||||
|
sameNosv = openmp.nosv == ompss2rt.nosv;
|
||||||
|
in
|
||||||
|
|
||||||
|
assert lib.assertMsg (usingNodesAndOmpv -> sameNosv) "OpenMP-V and NODES must share the same nOS-V";
|
||||||
|
|
||||||
let
|
let
|
||||||
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
||||||
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
||||||
|
ompname = if openmp.pname == "openmp-v" then "libompv" else "libomp";
|
||||||
|
|
||||||
|
|
||||||
# We need to replace the lld linker from bintools with our linker just built,
|
# We need to replace the lld linker from bintools with our linker just built,
|
||||||
# otherwise we run into incompatibility issues when mixing compiler and linker
|
# otherwise we run into incompatibility issues when mixing compiler and linker
|
||||||
@ -27,6 +36,8 @@ let
|
|||||||
cc = clangOmpss2Unwrapped;
|
cc = clangOmpss2Unwrapped;
|
||||||
in wrapCCWith {
|
in wrapCCWith {
|
||||||
inherit cc bintools;
|
inherit cc bintools;
|
||||||
|
# extraPackages adds packages to depsTargetTargetPropagated
|
||||||
|
extraPackages = lib.optional (openmp != null) openmp;
|
||||||
extraBuildCommands = ''
|
extraBuildCommands = ''
|
||||||
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
||||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||||
@ -43,6 +54,9 @@ in wrapCCWith {
|
|||||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
wrap clang++ $wrapper $ccPath/clang++
|
wrap clang++ $wrapper $ccPath/clang++
|
||||||
|
|
||||||
|
'' + lib.optionalString (openmp != null) ''
|
||||||
|
echo "export OPENMP_RUNTIME=${ompname}" >> $out/nix-support/cc-wrapper-hook
|
||||||
'' + lib.optionalString (ompss2rt != null) ''
|
'' + lib.optionalString (ompss2rt != null) ''
|
||||||
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
||||||
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||||
|
75
pkgs/llvm-ompss2/openmp.nix
Normal file
75
pkgs/llvm-ompss2/openmp.nix
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
{ lib
|
||||||
|
, llvmPackages_latest
|
||||||
|
, monorepoSrc
|
||||||
|
, runCommand
|
||||||
|
, cmake
|
||||||
|
, ninja
|
||||||
|
, llvm
|
||||||
|
, perl
|
||||||
|
, pkg-config
|
||||||
|
, version
|
||||||
|
, nosv
|
||||||
|
, ovni
|
||||||
|
, enableNosv ? false
|
||||||
|
, enableDebug ? false
|
||||||
|
, enableOvni ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert enableOvni -> enableNosv;
|
||||||
|
|
||||||
|
let
|
||||||
|
stdenv = llvmPackages_latest.stdenv;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "openmp" + (lib.optionalString enableNosv "-v");
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = runCommand "${pname}-src" {} ''
|
||||||
|
mkdir -p "$out"
|
||||||
|
cp -r ${monorepoSrc}/cmake "$out"
|
||||||
|
cp -r ${monorepoSrc}/openmp "$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
sourceRoot = "${src.name}/openmp";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
perl
|
||||||
|
pkg-config
|
||||||
|
] ++ lib.optionals enableNosv [
|
||||||
|
nosv
|
||||||
|
] ++ lib.optionals enableOvni [
|
||||||
|
ovni
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
|
cmakeBuildType = if enableDebug then "Debug" else "Release";
|
||||||
|
|
||||||
|
dontStrip = enableDebug;
|
||||||
|
|
||||||
|
separateDebugInfo = true;
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DLIBOMP_OMPD_SUPPORT=OFF"
|
||||||
|
"-DOPENMP_ENABLE_LIBOMPTARGET=OFF"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Remove support for GNU and Intel Openmp.
|
||||||
|
# Also, remove libomp if building with nosv, as there is no support to build
|
||||||
|
# only one runtime at a time.
|
||||||
|
postInstall = ''
|
||||||
|
rm -f $out/lib/libgomp*
|
||||||
|
rm -f $out/lib/libiomp*
|
||||||
|
'' + lib.optionalString enableNosv ''
|
||||||
|
rm -f $out/lib/libomp.*
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit nosv;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
32
pkgs/nanos6/0001-Add-missing-cstdint-include.patch
Normal file
32
pkgs/nanos6/0001-Add-missing-cstdint-include.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 6fc5bef066ac011d6b15a7c090f4498b0b730818 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
|
||||||
|
Date: Fri, 12 Apr 2024 14:44:43 +0200
|
||||||
|
Subject: [PATCH] Add missing cstdint include
|
||||||
|
|
||||||
|
---
|
||||||
|
src/dependencies/DataTrackingSupport.hpp | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/dependencies/DataTrackingSupport.hpp b/src/dependencies/DataTrackingSupport.hpp
|
||||||
|
index 56226085..cdfd5e1c 100644
|
||||||
|
--- a/src/dependencies/DataTrackingSupport.hpp
|
||||||
|
+++ b/src/dependencies/DataTrackingSupport.hpp
|
||||||
|
@@ -1,13 +1,14 @@
|
||||||
|
/*
|
||||||
|
This file is part of Nanos6 and is licensed under the terms contained in the COPYING file.
|
||||||
|
|
||||||
|
- Copyright (C) 2020 Barcelona Supercomputing Center (BSC)
|
||||||
|
+ Copyright (C) 2020-2024 Barcelona Supercomputing Center (BSC)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DATA_TRACKING_SUPPORT_HPP
|
||||||
|
#define DATA_TRACKING_SUPPORT_HPP
|
||||||
|
|
||||||
|
#include "support/config/ConfigVariable.hpp"
|
||||||
|
+#include <cstdint>
|
||||||
|
|
||||||
|
class Task;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.44.0
|
||||||
|
|
@ -35,6 +35,10 @@ let
|
|||||||
rev = "version-${version}";
|
rev = "version-${version}";
|
||||||
hash = "sha256-o2j7xNufdjcWykbwDDHQYxYCs4kpyQvJnuFyeXYZULw=";
|
hash = "sha256-o2j7xNufdjcWykbwDDHQYxYCs4kpyQvJnuFyeXYZULw=";
|
||||||
};
|
};
|
||||||
|
patches = [
|
||||||
|
# https://pm.bsc.es/gitlab/nanos6/nanos6/-/issues/185
|
||||||
|
./0001-Add-missing-cstdint-include.patch
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
git = rec {
|
git = rec {
|
||||||
@ -48,9 +52,8 @@ let
|
|||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (source // rec {
|
||||||
pname = "nanos6";
|
pname = "nanos6";
|
||||||
inherit (source) src version;
|
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
patchShebangs scripts/generate_config.sh
|
patchShebangs scripts/generate_config.sh
|
||||||
@ -114,4 +117,4 @@ in
|
|||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
@ -84,6 +84,6 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
nosv = nosv;
|
inherit nosv;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
, paraverKernel
|
, paraverKernel
|
||||||
, openssl
|
, openssl
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
|
, wrapGAppsHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -48,6 +49,10 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-openssl=${openssl.dev}"
|
"--with-openssl=${openssl.dev}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
boost
|
boost
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, automake
|
, automake
|
||||||
, autoconf
|
, autoconf
|
||||||
@ -9,12 +10,18 @@
|
|||||||
, mpi
|
, mpi
|
||||||
, gcc
|
, gcc
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
|
, enableOvni ? true
|
||||||
|
, ovni ? null
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "ssh://git@bscpm03.bsc.es/interoperability/tampi.git"
|
, gitUrl ? "ssh://git@bscpm03.bsc.es/interoperability/tampi.git"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
, gitCommit ? "16f92094ca6da25e2f561c000f5fbc2901944f7b"
|
, gitCommit ? "16f92094ca6da25e2f561c000f5fbc2901944f7b"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
assert enableOvni -> (ovni != null);
|
||||||
|
|
||||||
let
|
let
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "3.0";
|
version = "3.0";
|
||||||
@ -48,7 +55,8 @@ in stdenv.mkDerivation rec {
|
|||||||
boost
|
boost
|
||||||
mpi
|
mpi
|
||||||
gcc
|
gcc
|
||||||
];
|
] ++ optional (enableOvni) ovni;
|
||||||
|
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
}
|
}
|
||||||
|
46
test/compilers/clang-openmp-ld.nix
Normal file
46
test/compilers/clang-openmp-ld.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, writeText
|
||||||
|
, openmp
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
hello_c = writeText "hello.c" ''
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#pragma omp parallel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
pname = "openmp-test-ld";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
# nOS-V requires access to /sys/devices to request NUMA information. It will
|
||||||
|
# fail to run otherwise, so we disable the sandbox for this test.
|
||||||
|
__noChroot = true;
|
||||||
|
|
||||||
|
buildInputs = [ openmp ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cp ${hello_c} hello.c
|
||||||
|
clang -fopenmp=libompv ./hello.c -o hello
|
||||||
|
|
||||||
|
set +x
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user