Skip to content

Commit

Permalink
Document debugging FiniteVolume_X64 in CLION
Browse files Browse the repository at this point in the history
  • Loading branch information
GMarupilla committed Apr 9, 2020
1 parent e483fb2 commit a147c4c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions README_localSolverBuilds.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## Debugging

1. Program arguments
- for linux find [here](Readme_linux.md)

2. Environment variables

Expand Down
25 changes: 22 additions & 3 deletions Readme_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

## For configuring the project

1. Open CLION go to `File > settings > Build, Execution, Deployement > Toolchains > +`
1. Open VCELL Solvers complete project inside CLION.
2. Open CLION go to `File > settings > Build, Execution, Deployement > Toolchains > +`
Let it detect everything automatically `CMake`, `Make`, `C Complier`, `C++ Compiler` and `Debugger`
2. Configure CMake `File > settings > Build, Execution, Deployement > CMake > +`
3. Configure CMake `File > settings > Build, Execution, Deployement > CMake > +`
- Build type as `Default`
- Give `CMake options`
For all solvers
Expand All @@ -28,4 +29,22 @@
-DOPTION_TARGET_HY3S_SOLVERS=OFF
```
- Generation path `build/bin`
- Apply all these changes, that builds every solver in `bin` directory.
- Apply all these changes, that builds every solver in `bin` directory. The `Run/Debug Configurations` should be populated automatically for all solvers.

### Debugging Solvers

NOTE: All solvers are command line apps, which are invoked by VCELL_Rel/VCELL_Alpha internally.

1. Debugging and setting up environment variables through CLION

#### For FiniteVolume_X64

1. We need `.fvinput` and `_link` files to run FinitVolumne_X64 solver as Command Line app. These can be generated by running VCELL_Rel or VCELL_Alpha once (we don't need to wait for the simulation to finish, just cancel it after it says "Running Simulation").
2. On CLION, open `Run/Debug Configurations` and select `Edit Configurations`. From the list of configurations select `CMAKE Application > FiniteVolume_X64`
3. Go to `Program arguments` and enter `<VCELL home>/simdata/temp/SimID_<simulation_ID>_0.fvinput`
Example: `/home/akhil/.vcell/simdata/temp/SimID_1812661980_0_.fvinput`
4. Go to `Working directory` and enter `<VCELL home>/simdata`
5. Set up `Environment variables` as `LD_LIBRARY_PATH=<VCELL home>/simdata/temp/<simulation_ID>_link`
Example: `LD_LIBRARY_PATH=/home/akhil/.vcell/simdata/temp/1812661980_link`

To get <VCELL_home> and <VCELL install> path details from VCell_Rel/VCELL_Alpha. Go to `Help > Vcell Properties... > General Properties`

0 comments on commit a147c4c

Please sign in to comment.