Skip to content

Conversation

rozyczko
Copy link
Member

We throw on creating a new map vertex if the parameter has the same unique name.
This makes sense when a typical job is being run.
However, in a multiprocessing environment, we can't guarantee this behaviour, especially considering the global_object is a singleton and will be the same across the CPU pool.
One solution would be to allow multiple copies of global_object in MPI, but this seems a complex and error prone (at least at the moment). The alternative is to modify the unique name if it clashes with one in the map.

This is what I am proposing here.

@rozyczko rozyczko added [area] global_object Anything related to the global_object [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) [priority] high Should be prioritized soon labels Sep 18, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['chore', 'fix', 'bugfix', 'bug', 'enhancement', 'feature', 'dependencies', 'documentation']

@rozyczko rozyczko added the chore PR label label Sep 18, 2025
@henrikjacobsenfys
Copy link
Member

henrikjacobsenfys commented Sep 19, 2025

It seems like this risks renaming unique names which may be problematic for dependent Parameters? I.e. imagine I've made a Parameter a somewhere:
`a=Parameter(name='a',unique_name='par1',value=1)

And then later (perhaps in a different file) want to make a Parameter c which depends on b

b=Parameter(name='b',unique_name='par1',value=2)
c=Parameter(name='c',value=1)
c.make_dependent_on('2*"par1"')

Previously, this would throw an error, and I would know that I had messed up. Now it changes the unique name of b to par1_1 and makes c dependent on a instead. Unless I know exactly how c should behave, I'm in trouble. Granted, it's my own fault for 1) setting the unique_name explicitly and 2) not realising I've used the same unique_name twice, but wanted to at least mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[area] global_object Anything related to the global_object chore PR label [priority] high Should be prioritized soon [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants