cortix_main

class cortix_main.Cortix(use_mpi=False, splash=False, log_filename='cortix')[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, log_filename='cortix')[source]

Construct a Cortix simulation object.

Parameters
  • use_mpi (bool) – True for MPI, False for multiprocessing.

  • splash (bool) – Show the Cortix splash image.

network

A network of modules and their connectivity.

Type

Network

use_mpi

True for MPI, False for Multiprocessing.

Type

bool

use_multiprocessing

False for MPI, True for Multiprocessing.

Type

bool

splash

Show the Cortix splash image.

Type

bool

comm

MPI.COMM_WORLD (if using MPI else None).

Type

mpi4py.MPI.Intracomm

rank

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

Type

int

size

size of the group associated with MPI.COMM_WORLD.

Type

int

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(save=False)[source]

Run the Cortix network simulation.