MPI parallelized simulation of the two-flavor Schwinger Model with degenerate fermions. The simulation is performed using pseudofermions, HMC and conjugate gradient to invert
The code implements Wilson fermions
where
To compile create a new folder
mkdir build
In the build folder run the following commands:
cmake ../
cmake --build .
This will create an executable SM_NSxNT. The lattice dimensions are fixed in the CMakeLists.txt.
You can change the dimensions there as well as the executable name.
The simulation is executed as follows:
mpirun -n #cores SM_NSxNT
----------------------------
| Two-flavor Schwinger model |
| Hybrid Monte Carlo simulation |
----------------------------
Nx NS Nt NT
ranks_x: number of processes on the x direction
ranks_t: number of processes on the t direction
m0: 0
Molecular dynamics steps: 10
Trajectory length: 1
beta: 2
Thermalization: 1000
Measurements: 1000
Step (sweeps between measurements): 10
Save configurations yes/no (1 or 0): 1
-
ranks_x(ranks_t) is the number of cores assigned to the$x$ -direction ($t$ -direction). The total number of cores (#cores) isranks_xxranks_t. The program requires that$N_x$ ($N_t$ ) is exactly divisible byranks_x(ranks_t). This is done to balance the workload, since each core deals with exactly$N_x\cdot N_t/$ (ranks_x ranks_t) lattice sites. -
$m_0$ is the bare mass parameter. The critical values were determined in [N. Christian, K. Jansen, K. Nagai and B. Pollakowski. “Scaling test of the fermion actions in the Schwinger Model”, Nucl. Phys. B, 739, (2006)] for different values of$\beta$ (see the table below). For$m_0<-m_{crit}$ the simulations are non-physical. Close to$m_{crit}$ the Dirac operator becomes highly ill-conditioned.
| 1 | 0.3204(7) |
| 2 | 0.1968(9) |
| 3 | 0.1351(2) |
| 4 | 0.1033(1) |
| 5 | 0.0840(1) |
| 6 | 0.0719(1) |
- Molecular dynamics steps: Number of steps for the leapgrog integrator (integer number).
- Trajectory length: length of the integration trajectory (double number).
Both the MD steps and the trajectory length have to be manually tuned to obtain an acceptance rate between
-
$\beta$ : inverse gauge coupling. The continuum limit is obtained when$\beta\rightarrow \infty$ . - Thermalization: number of configurations discarded for thermalizing the system.
- Measurements: number of configurations used for taking measurements. If save_conf = 1, this is the number of confs that are written to disk after thermalization. For save_conf = 0 no confs are stored, which is useful for testing purposes.
- Steps (sweep between measurements): number of configurations discarded between each measurement. This is done to decorrelate the configurations.
Configurations are stored in a binary format. To convert them to human readable text compile and run readBinConf.cpp
We provide a simple bash script (run.sh) to portray the compilation and execution of the simulation.
The instructions are essentially the same. The CMakeLists.txt only needs the address of your C++ and C compiler on lines 4 and 5.
Then, in the build folder, run the following commands:
cmake -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=C:\msys64\ucrt64\bin\g++ -DCMAKE_C_COMPILER=C:\msys64\ucrt64\bin\gcc ../
This command depends on the compiler you are using. In this case, we are using MinGW. If you are using another compiler
you have to change the -G flag. The -DCMAKE_CXX_COMPILER and -DCMAKE_C_COMPILER flags are the address of the compiler.
Then you can run the executable
SM_NSxNT.exe