Finished review. The only point left is in results line 105, where I added a comment.
This commit is contained in:
parent
a0d3a39d07
commit
5df0a2411b
@ -9,7 +9,7 @@ MRI machines to produce detailed anatomical images.
|
|||||||
|
|
||||||
Magnetic materials care classified based on their specific magnetic behavior,
|
Magnetic materials care classified based on their specific magnetic behavior,
|
||||||
and one of the groups consists of ferromagnetic materials. These materials are
|
and one of the groups consists of ferromagnetic materials. These materials are
|
||||||
easily magnetized, and when exposed to a strong magnetic field they can become
|
easily magnetized, and when exposed to a strong magnetic field, they become
|
||||||
saturated. In addition, when these materials are heated to a critical point, they
|
saturated. In addition, when these materials are heated to a critical point, they
|
||||||
lose their magnetic property \cite{britannica:2023:ferromagnetism}.
|
lose their magnetic property \cite{britannica:2023:ferromagnetism}.
|
||||||
|
|
||||||
|
|||||||
@ -241,8 +241,8 @@ states can be reached at every current state, whereas detailed balance implies n
|
|||||||
net flux of probability. To satisfy these criteria we use the Metropolis-Hastings
|
net flux of probability. To satisfy these criteria we use the Metropolis-Hastings
|
||||||
algorithm, found in Algorithm \ref{algo:metropolis}, to generate samples of microstates.
|
algorithm, found in Algorithm \ref{algo:metropolis}, to generate samples of microstates.
|
||||||
|
|
||||||
One Monte Carlo cycle consist of changing the initial configuration of the lattice,
|
One Monte Carlo cycle consists of $N$ attempted spin flips. When a spin is flipped,
|
||||||
by randomly flipping a spin. When a spin is flipped, the change in energy is evaluated as
|
the change in energy is evaluated as
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
\Delta E &= E_{\text{after}} - E_{\text{before}} \ ,
|
\Delta E &= E_{\text{after}} - E_{\text{before}} \ ,
|
||||||
\end{align*}
|
\end{align*}
|
||||||
@ -287,15 +287,15 @@ will tend toward the actual probability distribution of the system.
|
|||||||
|
|
||||||
\subsection{Implementation and testing}\label{subsec:implementation_test}
|
\subsection{Implementation and testing}\label{subsec:implementation_test}
|
||||||
We implemented a test suite, and compared the numerical estimates to the analytical
|
We implemented a test suite, and compared the numerical estimates to the analytical
|
||||||
results from Section \ref{subsec:statistical_mechanics}. In addition, we set a tolerance to
|
results from Section \ref{subsec:statistical_mechanics}. In addition, we set a
|
||||||
verify convergence, and a maximum number of Monte Carlo cycles to avoid longer
|
tolerance to verify convergence, and a maximum number of Monte Carlo cycles to
|
||||||
runtimes during execution.
|
avoid potentially having the program run indefinitely.
|
||||||
|
|
||||||
We used a pattern to access all neighboring spins, where all indices of the neighboring
|
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
|
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
|
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 up, and the second column right and down. This method avoids the use of if-tests,
|
||||||
and takes advantage of the parallel optimization.
|
so we can take advantage of the compiler optimization.
|
||||||
|
|
||||||
We parallelized our code using both message passing interface (OpenMPI) and
|
We parallelized our code using both message passing interface (OpenMPI) and
|
||||||
multi-threading (OpenMP). First, we divided the temperatures into smaller sub-ranges,
|
multi-threading (OpenMP). First, we divided the temperatures into smaller sub-ranges,
|
||||||
|
|||||||
@ -94,7 +94,7 @@ point.
|
|||||||
\subsection{Phase transition}\label{subsec:phase_transition}
|
\subsection{Phase transition}\label{subsec:phase_transition}
|
||||||
% Phase transition figures
|
% Phase transition figures
|
||||||
We continued investigating the behavior of the system around the critical temperature.
|
We continued investigating the behavior of the system around the critical temperature.
|
||||||
First, we generated $10$ million samples of spin configurations for lattices of
|
First, we generated $10$ million samples of spin configurations, per temperature, for lattices of
|
||||||
size $L \in \{20, 40, 60, 80, 100\}$, and temperatures $T \in [2.1, 2.4]$. We divided the
|
size $L \in \{20, 40, 60, 80, 100\}$, and temperatures $T \in [2.1, 2.4]$. We divided the
|
||||||
temperature range into $40$ steps, with an equal step size of $0.0075$. The samples
|
temperature range into $40$ steps, with an equal step size of $0.0075$. The samples
|
||||||
were generated in parallel, where the program allocated $4$ sequential temperatures to $10$
|
were generated in parallel, where the program allocated $4$ sequential temperatures to $10$
|
||||||
@ -102,7 +102,7 @@ MPI processes. Each process was set to spawn $10$ threads, resulting in a total
|
|||||||
$100$ threads working in parallel. We include results for $1$ million MC cycles
|
$100$ threads working in parallel. We include results for $1$ million MC cycles
|
||||||
in Appendix \ref{sec:additional_results}
|
in Appendix \ref{sec:additional_results}
|
||||||
|
|
||||||
$\boldsymbol{Rewrite}$ We ran a profiler to make sure the program was fully optimized which found that the
|
$\boldsymbol{Rewrite}$ We used a profiler to make sure the program was fully optimized which found that the
|
||||||
workload was balanced, the threads was not left idle to long/not a lot of downtime.
|
workload was balanced, the threads was not left idle to long/not a lot of downtime.
|
||||||
|
|
||||||
In Figure \ref{fig:phase_energy_10M}, for the larger lattices we observe a sharper
|
In Figure \ref{fig:phase_energy_10M}, for the larger lattices we observe a sharper
|
||||||
|
|||||||
12
review.md
12
review.md
@ -22,7 +22,7 @@ Nothing
|
|||||||
|
|
||||||
[x] 10: "Magnetic materials can be classified" => "Magnetic materials are classified". I changed this, since they are actually classified
|
[x] 10: "Magnetic materials can be classified" => "Magnetic materials are classified". I changed this, since they are actually classified
|
||||||
[x] 11: consist => consists. "One of the groups" is singular.
|
[x] 11: consist => consists. "One of the groups" is singular.
|
||||||
[ ] 12: Is the saturation optional, or will they become saturated when exposed to a magnetic field?
|
[x] 12: Is the saturation optional, or will they become saturated when exposed to a magnetic field?
|
||||||
- janitaws: Valid point, they do become saturated so maybe rephrase
|
- janitaws: Valid point, they do become saturated so maybe rephrase
|
||||||
- coryab: Just remove "can", and put a comma after "field" and it should be good
|
- coryab: Just remove "can", and put a comma after "field" and it should be good
|
||||||
[x] 26: "as well as algorithms ..." => "as well as the algorithms ..."
|
[x] 26: "as well as algorithms ..." => "as well as the algorithms ..."
|
||||||
@ -56,9 +56,10 @@ I agree, it does make more sense
|
|||||||
[x] 240: detaild => detailed
|
[x] 240: detaild => detailed
|
||||||
[x] 241: criterias => criteria. the plural of criterion is criteria.
|
[x] 241: criterias => criteria. the plural of criterion is criteria.
|
||||||
[x] 242: Figure => Algorithm, since we can remove the figure environment enclosing the algorithm environment. More details are specified in the next comment below.
|
[x] 242: Figure => Algorithm, since we can remove the figure environment enclosing the algorithm environment. More details are specified in the next comment below.
|
||||||
[ ] 244: A Monte Carlo cycle consists of attempts of flipping a spin, and not a single attempt to flip a spin.
|
[x] 244: A Monte Carlo cycle consists of attempts of flipping a spin, and not a single attempt to flip a spin.
|
||||||
- janitaws: Not sure how to rephrase the sentence to make it correct, any specific suggestions?
|
- janitaws: Not sure how to rephrase the sentence to make it correct, any specific suggestions?
|
||||||
- coryab: It depends. If we want to describe a Monte Carlo cycle, then something like "One Monte Carlo cycle consists of $N$ attempted spin flips." would work. If we want to give a word to a single attempt at a spin flip, then maybe "A single iteration of the Metropolis-Hastings algorithm consists of attempting to flip a spin in the lattice chosen randomly."?
|
- coryab: It depends. If we want to describe a Monte Carlo cycle, then something like "One Monte Carlo cycle consists of $N$ attempted spin flips." would work. If we want to give a word to a single attempt at a spin flip, then maybe "A single iteration of the Metropolis-Hastings algorithm consists of attempting to flip a spin in the lattice chosen randomly."?
|
||||||
|
- janitaws: I think the first suggestion makes more sense, since the intention was to explain. I'll change it and mark it done.
|
||||||
[x] 261: Instead of having the algorithm inside a figure, you can use the H specifier in the algorithm environment (which you already do). You can read more about it [here](https://tex.stackexchange.com/questions/231191/algorithm-in-revtex4-1). I have already tested that it works, and it makes it so we can actually refer to it as an algorithm and not a figure.
|
[x] 261: Instead of having the algorithm inside a figure, you can use the H specifier in the algorithm environment (which you already do). You can read more about it [here](https://tex.stackexchange.com/questions/231191/algorithm-in-revtex4-1). I have already tested that it works, and it makes it so we can actually refer to it as an algorithm and not a figure.
|
||||||
- janitaws: This might have fallen through the cracks for me since I just copy-pasted from metropolis.tex
|
- janitaws: This might have fallen through the cracks for me since I just copy-pasted from metropolis.tex
|
||||||
- coryab: Yeah, now that I think about it, I copied this directly from the example which had this hacky solution. RevTex is honestly really bad imo.
|
- coryab: Yeah, now that I think about it, I copied this directly from the example which had this hacky solution. RevTex is honestly really bad imo.
|
||||||
@ -66,14 +67,14 @@ I agree, it does make more sense
|
|||||||
[x] 283: I changed the paragraph to include a better introduction of the concept burn-in time, do you think the "flow" is better now?
|
[x] 283: I changed the paragraph to include a better introduction of the concept burn-in time, do you think the "flow" is better now?
|
||||||
- coryab: Looks good!
|
- coryab: Looks good!
|
||||||
[x] 295: implementation => execution. Implementation is the writing of the code, while the runtime is during execution of the program. I would also say to avoid potentially having the program run endlessly.
|
[x] 295: implementation => execution. Implementation is the writing of the code, while the runtime is during execution of the program. I would also say to avoid potentially having the program run endlessly.
|
||||||
[ ] 292: Do you have a good way of including "I would also say to avoid potentially having the program run endlessly" in the sentence?
|
[x] 292: Do you have a good way of including "I would also say to avoid potentially having the program run endlessly" in the sentence?
|
||||||
- coryab: Replace the sentence with "In addition, we set a tolerance to verify convergence, and a maximum number of Monte Carlo cycles to avoid potentially having the program run indefinitely."?
|
- coryab: Replace the sentence with "In addition, we set a tolerance to verify convergence, and a maximum number of Monte Carlo cycles to avoid potentially having the program run indefinitely."?
|
||||||
[x] 297: Change of tense. We have used present tense for most of this section, so we should continue with that.
|
[x] 297: Change of tense. We have used present tense for most of this section, so we should continue with that.
|
||||||
- janitaws: Added this into a new point, since the line numbers have shifted now
|
- janitaws: Added this into a new point, since the line numbers have shifted now
|
||||||
- coryab: Ok, will mark this as OK.
|
- coryab: Ok, will mark this as OK.
|
||||||
[x] 294: So for the paragraph starting with "We used a pattern..." should be rewritten to present tense?
|
[x] 294: So for the paragraph starting with "We used a pattern..." should be rewritten to present tense?
|
||||||
- coryab: After reading it a bit better, it makes more sense to have the implementation part in past tense, so I'll mark it as OK.
|
- coryab: After reading it a bit better, it makes more sense to have the implementation part in past tense, so I'll mark it as OK.
|
||||||
[ ] 300: Lack of if-tests does not hinder parallelization, but it can hinder compiler optimizations.
|
[x] 300: Lack of if-tests does not hinder parallelization, but it can hinder compiler optimizations.
|
||||||
- janitaws: Suggested change "... avoids the use of if-tests, so we can take advantage of the compiler optimization."
|
- janitaws: Suggested change "... avoids the use of if-tests, so we can take advantage of the compiler optimization."
|
||||||
- coryab: Yes, that works great!
|
- coryab: Yes, that works great!
|
||||||
[x] 318: used => use. Keep to the present tense for consistency.
|
[x] 318: used => use. Keep to the present tense for consistency.
|
||||||
@ -91,7 +92,7 @@ I agree, it does make more sense
|
|||||||
- janitaws: I suggest we leave it out for now, I'll comment it out in case we want to use it
|
- janitaws: I suggest we leave it out for now, I'll comment it out in case we want to use it
|
||||||
- coryab: Sounds good! I'll leave this as undone for now until we decide fully on what to do.
|
- coryab: Sounds good! I'll leave this as undone for now until we decide fully on what to do.
|
||||||
[x] 89: onordered => unordered
|
[x] 89: onordered => unordered
|
||||||
[ ] 97: More accurately, we generated 10M samples per temperature point.
|
[x] 97: More accurately, we generated 10M samples per temperature point.
|
||||||
- janitaws: True, so "...$10$ million samples of spin configurations for lattices..." => "...$10$ million samples of spin configurations, per temperature, for lattices..."
|
- janitaws: True, so "...$10$ million samples of spin configurations for lattices..." => "...$10$ million samples of spin configurations, per temperature, for lattices..."
|
||||||
- coryab: That sounds good!
|
- coryab: That sounds good!
|
||||||
[x] 77: Approve change "Histogram $T = 1.0 J / k_{B}$" => "Distribution of values of energy per spin, when temperature is $T = 1.0 J / k_{B}$"
|
[x] 77: Approve change "Histogram $T = 1.0 J / k_{B}$" => "Distribution of values of energy per spin, when temperature is $T = 1.0 J / k_{B}$"
|
||||||
@ -102,6 +103,7 @@ I agree!
|
|||||||
[ ] 105: We used a profiler. And it's not just for ensuring load balance among threads, it's also for each process, and we use it to see that data transfer is minimal.
|
[ ] 105: We used a profiler. And it's not just for ensuring load balance among threads, it's also for each process, and we use it to see that data transfer is minimal.
|
||||||
- janitaws: So instead of "We ran a profiler" it should be "We used a profiler"? Could you suggest a way of formulating the sentence so that the info is correct?
|
- janitaws: So instead of "We ran a profiler" it should be "We used a profiler"? Could you suggest a way of formulating the sentence so that the info is correct?
|
||||||
- coryab: Yes to the first point. "To check if the parallelization was optimal, we used a profiler, which found that the program was efficient. The thing that scored slightly less was the MPI load balance, which is most likely because the master process gathered all data using blocking communication, which made the other processes wait, in addition to having one process work more."
|
- coryab: Yes to the first point. "To check if the parallelization was optimal, we used a profiler, which found that the program was efficient. The thing that scored slightly less was the MPI load balance, which is most likely because the master process gathered all data using blocking communication, which made the other processes wait, in addition to having one process work more."
|
||||||
|
- janitaws: If we simply state that the program was efficient we should include some sort of evidence supporting the statement, since the view of efficiency is subjective. Maybe we could include percentage here to support it, the profile gave a number right?
|
||||||
[ ] 106: was => were
|
[ ] 106: was => were
|
||||||
- janitaws: My previous comment might make this unnecessary?
|
- janitaws: My previous comment might make this unnecessary?
|
||||||
- coryab: If you use my suggestion, then this can be checked off at the same time.
|
- coryab: If you use my suggestion, then this can be checked off at the same time.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user