Comments (4)
There is the issue we discussed before that lines 120-133 should be indented. But you think there is another problem with line 132? It looks reasonable to me, asserting agreement of two methods for testing whether the processor has rank 0.
from simsopt.
I am talking about that one line of code.
I have one doubut about the statement assertEqual(m.proc0_world, rank_world == 0)
.
rank_world==0
could be True or False. If it evaluates to True, rank_world is 0, but now you are comparing m.proc0_world with binary True (or numerically 1). Am I missing something?
from simsopt.
Consider these 4 cases.
Case 1: The code works properly and the process has rank 0. Then m.proc0_world
is True and rank_world==0
is True. Since True==True
evaluates to True, the assertion passes, as it should.
Case 2: The code works properly and the process has rank >0. Then m.proc0_world
is False and rank_world==0
is False. Since False==False
evaluates to True, the assertion passes, as it should.
Case 3: Something has gone wrong, so m.proc0_world
is True but rank_world==0
is False. Since True==False
evaluates to False, the assertion fails, as it should.
Case 4: Something has gone wrong, so m.proc0_world
is False but rank_world==0
is True. Since False==True
evaluates to False, the assertion fails, as it should.
from simsopt.
from simsopt.
Related Issues (20)
- Scalar minimization problem interface, similar to least_squares_serial_solve
- Surface range option for half field period shifted by half a grid point HOT 1
- Error with MPI logging HOT 1
- graph_optimizable: when a parent is appended, children do not update
- Issues installing SIMSOPT HOT 3
- Update tutorial on coil optimization HOT 1
- System for saving and loading coil sets HOT 1
- matplotlib is an optional dependency so tests should be skipped when it is not installed
- fix_all() HOT 5
- Add `minor_radius()` and `major_radius()` function to `Surface` class HOT 2
- Sign problem in vmec_fieldlines HOT 4
- Make JAX an optional dependency HOT 1
- New changes on main branch necessitate MPI usage HOT 3
- Porting simsopt to ppc64 HOT 8
- setuptools_scm LookupError HOT 3
- Need help installing simsopt on Marconi HOT 5
- setuptools uppercap HOT 2
- "ImportError: cannot import name" after installing simsopt with conda HOT 4
- Support for FOCUS code HOT 1
- Building on Arch Linux in Anaconda HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simsopt.