Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a167eab1 authored by user's avatar user
Browse files

moved script and better dockerfiles

parent 06cc4542
No related branches found
No related tags found
No related merge requests found
#get fist param, help, check, build #get fist param, help, check, build
p=${1-unset} p=${1-'unset'}
g=${2-unset} g=${2-unset}
#print help #print help
HELP (){ HELP (){
echo "usage: ./launch-test <config> <action> [type] [path]"; echo -e "usage: ./launch-test <config> <action> [type] [path]";
echo "config: "; echo -e "config: ";
echo "\t all : launch on all available configs"; echo -e "\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 -e "\t config name : launch on this particular docker config (a folder with that name containing a dockerfile must exist)";
echo "action: "; echo -e "action: ";
echo "\t help: print this"; echo -e "\t help: print this";
echo "\t check: build starpu and run tests"; echo -e "\t check: build starpu and run tests";
echo "\t build: only build starpu"; echo -e "\t build: only build starpu";
echo "\t run : run [type] located at [path] (they must be provided)"; echo -e "\t run : run [type] located at [path] (they must be provided)";
echo "\t\t type : script or (test (TODO))"; echo -e "\t\t type : script or (test (TODO))";
echo "\t\t path : path to script (or test name (TODO))"; echo -e "\t\t path : path to script (or test name (TODO))";
echo "\t TODO gdb interactive guest_script/host_script"; echo -e "\t TODO gdb interactive guest_script/host_script";
echo "\t TODO : remove all created images"; echo -e "\t TODO : remove all created images";
} }
GETPU(){ GETPU(){
rm -r ./starpu
cp -r /home/user/shared/tmp ./starpu
#if starpu folder does not exist clone #if starpu folder does not exist clone
if [ ! -d "starpu" ] if [ ! -d "starpu" ]
then then
...@@ -55,18 +57,23 @@ RUN(){ ...@@ -55,18 +57,23 @@ RUN(){
HELP HELP
else else
#check that it exists #check that it exists
docker rm $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")
cp $p/Dockerfile . cp $p/Dockerfile .
echo "building";
docker build -t starpu_test/$p . > docker_results/docker_build_$p docker build -t starpu_test/$p . > docker_results/docker_build_$p
rm ./Dockerfile rm ./Dockerfile
docker run starpu_test/$p > docker_results/docker_run_$p echo "running";
docker rm $(docker stop $(docker ps -a -q --filter ancestor=starpu_test/$p:latest --format="{{.ID}}")) 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? #remove image?
fi fi
} }
if [ $g = 'help' ] if [ $g = 'check' ]
then
HELP
elif [ $g = 'check' ]
then then
GETPU GETPU
cp check.sh run.sh cp check.sh run.sh
...@@ -95,5 +102,6 @@ then ...@@ -95,5 +102,6 @@ then
fi fi
fi fi
#Do for a particular test #Do for a particular test
else
HELP
fi fi
./run-test.sh: line 7: make: command not found
...@@ -27,6 +27,9 @@ WORKDIR /home/starpu ...@@ -27,6 +27,9 @@ WORKDIR /home/starpu
COPY run.sh . 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 ADD ./starpu /home/starpu/starpu
#So we don't run mpi as root #So we don't run mpi as root
RUN useradd starpu RUN useradd starpu
...@@ -35,4 +38,4 @@ RUN chmod +x ./run.sh ...@@ -35,4 +38,4 @@ RUN chmod +x ./run.sh
USER starpu USER starpu
#run whatever the script gave us #run whatever the script gave us
CMD ["/bin/bash", "./run.sh"] CMD ["sleep", "infinity"]
...@@ -36,7 +36,7 @@ RUN chmod +x ./run.sh ...@@ -36,7 +36,7 @@ RUN chmod +x ./run.sh
USER starpu USER starpu
#run whatever the script gave us #run whatever the script gave us
CMD ["/bin/bash", "./run.sh"] CMD ["sleep", "infinity"]
# Copy the script to compile and test starpu # Copy the script to compile and test starpu
#COPY #COPY
# Compile starpu and check # Compile starpu and check
......
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
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
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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment