Coverage for gpaw/test/parallel/test_scalapack_mpirecv_crash.py: 35%

20 statements  

« prev     ^ index     » next       coverage.py v7.7.1, created at 2025-07-20 00:19 +0000

1# *** An error occurred in MPI_Recv 

2# *** on communicator MPI COMMUNICATOR 36 DUP FROM 28 

3# *** MPI_ERR_TRUNCATE: message truncated 

4# *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort) 

5 

6# works with 'sl_default': (2, 2, 32) 

7 

8import pytest 

9from gpaw.mpi import world 

10from ase.build import fcc100, add_adsorbate 

11from gpaw import GPAW, ConvergenceError 

12from gpaw.utilities import compiled_with_sl 

13 

14pytestmark = pytest.mark.skipif(world.size != 4, 

15 reason='world.size != 4') 

16 

17 

18def test_parallel_scalapack_mpirecv_crash(): 

19 assert world.size == 4 

20 

21 slab = fcc100('Cu', size=(2, 2, 4)) 

22 add_adsorbate(slab, 'O', 1.1, 'hollow') 

23 slab.center(vacuum=3.0, axis=2) 

24 

25 kwargs = {} 

26 if compiled_with_sl(): 

27 kwargs['parallel'] = {'domain': (1, 1, 4), 'sl_default': (2, 2, 64)} 

28 

29 calc = GPAW(mode='lcao', 

30 kpts=(2, 2, 1), 

31 txt='-', 

32 maxiter=1, 

33 **kwargs) 

34 

35 slab.calc = calc 

36 try: 

37 slab.get_potential_energy() 

38 except ConvergenceError: 

39 pass