DavideNardone / MTSS-Multivariate-Time-Series-Software

A GP-GPU/CPU Dynamic Time Warping (DTW) implementation for the analysis of Multivariate Time Series (MTS).
MIT License
45 stars 8 forks source link

Consider using a proper build tool #16

Closed krischer closed 5 years ago

krischer commented 5 years ago

Consider using a proper build tool like make/cmake/scons/… This would also allow for nicer error reporting for example if “-D WS” is not specified.

Part of a review at: https://github.com/openjournals/joss-reviews/issues/1049

DavideNardone commented 5 years ago

I can provide a shell script for checking nicer error reporting, like the following:

#!/bin/bash

re='^[0-9]+$'

if test "$#" -ne 1; then echo "Error: Illegal number of parameters. \nPlease run the script with the option --help for a more clear understanding!" >&2; exit 1 exit 1 fi

if ! [[ "$1" =~ $re ]] ; then echo "Error: The first argument shoul be a number" >&2; exit 1 fi

if test "$1" == "--help"; then echo 'Description help' exit 1 fi

echo 'Compiling...' command1='-arch=sm_30 -D WS='$1' MD_DTW.cu module.cu -o mdtwObj'

nvcc $command1

Do you think can it be fine? I don't think is necessary to use such a tool like cmake for just compiling 2 files...

karlrupp commented 5 years ago

I second this request for a build system. It is common to e.g. use something like ./configure && make && make install in Unix-land. Also, users on Windows benefit from build tools that auto-generate their Visual Studio project, etc.

Part of a review at: https://github.com/openjournals/joss-reviews/issues/1049