aboutsummaryrefslogtreecommitdiff
path: root/doc/code
diff options
context:
space:
mode:
Diffstat (limited to 'doc/code')
-rw-r--r--doc/code/pangemma.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/code/pangemma.md b/doc/code/pangemma.md
index f0788c3..fe86f3f 100644
--- a/doc/code/pangemma.md
+++ b/doc/code/pangemma.md
@@ -22,6 +22,15 @@ The original gemma source base is considered stable and will be maintained - mos
Even so, pangemma is supposed to be able to run the same steps as the original gemma. And hopefully improve things.
+## Adapting the old gemma code
+
+For running the old gemma code we need to break up the code base into pieces to run in a propagator network (see below).
+Initially we can use the file system to pass state around. That will break up the implicit global state that gemma carries right now and makes working with the code rather tricky.
+Note that we don't have the goal of making gemma more efficient because people can still use the old stable code base.
+Essentially we are going to add flags to the binary that will run gemma partially by exporting and importing intermediate state.
+
+Later, when things work in a propagator network, we can create alternatives that pass state around in memory.
+
# A simple propagator network
We will create cells that hold basic computations. We won't do a full propagator setup, though we may do a full implementation later.
@@ -70,3 +79,16 @@ will run both.
This simple example shows how simple complex running logic can be described without (1) predicting how people will use the software and (2) no complex if/then statements.
Why does this matter for gemma? It will allow us to run old parts of gemma as part of the network in addition to new parts - and potentially validate them. It also allows us to create multiple implementations, such as for CPU and GPU, that can run in parallel and validate each other's outcomes.
+
+## Create the first cells
+
+Let's start with default GEMMA behaviour and create the first cells to get to exporting the kinship-matrix above.
+
+```
+(content kinship-matrix)
+```
+
+We'll break down to inspecting cell levels after. The genofile cells contain a file name (string).
+When the file gets read we will capture the state in a file and carry the file name of the new file forward.
+In this setup cells simply represent file names (for state). This allows us to simply read and write files in the C code.
+Later, when we wire up new propagators we may carry state in memory. The whole point of using this approach is that we really don't have to care!