Running the Code - vivi235711/gamer GitHub Wiki
This page covers the following topics:
It is highly recommended that you first follow the demos given in Quick Start.
To run the code in a serial mode (i.e., no MPI and OpenMP), follow the steps below:
-
Compile the code (See Installation for details)
- Set
CXXin the configuration file to a serial compiler (e.g.,g++oricpc) - Set the following arguments when generating
Makefile: - Recompile the code by
make clean; make
- Set
-
Set the runtime parameters (see Runtime Parameters for details)
- Put the required input files (e.g.,
Input__Parameter) in the same directory as the executablegamer - Set parameters properly
- Put the required input files (e.g.,
-
Launch the code
./gamer
-
Check the outputs
Further readings:
To restart a simulation from a snapshot (e.g., Data_000123),
do the following steps:
- Set OPT__INIT=2
- Create a soft link named
RESTARTto a targeted snapshot:ln -s Data_000123 RESTART - Run the code as usual
Note
Many runtime parameters can be changed during restart (e.g., number of MPI processes and OpenMP threads, maximum refinement level, refinement criteria, time-step criteria). The next data dump ID will be automatically set to the ID of the restart file plus one (unless specified by INIT_DUMPID).
Typically, a simulation ends when reaching either
END_T
or
END_STEP.
One can also forcibly terminate a simulation by creating a file named
STOP_GAMER_STOP (e.g., using touch STOP_GAMER_STOP) in the same
directory as the executable gamer. The program will check the existence
of this file after every root-level update. If it is detected, the
program will output the final data (assuming at least one of the output options
described in Outputs is enabled), delete the file STOP_GAMER_STOP,
and then be terminated. Note that this functionality is supported only
when the runtime parameter
OPT__MANUAL_CONTROL
is on.
Similarly, one can create a file named PAUSE_GAMER_PAUSE to pause a simulation.
To resume it, simply delete this file.
One can put simulation notes in a text file named Input__Note. The content
of this file will be automatically copied to the top of the log file
Record__Note during code initialization. For example,
cat Input__NoteExecution results
~ PUT YOUR SIMULATION NOTES HERE ~
./gamer
head Record__NoteExecution results
Simulation Note *********************************************************************************** ~ PUT YOUR SIMULATION NOTES HERE ~ ***********************************************************************************