How to run
Configure the simulation at simulation.conf.sh and execute the desired script. If it's a sweep, configuring period_analysis_configuration.py is also required. (TODO: video tutorial)
produce_graphical_simulation.shruns the program in simulation mode and produces a graphical simulationcapture_period.shcomputes the exponential coefficients of the collapse into a locked state for the values specified in the configuration file.period_analysis.shwraps the capture of the period for a range of parameters indicated in the sweep configuration file, allows to mark outliers to exclude, and finally produces a chart showing the trend.- TODO: compute the average return probability using Monte Carlo solver.
| Equation | Euler order 1 | Euler up to O(4) | Generalized Runge Kutta | Solver Wrapper w/Noise models | Monte Carlo Evolution |
|---|---|---|---|---|---|
| 1D linear | ✔️ | ✔️ | ✔️ | ❌ | 💡 |
| Noiseless Kuramoto | ✔️ | ❌ | ✔️ | ❌ | 💡 |
| N-D linear | 💡 | 💡 | 💡 | ❌ | 💡 |
| Pulse-coupled oscillators | 💡 | 💡 | 💡 | ❌ | 💡 |
| Fractional Brownian Motion | ❌ | ❌ | ❌ | ❌ | 💡 |
|Refs. | ✔️ done and tested | ❌ not supported |💡 potential feature|
Topologies & Initializations| Graph | All nodes 1 value | Nodes different random values | All edges 1 value | Edges different random values | Node and edges read from file |
|---|---|---|---|---|---|
| Ring(N) | ✔️ | ✔️ | ✔️ | 💡 | 💡 |
| Clique(N) | ✔️ | ✔️ | ✔️ | 💡 | 💡 |
| Erdos Renyi(N,p) | ✔️ | ✔️ | ✔️ | 💡 | 💡 |
| ScaleFree(N,A,B) | ✅ | ✅ | ✅ | 💡 | 💡 |
| Small World(N,k,p) | ✔️ | ✔️ | ✔️ | ⌛ | ⌛ |
| Grid(N,M) | 💡 | 💡 | 💡 | 💡 | 💡 |
| Torus(N,M) | 💡 | 💡 | 💡 | 💡 | 💡 |
| hypercube(N) | 💡 | 💡 | 💡 | 💡 | 💡 |
|Refs. | ✔️ done and tested | ✅ done but untested |⌛ under construction |💡 potential feature|
How to Configure The configuration file allows the following to be specified:-
EQNUMBER:
{0,1}indexes one of the ODEs described below. Currently0for 1D linear and1for Noiseless Kuramoto. -
SOLVER:
{0,1}indexes the solver.0for the Euler method and1for Runge Kutta. -
SOLVERDEPTH:
{1,2,3,4}is the depth used in Euler's method. A depth of i with i>1 requires the (i-1)-th derivative of the Equation's field to be implemented. -
K1, K2, K3, K4:
[0,1]are the weights to apply to each of the Runge Kutta terms. -
TOPOLOGY:
{0,1,2,3}indexes the topology. Currently0is a ring,1is a Clique,2is Erdos-Renyi, and3is Small-World. The latter currently has its probability p fixed at compilation. -
NRUNS:
0-infdefines the number of iterations to perform for the test that can be accessed through the flag TEST=2. -
NNODES:
P*NT*2 - infdefines the number of total nodes to use. A pathological lower bound can be PNT2, which means two times the number of processors times the number of threads per processor. -
TEST:
{-1,1,2,3}is the running mode, see below. -
SEED:
any intis the seed to use during the entire simulation. -
kneigh:
0-infdefines the number of neighbors to which connect if building a Small-World graph. -
A,B:
[0,1]define the proba to initialize the ScaleFree graph. -
J,WMIN,WMAX
doubledefine the (constant) coupling strength for kuramoto, and the min & max bounds for uniformly sampling the natural frequency of each node. -
proba:
[0,1]defines the probability used in the relevant constructors, currently Erdos-Renyi and Small-World. -
OMP_THREAD_LIMIT:
3-infis the maximum number of threads allowed per processor. At least three are required by our current division of tasks which is thread-id dependant. -
OMP_NESTED:
trueis a flag for OpenMP and it's required to betrue. -
np is the number of processors defined to mpirun, where the flag
-oversubscribeallows to use more than the actual number of threads when ran locally in a laptop. -
SAMPLING_FREQ:
{1,...,NRUNS}is the number of iterations to wait between recording the state of the system in a .dot file that can be later used for both graphical plotting and simple value-access.
-
Write your own initial condition
-
Write your own equation
-
Write your own Graph Topology
-
run.shjust runs the program in whichever mode was specified in the configuration file -
run_debugxterm.shruns with gdb and displays each processor in a different console -
run_pipe.shruns and pipes the output to a txt file -
run_valgrind.shruns and produces a valgrind report -
run_time.shruns nonverbose and computes the execution time
-1 - Produces a simulation of length NRUNS and samples the node values at SAMPLING_FREQ
0 - Visually inspect node and edge values at initialization
1 - Visually inspect node and edge values after "a few" iterations (currently fixed at 3).
2 - Visually inspect node and edge values at both initialization and after several configurable (NRUNS) iterations. It also verifies the probability of errors, e.g. verification of 10k iterations with 100 threads and no segmentation fault.