UWB-Biocomputing / WorkBench

Software and data provenance management platform for simulations of dissociated cortical cultures.
https://uwb-biocomputing.github.io/WorkBench/
Apache License 2.0
1 stars 3 forks source link

Script output files are not copied to project folder when running simulation locally #83

Closed king-shak closed 3 years ago

king-shak commented 3 years ago

While you can pull, build, and run a simulation locally, once it's finished and you press the "Analyze" button in the Simulation Runtime Environment (SRE) dialog, it fails to copy the scriptStatus file. As a result, no provenance is generated for it.

It creates the scriptStatus file directly in my user directory, yet it seems it's trying to grab it from the directory Workbench is being run from.

Here's the full stack trace: terminal error

Here is the error from the SRE (right after "Gathering simulation provenance..." towards the bottom): SRE error

And here is what the project directory tree looks like: project directory tree

stevecl5 commented 3 years ago

The source of this problem is that the script output are created in two different places when running local simulations. Specifically, simStatus.txt and SHA1Key.txt are created in the user's working directory, and scriptStatus.txt and output.txt are created in the user's home directory. The Workbench operation fails because it is looking for scriptStatus.txt in the user's working directory (causing everything after that point to fail as well).

The direct fix is to have workbench check the home directory for the script status file since that is where it exists. However, it would be better to have all of these files be created in the same location. Additionally, I discovered the home directory ~/ is hardcoded in the script generation code which is shared for both remote and local simulations, making it somewhat more difficult to change.

Before making any big changes, we need to first decide where we want the script output files to be created. For now, I fixed the specific issue of Workbench not being able to find scriptStatus.txt. However, the larger issue of how we want to manage these files is still unresolved.

stiber commented 3 years ago

Since we're discussing a bunch of "artifact organization" issues, and will want to go over the typical investigator workflow, I suggest that we catalog all of the artifacts (files) that Workbench interacts with, as things like internal templates (only one ever exists), group of experiments level (one for multiple simulations), and per-simulation (including both Workbench and Graphitti/BrainGrid). It seems like there may be duplicates. We can use this to help us think through these organizational issues.