Temporary arrays on large grids -> seg-fault
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Siesta |
Fix Released
|
Medium
|
Nick Papior | ||
4.0 |
Fix Released
|
Medium
|
Nick Papior | ||
4.1 |
Fix Released
|
Medium
|
Nick Papior | ||
libGridXC |
Fix Released
|
Undecided
|
Nick Papior |
Bug Description
In certain calculations when the mesh-grid is extensively big a seg-fault will occur.
By tracking down it happens here:
do iPart = 1,nParts
partSize = sizeSum(iPart) - sizeSum(iPart-1)
end do ! iPart
(line 2617 of mesh3d.F90)
It is because the reshape creates a temporary array upon copy.
If all processors hit this point at the same time (unlikely, but may occur), the mesh grid will be duplicated which may turn out to be too much memory.
I think that all array assignments should be made into explicit loops to circumvent possible array-temporaries.
Related branches
- Alberto Garcia: Approve
-
Diff: 1476 lines (+1102/-75)8 files modifiedsrc/array.F90 (+974/-0)
src/gridxc.F90 (+2/-0)
src/makefile (+39/-24)
src/mesh3d.F90 (+46/-35)
src/moreParallelSubs.F90 (+38/-13)
src/sorting.f (+1/-1)
src/xcmod.F90 (+1/-1)
version.info (+1/-1)
Changed in libgridxc: | |
assignee: | nobody → Nick Papior (nickpapior) |
Changed in siesta: | |
assignee: | nobody → Nick Papior (nickpapior) |
importance: | Undecided → Medium |
status: | New → In Progress |
milestone: | none → 4.0.1 |
Changed in siesta: | |
status: | In Progress → Fix Committed |
Changed in libgridxc: | |
status: | New → Fix Committed |
Changed in siesta: | |
status: | Fix Committed → Fix Released |
A fix was released with libgridxc-0.7.1