-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Quadtree is not splitting blocks as I would expect
When running with dipole4 and sphere, the quadtree sees that it needs to split the geographic grid, as expected. But then it also divides the magnetic grid into 4ths, leading to the magnetic grid only covering 1/4 of the globe.
from init_parallel
[...]
int64_t nProcsPerNode = nGrids / quadtree.nRootNodes;
quadtree.max_depth = round(log(nProcsPerNode) / log(4));
quadtree_ion.max_depth = round(log(nProcsPerNode) / log(4));
// Check to see if we have enough processors to do this stuff:
int nBlocksLonGeo = pow(2, quadtree.max_depth); // input.get_nBlocksLonGeo();
int nBlocksLatGeo = pow(2, quadtree.max_depth); // input.get_nBlocksLatGeo();
nGrids = nBlocksLonGeo * nBlocksLatGeo * quadtree.nRootNodes;
int nProcsNeeded = nMembers * nGrids;
if (nProcsNeeded == nProcs) {
// Get Ensemble member number and grid number:
iMember = iProc / nGrids;
iGrid = iProc % nGrids;
[...]
quadtree.build("neuGrid");
quadtree_ion.build("ionGrid");
} else {
if (iProc == 0) {
std::cout << "Number of processors needed is not set correctly!\n";It appears that we only check the geographic grid to determine if blocks need to be split. I can imagine a solution where we either:
- Check both the geographic and magnetic grids, or
- close the dipole 4/6 options off from the user and just pick which one is most appropriate. Or,
- something else?
Quick fix:
This needed quick attention, so I put in a hacky solution. I put in a "Sphere4" with the same structure as "Dipole4". That's 4 blocks in latitude, with one longitudinal block.
SO this isn't too urgent, but might need some attention eventually...
my commit: d64be6b
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working