cortix_main

class cortix_main.Cortix(use_mpi=False, splash=False)[source]

Bases: object

Cortix main class definition.

The typical Cortix run file workflow:

  1. Create the Cortix object
  2. Create tne (nested) network of modules
  3. Run and close Cortix
__del__()[source]

Destructs a Cortix simulation object.

Warning

By the time the body of this function is executed, the machinery of variables may have been deleted already. For example, logging is no longer there; do the least amount of work here.

__init__(use_mpi=False, splash=False)[source]

Construct a Cortix simulation object.

Parameters:
  • use_mpi (bool) – True for MPI, False for multiprocessing.
  • splash (bool) – Show the Cortix splash image.
network

Network – A network of modules and their connectivity.

use_mpi

boolTrue for MPI, False for Multiprocessing.

use_multiprocessing

boolFalse for MPI, True for Multiprocessing.

splash

bool – Show the Cortix splash image.

comm

mpi4py.MPI.Intracomm – MPI.COMM_WORLD (if using MPI else None).

rank

int – The current MPI rank (if using MPI else None).

size

int – size of the group associated with MPI.COMM_WORLD.

close()[source]

Closes the cortix object properly before destruction.

User is strongly advised to call this method at the end of the run file otherwise timings will not be recorded.

network
run()[source]

Run the Cortix network simulation.