Comments (1)
Hi Gonçalo!
Great question. In fact in our old (now deprecated) SENR code (https://bitbucket.org/zach_etienne/nrpy/src/master/; which didn't have reference metric precomputation [rfm_precompute]) I indeed found that moving the OMP pragma from the i2 loop to the i1 or i0 loops did improve the performance. However, as a warning it wasn't an earth-shattering performance boost! In other words it might be the case that the compiler/OpenMP is being cleverer than we think about parallelizing the outermost loop, or we're just not scaling as well as we hope.
I've had a few ideas that could be tried with the current version of NRPy+, I think the top one should be tried first in fact (though I'm split on whether 2 or 3 should be next):
- Disable rfm_precompute and benchmark the performance with the omp pragma hand placed both in the outer loop and the inner loops. What is the speedup when we move to the inner loops? If it's <10% for example, then we might want to rethink proceeding further.
- Create an option to permute the spherical or cylindrical coordinates. Other than in some diagnostics, there should be no hard-coded assumption that e.g., spherical is (xx0,xx1,xx2)=(r,theta,phi), instead of (xx0,xx1,xx2)=(theta,phi,r); notice the latter is also a right-handed coordinate system. A spherical coordinate system with such permuted coordinates may scale far better in OpenMP loops.
- Fix the problem you are seeing with rfm_precompute. I think it may be possible to simply move the pragma from just before the i2 for() statement to just before the i1 for() statement by hand if necessary. If that works, we could add an option to loop.py to specify the placement of the #pragma omp parallel.
from nrpytutorial.
Related Issues (8)
- Atmosphere improperly set with rhostar fix in IllinoisGRMHD (typo) HOT 1
- ranges over which to loop HOT 1
- Feature request: number of orbits and time to merger in NRPyPN HOT 3
- nrpyplus Tutorial notebook start-to-Finish Example: Scalar Field Collapse tries to download ffmpeg from old link HOT 1
- Tutorial notebook fails at installing ffmpeg.
- Why can't i open blackholesathome.net from Russia? HOT 11
- One error happens when using cmdline_helper. HOT 5
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 nrpytutorial.