Commit 407b6f37 authored by Illia Kolesnik's avatar Illia Kolesnik
Browse files

Changes for RCI

parent 3cd110c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ const string SEARCH_FILE = "search.txt";
const string INDECIES_FILE = "indecies.txt";
const string DISTRIBUTION_FILE = "distribution.txt";

constexpr Index TEST_ITERATIONS = 5;
constexpr Index TEST_ITERATIONS = 3;
constexpr Index BENCHMARK_VERBOSE = 0;

using Device = TNL::Devices::Host;
+1 −1
Original line number Diff line number Diff line
CXX=g++
INCLUDE = -I ./../tnl/src -I ../hopscotch-map/include -I ../libcuckoo -I ../thread-pool/include -pthread
COMMON=-std=c++20 -Wno-deprecated-declarations
OPT=-O3 -DNDEBUG -march=znver2
OPT=-O3 -DNDEBUG -march=znver3

build:
	g++ Benchmark.cpp $(INCLUDE) $(COMMON) $(OPT)
+5 −13
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

DESIRED_DISTRIBUTIONS=("unif" "normal" "exp")
DESIRED_REFINES=(10000 50000 100000 500000 1000000 5000000)
DESIRED_SEARCHES_RATIO=(0.5 1 2)
SEARCHES=10000000
INSTANCES=5

# Stop on error
@@ -17,26 +17,20 @@ fi
GENERATOR="$1"
OUTDIR="$2"

COUNT=0
create() {
    local distribution="$1"
    local refine="$2"
    local search_ratio="$3"

    # searches = $(($refine * $search_ratio))
    search=$( echo "$refine * $search_ratio" | bc | cut -d'.' -f 1 )

    for i in $(seq 1 $INSTANCES); do
        RESULT_DIR="$OUTDIR/$distribution-r$refine-s$search-$i-$COUNT"
        RESULT_DIR="$OUTDIR/$distribution-r$refine-s$SEARCHES-$i"
        # Check if bench dir exists, remove if it does
        if [ -d $RESULT_DIR ]; then
            rm -rf $RESULT_DIR
        fi

        ./$GENERATOR $refine $search $distribution $RESULT_DIR
        ./$GENERATOR $refine $SEARCHES $distribution $RESULT_DIR

        echo "Created $RESULT_DIR"
        COUNT=$(($COUNT + 1))
    done
}

@@ -48,9 +42,7 @@ mkdir $OUTDIR

# Create instances
for refine in "${DESIRED_REFINES[@]}"; do
    for search_ratio in "${DESIRED_SEARCHES_RATIO[@]}"; do
    for distribution in "${DESIRED_DISTRIBUTIONS[@]}"; do
            create "$distribution" "$refine" "$search_ratio"
        done
        create "$distribution" "$refine"
    done
done
+2 −6
Original line number Diff line number Diff line
#!/bin/bash

#SBATCH --account=OPEN-28-65
#SBATCH --job-name=seq          # job name (default is the name of this file)
#SBATCH --output=log.%x.job_%j  # file name for stdout/stderr (%x will be replaced with the job name, %j with the jobid)
#SBATCH --time=1-23:00:00         # maximum wall time allocated for the job (D-H:MM:SS)

#SBATCH --partition=qcpu        # partition/queue name for the job submission
#SBATCH --time=23:59:00         # maximum wall time allocated for the job (D-H:MM:SS)
#SBATCH --partition=amd        # partition/queue name for the job submission
#SBATCH --ntasks=1              # number of tasks/processes

# how much RAM per node can be allocated for the job (default: 2G, max: 60G)
#SBATCH --mem=200G

# Stop on error