OHDSI Home | Forums | Wiki | Github

Runtime error for some Achilles analyses

Good day.
We are running Achilles in RStudio on an Amazon AWS enterprise installation of OHDSI.
We are running into some issues when running Achilles. One of them is that for some analyses we get the following error: ERROR: no runtime found in log file.

I can see in the code of Achilles on GitHub the following:
getAchillesResultBenchmark ← function(analysisId, logs) {
logs ← logs[logs$analysisId == analysisId, ]
if (nrow(logs) == 1) {
runTime ← strsplit(logs[1, ]$runTime, " ")[[1]]
runTimeValue ← round(as.numeric(runTime[1]), 2)
runTimeUnit ← runTime[2]
if (runTimeUnit == “mins”) {
runTimeValue ← runTimeValue * 60
} else if (runTimeUnit == “hours”) {
runTimeValue ← runTimeValue * 60 * 60
} else if (runTimeUnit == “days”) {
runTimeValue ← runTimeValue * 60 * 60 * 24
} else {
“ERROR: no runtime found in log file”

But I do not understand how this log is being used by Achilles and how to debug and fix this error.

Has anyone encountered the same or similar?

I appreciate your help.
Kind regards

For reference, i stumbled upon the same issue and google got me on this thread.
In my case, it was because I had run two consecutive achilles analysis without deleting the log file.
The default is to append both runs in the same file.
This results in an error in this function because of the if (nrow(logs) == 1) {
Workaround is to delete the log file, run again the achilles analysis to allow Achilles::exportToAres to work as expected
Correction in the code could be to take the last row in logs dataframe to use as a benchmark value