From a167eab1cabfae0dc5fe4b57cce02acc8873b081 Mon Sep 17 00:00:00 2001 From: user <user@debian.vm> Date: Thu, 28 Nov 2024 09:04:00 -0600 Subject: [PATCH] moved script and better dockerfiles --- launch-test.sh | 50 ++++++++++++++++++++++++++------------------- make_result | 1 + mpi4/Dockerfile | 5 ++++- mpi5/Dockerfile | 2 +- scripts/build.sh | 7 +++++++ scripts/check.sh | 8 ++++++++ scripts/ci.sh | 11 ++++++++++ scripts/run-test.sh | 11 ++++++++++ 8 files changed, 72 insertions(+), 23 deletions(-) create mode 100644 make_result create mode 100644 scripts/build.sh create mode 100644 scripts/check.sh create mode 100644 scripts/ci.sh create mode 100755 scripts/run-test.sh diff --git a/launch-test.sh b/launch-test.sh index e98b735..0175333 100755 --- a/launch-test.sh +++ b/launch-test.sh @@ -1,23 +1,25 @@ #get fist param, help, check, build -p=${1-unset} +p=${1-'unset'} g=${2-unset} #print help HELP (){ - echo "usage: ./launch-test <config> <action> [type] [path]"; - echo "config: "; - echo "\t all : launch on all available configs"; - echo "\t config name : launch on this particular docker config (a folder with that name containing a dockerfile must exist)"; - echo "action: "; - echo "\t help: print this"; - echo "\t check: build starpu and run tests"; - echo "\t build: only build starpu"; - echo "\t run : run [type] located at [path] (they must be provided)"; - echo "\t\t type : script or (test (TODO))"; - echo "\t\t path : path to script (or test name (TODO))"; - echo "\t TODO gdb interactive guest_script/host_script"; - echo "\t TODO : remove all created images"; + echo -e "usage: ./launch-test <config> <action> [type] [path]"; + echo -e "config: "; + echo -e "\t all : launch on all available configs"; + echo -e "\t config name : launch on this particular docker config (a folder with that name containing a dockerfile must exist)"; + echo -e "action: "; + echo -e "\t help: print this"; + echo -e "\t check: build starpu and run tests"; + echo -e "\t build: only build starpu"; + echo -e "\t run : run [type] located at [path] (they must be provided)"; + echo -e "\t\t type : script or (test (TODO))"; + echo -e "\t\t path : path to script (or test name (TODO))"; + echo -e "\t TODO gdb interactive guest_script/host_script"; + echo -e "\t TODO : remove all created images"; } GETPU(){ + rm -r ./starpu + cp -r /home/user/shared/tmp ./starpu #if starpu folder does not exist clone if [ ! -d "starpu" ] then @@ -55,18 +57,23 @@ RUN(){ HELP else #check that it exists + docker rm $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}") cp $p/Dockerfile . + echo "building"; docker build -t starpu_test/$p . > docker_results/docker_build_$p rm ./Dockerfile - docker run starpu_test/$p > docker_results/docker_run_$p - docker rm $(docker stop $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")) + echo "running"; + docker run starpu_test/$p & + #copy script + docker cp ./run.sh $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}"):/home/starpu + #run it + docker exec $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}") /bin/bash ./run.sh +# docker exec $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}") mpirun -np 4 xterm -e gdb --args build/mpi/tests/.libs/abstract_comms +# docker stop $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}") #remove image? fi } -if [ $g = 'help' ] -then - HELP -elif [ $g = 'check' ] +if [ $g = 'check' ] then GETPU cp check.sh run.sh @@ -95,5 +102,6 @@ then fi fi #Do for a particular test - +else + HELP fi diff --git a/make_result b/make_result new file mode 100644 index 0000000..3caeab4 --- /dev/null +++ b/make_result @@ -0,0 +1 @@ +./run-test.sh: line 7: make: command not found diff --git a/mpi4/Dockerfile b/mpi4/Dockerfile index c028350..3b8ccf2 100644 --- a/mpi4/Dockerfile +++ b/mpi4/Dockerfile @@ -27,6 +27,9 @@ WORKDIR /home/starpu COPY run.sh . +RUN apt-get install -y texlive texlive-font-utils doxygen libtool-bin texlive-fonts-extra +RUN apt-get install -y libfxt-dev + ADD ./starpu /home/starpu/starpu #So we don't run mpi as root RUN useradd starpu @@ -35,4 +38,4 @@ RUN chmod +x ./run.sh USER starpu #run whatever the script gave us -CMD ["/bin/bash", "./run.sh"] +CMD ["sleep", "infinity"] diff --git a/mpi5/Dockerfile b/mpi5/Dockerfile index 2b7e70e..da82a86 100644 --- a/mpi5/Dockerfile +++ b/mpi5/Dockerfile @@ -36,7 +36,7 @@ RUN chmod +x ./run.sh USER starpu #run whatever the script gave us -CMD ["/bin/bash", "./run.sh"] +CMD ["sleep", "infinity"] # Copy the script to compile and test starpu #COPY # Compile starpu and check diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100644 index 0000000..87b5bc2 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,7 @@ +export LD_LIBRARY_PATH=/usr/local/lib +cd starpu +./autogen.sh > ../autogen_result 2>&1 +mkdir ../build +cd ../build +../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats > ../configure_result 2>&1 +LD_LIBRARY_PATH=/usr/local/lib make -j > ../make_result 2>&1 diff --git a/scripts/check.sh b/scripts/check.sh new file mode 100644 index 0000000..ac22753 --- /dev/null +++ b/scripts/check.sh @@ -0,0 +1,8 @@ +export LD_LIBRARY_PATH=/usr/local/lib +cd starpu +./autogen.sh > ../autogen_result 2>&1 +mkdir ../build +cd ../build +../starpu/configure --prefix=/home/install --disable-cuda --enable-mpi --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats > ../configure_result 2>&1 +make -j > ../make_result 2>&1 +make check ../check_result 2>&1 diff --git a/scripts/ci.sh b/scripts/ci.sh new file mode 100644 index 0000000..35b4193 --- /dev/null +++ b/scripts/ci.sh @@ -0,0 +1,11 @@ +export LD_LIBRARY_PATH=/usr/local/lib +cd starpu +export HOME=/home/starpu +./autogen.sh > ../autogen_result 2>&1 +mkdir ../build +cd ../build +##ARE THE OPTIONS RIGHT? I won't just copy the ci script. +../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --enable-build-doc-pdf --enable-verbose --disable-build-examples --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats > ../configure_result 2>&1 +make -j > ../make_result 2>&1 +make check > ../check_result 2>&1 + diff --git a/scripts/run-test.sh b/scripts/run-test.sh new file mode 100755 index 0000000..3d12b1b --- /dev/null +++ b/scripts/run-test.sh @@ -0,0 +1,11 @@ +export LD_LIBRARY_PATH=/usr/local/lib +cd starpu +./autogen.sh > ../autogen_result 2>&1 +mkdir ../build +cd ../build +../starpu/configure --prefix=/home/starpu/install --disable-cuda --enable-mpi --disable-opencl --disable-starpupy --enable-mpi-ft --enable-mpi-check --enable-mpi-ft-stats --disable-build-examples > ../configure_result 2>&1 +LD_LIBRARY_PATH=/usr/local/lib make -j > ../make_result 2>&1 +cd mpi/tests/.libs/ +export LD_LIBRARY_PATH=/usr/local/lib:/home/starpu/build/src/.libs:/home/starpu/build/mpi/src/.libs +STARPU_WORKERS_GETBIND=0 mpirun -np 4 ./abstract_comms > test_result + -- GitLab