-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hello, I'm trying to run tests for the library with MPI on a cluster.
Running python runtests.py --single --pdb --capture=no (this happens also for multiple ranks), when testing nbkit I get this error:
build/testenv/lib/python3.8/site-packages/fastpm/tests/test_nbkit.py F
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> captured log >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DEBUG h5py._conv:__init__.py:47 Creating converter from 7 to 5
DEBUG h5py._conv:__init__.py:47 Creating converter from 5 to 7
DEBUG h5py._conv:__init__.py:47 Creating converter from 7 to 5
DEBUG h5py._conv:__init__.py:47 Creating converter from 5 to 7
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
size = 1, args = (), comm = <mpi4py.MPI.Intracomm object at 0x7f55aa7f8350>
color = 0
@pytest.mark.parametrize("size", sizes)
def wrapped(size, *args):
func_names = MPI.COMM_WORLD.allgather(func.__name__)
if not all(func_names[0] == i for i in func_names):
raise RuntimeError("function calls mismatched", func_names)
try:
comm, color = create_comm(size)
except WorldTooSmall:
return pytest.skip("Test skipped because world is too small. Include the test with mpirun -n %d" % (size))
try:
if color == 0:
> rt = func(*args, comm=comm)
/home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/runtests/mpi/tester.py:139:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/mrigo/.local/lib/python3.8/site-packages/numpy/testing/_private/decorators.py:171: in skipper_func
return f(*args, **kwargs)
/home/mrigo/LDLproject/fastpm-python/build/testenv/lib/python3.8/site-packages/fastpm/tests/test_nbkit.py:24: in test_nbkit
sim = FastPMCatalogSource(linear, boost=2, Nsteps=5, cosmo=cosmo)
/home/mrigo/LDLproject/fastpm-python/build/testenv/lib/python3.8/site-packages/fastpm/nbkit.py:35: in __init__
dlin = self.linear.to_field(mode='complex')
/home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/nbodykit/base/mesh.py:233: in to_field
complex = self.to_complex_field()
/home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/nbodykit/source/mesh/linear.py:91: in to_complex_field
complex.apply(filter)
/home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/pmesh/pm.py:1070: in apply
return Field.apply(self, func, kind, out)
/home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/pmesh/pm.py:642: in apply
oslab[...] = func(k, islab)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
k = [array([[0.]], dtype=float32), array([[ 0. ],
[ 0.02454369],
[ 0.04908739],
[ 0.07363108],... , 0.638136 , 0.66267973, 0.68722343, 0.7117671 ,
0.7363108 , 0.7608545 , -0.7853982 ]], dtype=float32)]
v = slab([[ 0. +0.0000000e+00j, -0.00179628+2.8299162e-02j,
0.00607932-2.7621517e-02j, ..., 0.00118724+1.5......, 0.00075459-1.3397790e-03j,
-0.00127713+5.8607967e-04j, -0.00046806+6.1795174e-04j]],
dtype=complex64)
def filter(k, v):
> mask = numpy.bitwise_and.reduce([ki == 0 for ki in k])
E ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3,) + inhomogeneous part.
/home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/nbodykit/source/mesh/linear.py:87: ValueError
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/mrigo/miniconda/envs/LDLenv/lib/python3.8/site-packages/nbodykit/source/mesh/linear.py(87)filter()
-> mask = numpy.bitwise_and.reduce([ki == 0 for ki in k])
(Pdb)
Does anybody have an idea why this happens?
Metadata
Metadata
Assignees
Labels
No labels