zpzim / SCAMP

The fastest way to compute matrix profiles on CPU and GPU!
http://www.cs.ucr.edu/~eamonn/MatrixProfile.html
MIT License
155 stars 35 forks source link

command line run instruction #122

Open jinz2014 opened 8 months ago

jinz2014 commented 8 months ago

I created a 'build' directory and then type 'cmake' to build the executable 'SCAMP'.

Could you please provide instructions of running tests/benchmark using 'SCAMP' ? Thank you.

SCAMP/build$ ls
buildtests.sh  CMakeCache.txt  cmake_install.cmake  debug.sh  release.sh  src
check.sh       CMakeFiles      CTestCustom.cmake    Makefile  SCAMP       third_party
zpzim commented 8 months ago

Hi,

You should be able to follow the example here:

https://scamp-docs.readthedocs.io/en/latest/cli.html#using-the-scamp-cli

For a traditional MP all you need to do is specify window size and input file like this:

./SCAMP --window=window_size --input_a_file_name=input_A_file_path

There are other options available as well. The benchmarks are for the CI workflows but you can build them manually from inside a build directory using:

cmake -DBUILD_BENCHMARKS=1 .. cmake --build . --config Release --parallel 2

and then run them (inside the build directory) using:

./src/benchmark/scamp_gpu_benchmarks (GPU benchmarks)

./src/benchmark/scamp_cpu_benchmarks (CPU benchmarks)

These benchmarks are optimized for the CI workflows, but you can modify the code here to configure the input size

Specifically, this line you can change the 19 to 20 to make the benchmark input size go from 512K to 1M etc.

Does that help?

zpzim commented 8 months ago

For tests, you can run the python script in the tests directory:

cd test

For GPU tests: python3 ./run_tests.py --executable "../build/SCAMP" --force_gpu --extra_args " --num_cpu_workers=0"

For CPU tests: python3 ./run_tests.py --executable "../build/SCAMP" --extra_args "--no_gpu --num_cpu_workers=2"