Source code

Source code of slasi module for simulations consists of the next files:

  • alltypes.h: definition of structures and global variables used in all another files.
  • clargs.c/clargs.h: processing of command-line arguments.
  • constants.h: some constants.
  • fields.c/fields.h: functions for magnetic field processing: initialization (reducing field parameters) and calculation of field for given time and coordinate.
  • integration.c/integration.h: initialization of spin distribution in lattice and calculating derivatives for integration process.
  • main.c: contains function main() and functions for reducing variables and geometry processing.
  • mem.c/mem_operations.h: a few functions for allocating memory.
  • platformspec.c/platformspec.h: currently not used.
  • readdata.c/readdata.h: processing of configuration file.
  • runge.c/runge.h: modified Runge—Kutta—Fehlberg scheme of 4—5 order for integration.
  • Makefile: typical script for compilation.

For compilation MPI library is needed. Compiler is defined in variable COMPILER inside Makefile. For example, for OpenMPI it is mpicc. After editing of Makefile compilation process is easy:

$ make -jN

where N is a number of parallel threads of compilation (usually it is number of processors +1, but do not use more than 3 for avoiding errors). It results in binary file slasi.

Typical parallel calculation start with configuration file named observe.inp reads

$ mpirun -np 4 ./slasi observe.inp -n --no-verbose

Comments are closed.