Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel MC with OpenMP #625

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Parallel MC with OpenMP #625

wants to merge 4 commits into from

Conversation

MSallermann
Copy link
Member

Implemented Monte-Carlo method with OpenMP parallelization.

Moritz added 4 commits May 27, 2021 12:03
@MSallermann MSallermann changed the title Parallel MC OpenMP Parallel MC with OpenMP Feb 7, 2023
@GPMueller GPMueller self-requested a review February 13, 2023 15:33
Copy link
Member

@GPMueller GPMueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good to me

@@ -60,10 +61,74 @@ namespace Engine

// TODO: add switch between Metropolis and heat bath
// One Metropolis step
Metropolis(spins_old, spins_new);
Parallel_Metropolis(spins_old, spins_new);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the parallel implementation slower than the sequential version, when running on a single thread?

  • If so, it may make sense to be able to switch between them either dynamically (depending on omp_num_threads) or statically #ifdef SPIRIT_USE_OPENMP
  • Otherwise, it would make sense to completely replace the Metropolis implementation, right? Then there would also be no need to call it Parallel_Metropolis.

// Metropolis iteration with adaptive cone radius
void Metropolis(const vectorfield & spins_old, vectorfield & spins_new);
// Parallel MC
void Parallel_Metropolis(const vectorfield & spins_old, vectorfield & spins_new);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a reference on the implementation (even though you didn't use it as a basis), you could reference David Bauer's diploma thesis, here or in the class comment

@muellan muellan force-pushed the develop branch 9 times, most recently from 63fbd74 to 2edff73 Compare June 7, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants