Skip to content

Parallel MC with OpenMP#625

Open
MSallermann wants to merge 4 commits into
developfrom
parallel_mc
Open

Parallel MC with OpenMP#625
MSallermann wants to merge 4 commits into
developfrom
parallel_mc

Conversation

@MSallermann
Copy link
Copy Markdown
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
Copy Markdown
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

// TODO: add switch between Metropolis and heat bath
// One Metropolis step
Metropolis(spins_old, spins_new);
Parallel_Metropolis(spins_old, spins_new);
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants