From e6c1b1df932880befb1c5b12fbd7c44a082a1ab0 Mon Sep 17 00:00:00 2001 From: Colin Thomas Date: Fri, 15 Nov 2024 12:57:25 -0500 Subject: [PATCH 1/5] attempt to build and test c api --- test-vine-task-throughput-capi.sh | 11 +++++++ test-vine-task-throughput.c | 50 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 test-vine-task-throughput-capi.sh create mode 100644 test-vine-task-throughput.c diff --git a/test-vine-task-throughput-capi.sh b/test-vine-task-throughput-capi.sh new file mode 100644 index 0000000..848b443 --- /dev/null +++ b/test-vine-task-throughput-capi.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Build the sources from github +. ./install-github.sh + +# Compile C API test using environment +$GCC test-vine-task-throughput.c -o test-vine-task-throughput -I $PREFIX/include/cctools/ -L $PREFIX/lib -ltaskvine -ldttools -lm -lcrypto -lssl -lz + +./test-vine-task-throughput & + +vine_worker localhost 9123 --single-shot diff --git a/test-vine-task-throughput.c b/test-vine-task-throughput.c new file mode 100644 index 0000000..e32646f --- /dev/null +++ b/test-vine-task-throughput.c @@ -0,0 +1,50 @@ +#include "taskvine.h" + +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + struct vine_manager *m; + struct vine_task *t; + int i; + int tasksC = 5000; + + //Create the manager. All tasks and files will be declared with respect to + m = vine_create(9129); + if(!m) { + printf("couldn't create manager: %s\n", strerror(errno)); + return 1; + } + printf("TaskVine listening on %d\n", vine_port(m)); + printf("Declaring tasks..."); + + for(i=0;i Date: Fri, 15 Nov 2024 13:01:16 -0500 Subject: [PATCH 2/5] edit yml file --- .github/workflows/daily.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 8824256..82f71cd 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -78,6 +78,15 @@ jobs: - name: Test Vine Serverless Mode run: ./test-vine-serverless.sh + vine-throughput-capi-job: + runs-on: ubuntu-20.04 + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Test Vine Throughput Test C API + run: ./test-vine-throughput-capi.sh + parrot-cvmfs-job: runs-on: ubuntu-20.04 timeout-minutes: 10 From 9516be240cb2226602c3b137c981ba1fc263257e Mon Sep 17 00:00:00 2001 From: Colin Thomas Date: Fri, 15 Nov 2024 13:02:12 -0500 Subject: [PATCH 3/5] fix typo --- .github/workflows/daily.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 82f71cd..eb91315 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -85,7 +85,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Test Vine Throughput Test C API - run: ./test-vine-throughput-capi.sh + run: ./test-vine-task-throughput-capi.sh parrot-cvmfs-job: runs-on: ubuntu-20.04 From f383d6f37d7335f579f0594625554bbbf3d2f030 Mon Sep 17 00:00:00 2001 From: Colin Thomas Date: Fri, 15 Nov 2024 13:03:07 -0500 Subject: [PATCH 4/5] fix permission --- test-vine-task-throughput-capi.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test-vine-task-throughput-capi.sh diff --git a/test-vine-task-throughput-capi.sh b/test-vine-task-throughput-capi.sh old mode 100644 new mode 100755 From 97803c15dc9bd1aa2a25560a3deed066eacb3e5d Mon Sep 17 00:00:00 2001 From: Colin Thomas Date: Fri, 15 Nov 2024 14:20:00 -0500 Subject: [PATCH 5/5] use default gcc --- test-vine-task-throughput-capi.sh | 2 +- test-vine-task-throughput.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test-vine-task-throughput-capi.sh b/test-vine-task-throughput-capi.sh index 848b443..ad5d868 100755 --- a/test-vine-task-throughput-capi.sh +++ b/test-vine-task-throughput-capi.sh @@ -4,7 +4,7 @@ . ./install-github.sh # Compile C API test using environment -$GCC test-vine-task-throughput.c -o test-vine-task-throughput -I $PREFIX/include/cctools/ -L $PREFIX/lib -ltaskvine -ldttools -lm -lcrypto -lssl -lz +gcc test-vine-task-throughput.c -o test-vine-task-throughput -I $PREFIX/include/cctools/ -L $PREFIX/lib -ltaskvine -ldttools -lm -lcrypto -lssl -lz ./test-vine-task-throughput & diff --git a/test-vine-task-throughput.c b/test-vine-task-throughput.c index e32646f..ee2c8cd 100644 --- a/test-vine-task-throughput.c +++ b/test-vine-task-throughput.c @@ -15,7 +15,7 @@ int main(int argc, char *argv[]) int tasksC = 5000; //Create the manager. All tasks and files will be declared with respect to - m = vine_create(9129); + m = vine_create(9123); if(!m) { printf("couldn't create manager: %s\n", strerror(errno)); return 1;