From dc68cb7735a2c6816a94bc0088de241036ef03e5 Mon Sep 17 00:00:00 2001 From: Dominic Marcello Date: Thu, 8 Jul 2021 14:09:24 -0500 Subject: [PATCH] Removed unneeded scripts --- build_octotiger.sh | 34 ------ buildo.sh | 8 -- moving_star.sh | 2 - scenario1.txt | 10 -- smic.sh | 17 --- smic_script.sh | 26 ----- test2.sh | 3 - verification_and_scaling_test.sh | 176 ------------------------------- 8 files changed, 276 deletions(-) delete mode 100755 build_octotiger.sh delete mode 100755 buildo.sh delete mode 100755 moving_star.sh delete mode 100644 scenario1.txt delete mode 100755 smic.sh delete mode 100755 smic_script.sh delete mode 100755 test2.sh delete mode 100755 verification_and_scaling_test.sh diff --git a/build_octotiger.sh b/build_octotiger.sh deleted file mode 100755 index 1842e7b5f..000000000 --- a/build_octotiger.sh +++ /dev/null @@ -1,34 +0,0 @@ - - -set -x - -source ~/scripts/sourceme.sh gperftools -source ~/scripts/sourceme.sh hwloc -source ~/scripts/sourceme.sh vc -source ~/scripts/sourceme.sh silo -source ~/scripts/sourceme.sh $1/hpx - -rm -rf $1 -mkdir $1 -cd $1 -rm CMakeCache.txt -rm -r CMakeFiles - - -cmake -DCMAKE_PREFIX_PATH="$HOME/local/$1/hpx" -DCMAKE_CXX_FLAGS="-DBOOST_USE_VALGRIND" \ - -DCMAKE_CXX_COMPILER=g++ -DOCTOTIGER_WITH_TESTS=ON \ - -DCMAKE_C_COMPILER=gcc \ - -DCMAKE_CXX_FLAGS="-fPIC -std=c++0x -L$HOME/local/boost/lib -march=native" \ - -DCMAKE_C_FLAGS="-fPIC -L$HOME/local/boost/lib" \ - -DCMAKE_BUILD_TYPE=$1 \ - -DCMAKE_INSTALL_PREFIX="$HOME/local/$1/octotiger" \ - -DBOOST_ROOT=$HOME/local/boost \ - -DHDF5_ROOT=$HOME/local/hdf5 \ - -DSilo_DIR=$HOME/local/silo \ - -DOCTOTIGER_WITH_TESTS=OFF \ - .. - - -make -j - - diff --git a/buildo.sh b/buildo.sh deleted file mode 100755 index 750a4e263..000000000 --- a/buildo.sh +++ /dev/null @@ -1,8 +0,0 @@ - -cmake -DCMAKE_PREFIX_PATH=/usr/local/packages/hpx/ $1 \ - -DCMAKE_CXX_COMPILER="g++" \ - -DCMAKE_C_COMPILER="gcc" \ - -DCMAKE_C_FLAGS="-O2 -g" \ - -DCMAKE_CXX_FLAGS="-O2 -g" - - diff --git a/moving_star.sh b/moving_star.sh deleted file mode 100755 index 370afbbb3..000000000 --- a/moving_star.sh +++ /dev/null @@ -1,2 +0,0 @@ -./octotiger -Problem=moving_star -Stoptime=2.0 -Odt=0.2 -t8 -Max_level=3 -Xscale=10.0 - diff --git a/scenario1.txt b/scenario1.txt deleted file mode 100644 index d8ed25a44..000000000 --- a/scenario1.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Argumente fuer octotiger -octotiger_args: -Disableoutput -Problem=moving_star -Max_level=3 -Odt=0.3 -Stoptime=0.2 -Xscale=20.0 -Omega=0.1 -Stopstep=9 -# Expected results -rho 2.751004e-02 3.057842e-02 -egas 3.581150e-02 4.770200e-02 -sx 5.006693e-02 5.305132e-02 -sy 4.844836e-02 6.009045e-02 -tau 2.426892e-02 2.627559e-02 -primary_core 2.751004e-02 3.057842e-02 - diff --git a/smic.sh b/smic.sh deleted file mode 100755 index 5034a286a..000000000 --- a/smic.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -#PBS -j oe -#PBS -l nodes=64:ppn=20 -#PBS -l walltime=24:00:00 -#PBS -q checkpt -set -x -cd /work/$USER/octotiger -make -j20 -cat $PBS_NODEFILE | awk 'NR % 20 == 0' > node.list -export HPX_NODEFILE=node.list -unset PBS_NODEFILE -export I_MPI_FABRICS=shm:ofa -export I_MPI_DAPL_PROVIDER="ofa-v2-mlx4_0-1u" -export I_MPI_OFA_ADAPTER_NAME=mlx4_0 -export NPROCS=`wc -l $HPX_NODEFILE |gawk '//{print $1}'` -rm data.bin -mpirun -np $NPROCS --machinefile $HPX_NODEFILE ./octotiger -t20 diff --git a/smic_script.sh b/smic_script.sh deleted file mode 100755 index bca0ea9d1..000000000 --- a/smic_script.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -#PBS -j oe -#PBS -l nodes=50:ppn=20 -#PBS -l walltime=72:00:00 -#PBS -q checkpt - -set -x - -cd $WORK/octotiger -make -j20 -cat $PBS_NODEFILE | awk 'NR % 20 == 0' > node.list -export HPX_NODEFILE=node.list - - -unset PBS_NODEFILE -export I_MPI_FABRICS=shm:ofa -export I_MPI_DAPL_PROVIDER="ofa-v2-mlx4_0-1u" -export I_MPI_OFA_ADAPTER_NAME=mlx4_0 - -export NPROCS=`wc -l $HPX_NODEFILE |gawk '//{print $1}'` -mpirun -np $NPROCS --machinefile $HPX_NODEFILE ./octotiger --hpx:threads 20 -Problem=moving_star -Max_level=6 -Xscale=32 -Odt=0.5 -Stoptime=16.0 - - - - - diff --git a/test2.sh b/test2.sh deleted file mode 100755 index 3752d554f..000000000 --- a/test2.sh +++ /dev/null @@ -1,3 +0,0 @@ -./octotiger -t8 -Problem=moving_star -Max_level=3 -Odt=0.4 -Stoptime=0.2 -Xscale=20.0 - - diff --git a/verification_and_scaling_test.sh b/verification_and_scaling_test.sh deleted file mode 100755 index 711d57115..000000000 --- a/verification_and_scaling_test.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/bash - -# Checks results - note do not use any variable names from main program... -check_results() { - # Loop through all result names - for result_name in "rho" "egas" "sx" "sy" "tau" "primary_core"; do - # | sed -e 's/^[ \t]*// removes all leading whitespaces - result_correct="$(cat "$1" | grep "$result_name" | sed -e 's/^[ \t]*//' | sed "s/$result_name//g")" - result_actual="$(echo "$2" | grep "$result_name" | sed -e 's/^[ \t]*//' | sed "s/$result_name//g")" - if [ "$result_correct" == "$result_actual" ]; then - echo "->$result_name correct!" | tee -a LOG.txt - else - echo "==->ERROR: $result_name not correct!" | tee -a LOG.txt - echo "==->Actual: $result_correct" | tee -a LOG.txt - echo "==->Correct: $result_actual" | tee -a LOG.txt - errorcount=$errorcount+1 - fi - done -} - -#Check whether all arguments are present -if [ $# -ne 5 ]; then - echo "USAGE:" - echo "------" - echo "Argument 1: scenario file (for example path/to/scenarion/scenario1.txt)" - echo " scenario file contains octotiger parameters and expected results" - echo "Argument 2: Number of HPX threads for first test (for example 1)" - echo "Argument 3: Stepsize in which the numer of HPX threads is increased each test (for example 1)" - echo "Argument 4: Number of HPX threads for the last test (for example 64)" - echo "Argument 5: Path to octotiger executable" - exit 128 -fi - -# Get base dir -basedir=`pwd` -# Get current date -today=`date +%Y-%m-%d_%H:%M:%S` -# Create Test folder -result_folder="Testrun-$today" -mkdir "$result_folder" - -# Get scenario arguments and current commits -octotiger_args="$(cat "$1" | grep 'octotiger_args' | sed 's/octotiger_args: //g')" -current_commit=`git rev-parse HEAD` - -# Log configuration -echo "Using scenarion file: $1" | tee "$result_folder/LOG.txt" -echo "Using Octo-Tiger commit: $current_commit" | tee -a "$result_folder/LOG.txt" -echo "Octo-Tiger arguments: $octotiger_args" | tee -a "$result_folder/LOG.txt" - -# Create result files -cd "$result_folder" -echo "# Octo-Tiger commit: $current_commit " > computation_time_results.txt -echo "# Date of run $today" >> computation_time_results.txt -echo "# Measuring computation time" >> computation_time_results.txt -echo "#" >> computation_time_results.txt -echo "#Number HPX threads,All off,m2m on,m2p on,p2p on,p2m on,All on,All on except p2m" >> computation_time_results.txt -echo "# Octo-Tiger commit: $current_commit " > total_time_results.txt -echo "# Date of run $today" >> total_time_results.txt -echo "# Measuring total time" >> total_time_results.txt -echo "#" >> total_time_results.txt -echo "#Number HPX threads,All off,m2m on,m2p on,p2p on,p2m on,All on,All on except p2m" >> total_time_results.txt -# Save this version of the script for sanity checks later on -cp ../verification_and_scaling_test.sh used-script-copy.txt -# Save scenario file for sanity check later on -cp ../$1 $1 - -# Save disassembly of performance critical functions for later analysis -echo "" | tee -a LOG.txt -echo "Getting assembly/source mix of kernels..." | tee -a LOG.txt -mkdir kernel-mixed-assembly -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::multipole_interactions::m2m_kernel::blocked_interaction_rho" \ - -ex "quit" > kernel-mixed-assembly/m2m_rho.asm -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::multipole_interactions::m2m_kernel::blocked_interaction_non_rho" \ - -ex "quit" > kernel-mixed-assembly/m2m_non_rho.asm -echo "Got multipole multipole kernels!" | tee -a LOG.txt -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::multipole_interactions::m2p_kernel::blocked_interaction_rho" \ - -ex "quit" > kernel-mixed-assembly/m2p_rho.asm -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::multipole_interactions::m2p_kernel::blocked_interaction_non_rho" \ - -ex "quit" > kernel-mixed-assembly/m2p_non_rho.asm -echo "Got multipole monopole kernels!" | tee -a LOG.txt -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::monopole_interactions::p2m_kernel::blocked_interaction_rho" \ - -ex "quit" > kernel-mixed-assembly/p2m_rho.asm -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::monopole_interactions::p2m_kernel::blocked_interaction_non_rho" \ - -ex "quit" > kernel-mixed-assembly/p2m_non_rho.asm -echo "Got monopole multipole kernels!" | tee -a LOG.txt -gdb ../$5 -batch \ - -ex "disassemble /s octotiger::fmm::monopole_interactions::p2p_kernel::blocked_interaction" \ - -ex "quit" > kernel-mixed-assembly/p2p.asm -echo "Got monopole monopole kernel!" | tee -a LOG.txt -echo "" | tee -a LOG.txt -echo "Getting raw assembly of kernels..." | tee -a LOG.txt -mkdir kernel-raw-assembly -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::multipole_interactions::m2m_kernel::blocked_interaction_rho" \ - -ex "quit" > kernel-raw-assembly/m2m_rho.asm -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::multipole_interactions::m2m_kernel::blocked_interaction_non_rho" \ - -ex "quit" > kernel-raw-assembly/m2m_non_rho.asm -echo "Got multipole multipole kernels!" | tee -a LOG.txt -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::multipole_interactions::m2p_kernel::blocked_interaction_rho" \ - -ex "quit" > kernel-raw-assembly/m2p_rho.asm -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::multipole_interactions::m2p_kernel::blocked_interaction_non_rho" \ - -ex "quit" > kernel-raw-assembly/m2p_non_rho.asm -echo "Got multipole monopole kernels!" | tee -a LOG.txt -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::monopole_interactions::p2m_kernel::blocked_interaction_rho" \ - -ex "quit" > kernel-raw-assembly/p2m_rho.asm -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::monopole_interactions::p2m_kernel::blocked_interaction_non_rho" \ - -ex "quit" > kernel-raw-assembly/p2m_non_rho.asm -echo "Got monopole multipole kernels!" | tee -a LOG.txt -gdb ../$5 -batch \ - -ex "disassemble octotiger::fmm::monopole_interactions::p2p_kernel::blocked_interaction" \ - -ex "quit" > kernel-raw-assembly/p1p.asm -echo "Got monopole monopole kernel!" | tee -a LOG.txt - -# Need to use declare, otherwise bash assumes it is a string (untyped) -declare -i errorcount=0 -# Running tests -echo "" | tee -a LOG.txt -echo "Running all tests..." | tee -a LOG.txt -for i in `seq $2 $3 $4`; do - echo "Running test $i.1 - all off..." | tee -a LOG.txt - output1="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=old p2m_kernel_type=old m2m_kernel_type=old m2p_kernel_type=old)" - check_results $1 "$output1" - echo "Running test $i,2 - m2m on..." | tee -a LOG.txt - output2="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=old p2m_kernel_type=old m2m_kernel_type=soa_cpu m2p_kernel_type=old)" - check_results $1 "$output2" - echo "Running test $i.3 - m2p on..." | tee -a LOG.txt - output3="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=old p2m_kernel_type=old m2m_kernel_type=old m2p_kernel_type=soa_cpu)" - check_results $1 "$output3" - echo "Running test $i.4 - p2p on..." | tee -a LOG.txt - output4="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=soa_cpu p2m_kernel_type=old m2m_kernel_type=old m2p_kernel_type=old)" - check_results $1 "$output4" - echo "Running test $i.5 - p2m on..." | tee -a LOG.txt - output5="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=old p2m_kernel_type=soa_cpu m2m_kernel_type=old m2p_kernel_type=old)" - check_results $1 "$output5" - echo "Running test $i.6 - All on..." | tee -a LOG.txt - output6="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=soa_cpu p2m_kernel_type=soa_cpu m2m_kernel_type=soa_cpu m2p_kernel_type=soa_cpu)" - check_results $1 "$output6" - echo "Running test $i.7 - All on except p2m..." | tee -a LOG.txt - output7="$(../$5 -Ihpx.stacks.use_guard_pages=0 -t$i $octotiger_args p2p_kernel_type=soa_cpu p2m_kernel_type=old m2m_kernel_type=soa_cpu m2p_kernel_type=soa_cpu)" - check_results $1 "$output7" - # Clean up results - clean_output_computational="$i,$(echo "$output1" | grep 'Computation' | sed 's/Computation: //g'),$(echo "$output2" | grep 'Computation' | sed 's/Computation: //g'),$(echo "$output3" | grep 'Computation' | sed 's/Computation: //g'),$(echo "$output4" | grep 'Computation' | sed 's/Computation: //g'),$(echo "$output5" | grep 'Computation' | sed 's/Computation: //g'),$(echo "$output6" | grep 'Computation' | sed 's/Computation: //g'),$(echo "$output7" | grep 'Computation' | sed 's/Computation: //g')" - clean_output_total="$i,$(echo "$output1" | grep 'Total' | sed 's/Total: //g'),$(echo "$output2" | grep 'Total' | sed 's/Total: //g'),$(echo "$output3" | grep 'Total' | sed 's/Total: //g'),$(echo "$output4" | grep 'Total' | sed 's/Total: //g'),$(echo "$output5" | grep 'Total' | sed 's/Total: //g'),$(echo "$output6" | grep 'Total' | sed 's/Total: //g'),$(echo "$output7" | grep 'Total' | sed 's/Total: //g')" - # Print and save to files >> for appending - echo "$clean_output_computational" >> "computation_time_results.txt" - echo "$clean_output_computational" | tee -a LOG.txt - echo "$clean_output_total" >> "total_time_results.txt" - echo "$clean_output_total" | tee -a LOG.txt -done - -# Plot results of computation and store into folder -echo "" | tee -a LOG.txt -echo "Plotting graphs..." | tee -a LOG.txt -cp ../plot-results.plt plot-results.plt -gnuplot -e "filename='computation_time_results.txt'" -e "outfile='computation_time_scaling.png'" plot-results.plt -gnuplot -e "filename='total_time_results.txt'" -e "outfile='total_time_scaling.png'" plot-results.plt - -# Show error count and generate warning file if there are any -echo "" | tee -a LOG.txt -echo "All done!" | tee -a LOG.txt -echo "Errorcount: $errorcount" | tee -a LOG.txt -if [ $errorcount -gt 0 ]; then - touch THERE_HAVE_BEEN_ERROR_IN_THIS_RUN -fi