Explorar o código

mlr: fixing the path (and typo)

Luka Stanisic %!s(int64=9) %!d(string=hai) anos
pai
achega
e3a8d06dda
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 2 2
      tools/starpu_mlr_analysis.Rmd
  2. 3 1
      tools/starpu_mlr_analysis.in

+ 2 - 2
tools/starpu_mlr_analysis.Rmd

@@ -225,8 +225,8 @@ be somehow useful. This is a simple helper to generate C code for the
 parameters combinations and it should be copied to the task
 parameters combinations and it should be copied to the task
 description in the application. The function generating the code is
 description in the application. The function generating the code is
 not so robust, so make sure that the generated code correctly
 not so robust, so make sure that the generated code correctly
-corresponds to computed model (for example parameters are considered
-in the alphabetical order).
+corresponds to computed model (e.g., parameters are considered in the
+alphabetical order).
 
 
 ```{r Code}
 ```{r Code}
 print_codelet(model4, "mlr_cl")
 print_codelet(model4, "mlr_cl")

+ 3 - 1
tools/starpu_mlr_analysis.in

@@ -86,6 +86,8 @@ fi
 
 
 #####################################
 #####################################
 # Running analysis file to get actual results
 # Running analysis file to get actual results
-Rscript -e "library(knitr); input_trace = '$inputfile' ; outputhtml='$outputfile';\
+in="$(cd "$(dirname "$inputfile")"; pwd)/$(basename "$inputfile")"
+
+Rscript -e "library(knitr); input_trace = '$in' ; outputhtml='$outputfile';\
             outputRmd = gsub('.html\$','.Rmd',outputhtml);\
             outputRmd = gsub('.html\$','.Rmd',outputhtml);\
             knit('$analysis_script',output=outputRmd); knitr::knit2html(outputRmd)"
             knit('$analysis_script',output=outputRmd); knitr::knit2html(outputRmd)"