Whenever using Auryn you will be required to place the following code in your main program, which initializes the global objects
// BEGIN Auryn Init mpi::environment env(ac, av); mpi::communicator world; communicator = &world; logger = new Logger(logfile,world.rank()); sys = new System(&world); // END Auryn Init
where I assumed that the string logfile
was declared before and should for clarity reasons point to a file with file extension log
. This snipped of init code frist sets up the Boost MPI libraries and namely the communicator under the global handle world
. It then creates the logger
of type Logger and then initializes the global variable sys
of type System. The two objects manage the interactions of all Auryn objects which are defined consequently. They are therefore required to exist under the names logger
and sys
before any of the simulator code is run.