I would like to automate detection of an MPI library under Windows 10/11 via a script.
So far the only options would be MPICH2 or MS-MPI, so I'd like to:
- Find an available installation (search for mpiexec.exe or spmd.exe)
For this, I'm currently running
# where mpiexec
C:\Program Files\Microsoft MPI\Bin\mpiexec.exe
and I can search for "Microsoft MPI" or "MPICH2" in the path string, but that's certainly not a general approach.
- Detect the available number of CPUs on the local machine.
Is the following command general?
mpiexec -n *
Thanks of any help