Updated method section.
This commit is contained in:
@@ -292,17 +292,21 @@ results from \ref{subsec:statistical_mechanics}. In addition, we set a tolerance
|
||||
verify convergence, and a maximum number of Monte Carlo cycles to avoid longer
|
||||
runtimes during implementation.
|
||||
|
||||
We avoid the overhead of if-tests, and take advantage of the parallelization, by
|
||||
defining a pattern to access all neighboring spins. Using a $L \times 2$ matrix,
|
||||
containing all indices to the neighbors, and pre-defined constants, we find the
|
||||
indices of the neighboring spins. The first column contains the indics for neighbors
|
||||
to the left and up, and the second column right and down.
|
||||
We used a pattern to access all neighboring spins, where all indices of the neighboring
|
||||
spins are put in an $L \times 2$ matrix. The indices are accessed using pre-defined
|
||||
constants, where the first column contain the indices for neighbors to the left
|
||||
and up, and the second column right and down. This method avoids the use of if-tests,
|
||||
and takes advantage of the parallel optimization.
|
||||
|
||||
We parallelize our code using both a message passing interface (OpenMPI) and
|
||||
multi-threading (OpenMP). First, we divide the temperatures into smaller ranges,
|
||||
and each MPI process receives a set of temperatures. Every MPI process spawn a
|
||||
set of threads, which initialize an Ising model and performs the Metropolis-Hastings
|
||||
algorithm.
|
||||
algorithm. We limit the number of times threads are spawned and joined, by using
|
||||
single parallel regions, reducing parallel overhead. We used Fox \footnote{Technical
|
||||
specifications for Fox can be found at \url{https://www.uio.no/english/services/it/research/platforms/edu-research/help/fox/system-overview.md}},
|
||||
a high-performance computing cluster, to run our program.
|
||||
|
||||
|
||||
|
||||
\subsection{Tools}\label{subsec:tools}
|
||||
|
||||
Reference in New Issue
Block a user