Open etatara opened 8 months ago
Some unit tests are not passing in Windows
FAILED (errors=1)
Traceback (most recent call last):
File "L:\repast4py\tests\ctopo_tests.py", line 81, in test_local_bounds_4x2_sticky
comm = MPI.COMM_WORLD.Create_group(new_group)
File "mpi4py\MPI\Comm.pyx", line 186, in mpi4py.MPI.Comm.Create_group
NotImplementedError
FAILED (errors=1)
The Microsoft MPI implementation may not be complete or standardized relative to the latest MPICH.
Trying the Intel One API Tookit:
https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html#gs.5kou46
Getting errors with the Intel MPI built with MSVC on my Windows machine.
https://stackoverflow.com/questions/29264640/mpiexec-and-python-mpi4py-gives-rank-0-and-size-1 https://pypi.org/project/mpi4py/#install
The mpi4py wheel from pypi is built against MSMPI. Repast4py needs to be built against the same MPI Implementation as mpi4py. Some of the MPI functions like MPI_Comm_create_group used by repast4py are not implemented in MSMPI, so mpi4py would need to be custom build against an appropriate MPI implementation such as openMPI or IntelMPI.
MPI_Comm_create_group() is only used in unit tests, so perhaps we can rewrite and use something like MPI_Comm_create() which appears to be nearly the same and does work with MSMPI.
With MSMPI and building repast4py on Windows 10, all unit single process tests pass using
python -m unittest discover tests
with torch==2.1.0
Replacing MPI.COMM_WORLD.Create_group() with MPI.COMM_WORLD.Create() in the unit test code almost all (except one) multiprocess unit tests are passing with MSMPI on Windows 10. 002ad94
The windows_build branch is passing all tests and the ci-build workflow is producing Windows wheels that have been manually tested. Move to close this issue and merge windows_build into develop after the next code review.
Trying to compile on Windows 10 without WSL.
Development environment:
To run the repast4py setup.py:
where cl
to find the full path of the compiler, and then set the 'CC' environment variable, e.g.set CC="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe"
python setup.py build_ext --inplace
python -m build --wheel