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

Differentiation logger printing duplicates with MPI #17

Open
epaillas opened this issue Aug 18, 2023 · 1 comment
Open

Differentiation logger printing duplicates with MPI #17

epaillas opened this issue Aug 18, 2023 · 1 comment

Comments

@epaillas
Copy link

I'm running some BAO chains using emcee with multiple MPI processes. Some parameters are analytically marginalized over, and the logger is printing this line for every MPI process

[000008.12] [ 24/128] 08-18 10:55 Differentiation INFO Varied parameters: ['al0_-3', 'al0_-2', 'al0_-1', 'al0_0', 'al0_1', 'al2_-3', 'al2_-2', 'al2_-1', 'al2_0', 'al2_1']

I'm guessing the mesage is coming from

self.log_info('Varied parameters: {}.'.format(self.varied_params.names()))

which is supposed to only print it for the root process. Not sure why the logger is bypassing this conditional...

@adematti
Copy link
Member

adematti commented Sep 8, 2023

Hi, this is because when performing sampling, likelihood evaluations are distributed over MPI processes. Every process get to execute that differentiation part independently on a COMM_SELF (of size 1, so mpicomm.rank is always 0). Would you prefer this not to happen, or were you just wondering why this happened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants