|
if max_mem < mem*alpha: |
|
return int(mem*alpha)//int(max_mem), Nq |
|
else: |
|
return 1, int(Nq*mem*alpha/(max_mem)) |
Expected Behavior:
Return optimal partitioning of Nq and Nframes for each MPI task, based on the memory available to each MPI rank.
Problem:
For small supercells (small Nq, Natoms), evaluation of memory requirements can be less than one, resulting in invalid partitioning.
int(max_mem)=0 if max_mem less than 1 byte --> divide by 0 error on line 63 in utils.py
Note:
(line 65 does not have a similar problem for large cells (max_mem-->inf), due to safeguard in lines 97-99 in signals.py)
Fix:
utils.py line 63:
OLD: return int(max_mem)
Recommended FIX: return max(1,int(max_mem)
VVCORElib/VVCORElib_mpi/utils.py
Lines 62 to 65 in cf66ab0
Expected Behavior:
Return optimal partitioning of Nq and Nframes for each MPI task, based on the memory available to each MPI rank.
Problem:
For small supercells (small Nq, Natoms), evaluation of memory requirements can be less than one, resulting in invalid partitioning.
int(max_mem)=0 if max_mem less than 1 byte --> divide by 0 error on line 63 in utils.py
Note:
(line 65 does not have a similar problem for large cells (max_mem-->inf), due to safeguard in lines 97-99 in signals.py)
Fix:
utils.py line 63:
OLD: return int(max_mem)
Recommended FIX: return max(1,int(max_mem)