Add OmpSs-2 test with tasks
This commit is contained in:
parent
84623ea9d0
commit
bf28263cc5
@ -327,6 +327,9 @@ let
|
||||
compilers.clangOmpss2.lto = compilers.lto.override {
|
||||
stdenv = bsc.stdenvClangOmpss2;
|
||||
};
|
||||
compilers.clangOmpss2.task = callPackage ./test/compilers/ompss2.nix {
|
||||
stdenv = bsc.stdenvClangOmpss2;
|
||||
};
|
||||
};
|
||||
|
||||
testAll = with bsc.test; [
|
||||
@ -336,6 +339,7 @@ let
|
||||
compilers.intel2023.icc.cpp
|
||||
compilers.intel2023.ifort
|
||||
compilers.clangOmpss2.lto
|
||||
compilers.clangOmpss2.task
|
||||
];
|
||||
|
||||
ci = import ./test/ci.nix {
|
||||
|
43
test/compilers/ompss2.nix
Normal file
43
test/compilers/ompss2.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ stdenv, writeText, which, strace }:
|
||||
|
||||
let
|
||||
task_c = writeText "task.c" ''
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
for (int i = 0; i < 10; i++) {
|
||||
#pragma oss task
|
||||
printf("Hello world!\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
'';
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "task_c";
|
||||
src = task_c;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
hardeningDisable = [ "all" ];
|
||||
NIX_DEBUG = 1;
|
||||
buildPhase = ''
|
||||
set -x
|
||||
echo CC=$CC
|
||||
$CC -v
|
||||
|
||||
cp ${task_c} task.c
|
||||
cat task.c
|
||||
$CC -v -fompss-2 task.c -o task
|
||||
./task
|
||||
|
||||
set +x
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
touch $out
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user