



if not exist %LIBRARY_BIN%\\mpiexec.exe exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not exist %LIBRARY_BIN%\\smpd.exe exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not exist %LIBRARY_BIN%\\msmpi.dll exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not exist %LIBRARY_INC%\\mpi.f90 exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not exist %LIBRARY_INC%\\mpi.h exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not exist %LIBRARY_LIB%\\msmpi.lib exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not exist %LIBRARY_LIB%\\mpifort.lib exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not %MSMPI_BIN% == %LIBRARY_BIN% exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not %MSMPI_INC% == %LIBRARY_INC% exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not %MSMPI_LIB64% == %LIBRARY_LIB% exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
where mpiexec.exe
IF %ERRORLEVEL% NEQ 0 exit /B 1
where smpd.exe
IF %ERRORLEVEL% NEQ 0 exit /B 1
mpiexec.exe /help2
IF %ERRORLEVEL% NEQ 0 exit /B 1
mpiexec.exe /help3
IF %ERRORLEVEL% NEQ 0 exit /B 1
cl.exe -I%LIBRARY_INC% tests\\get_mpi_ver.c /Fe"%cd%\get_mpi_ver.exe"
IF %ERRORLEVEL% NEQ 0 exit /B 1
for /f "tokens=* usebackq" %%f in (`get_mpi_ver`) do (set "mpi_ver=%%f")
IF %ERRORLEVEL% NEQ 0 exit /B 1
if not %mpi_ver% == 2561 exit 1
IF %ERRORLEVEL% NEQ 0 exit /B 1
cl.exe -I%LIBRARY_INC% tests\\helloworld.c /Fe"%cd%\helloworld.exe" /link /LIBPATH:"%LIBRARY_LIB%" msmpi.lib
IF %ERRORLEVEL% NEQ 0 exit /B 1
mpiexec.exe -n 4 helloworld.exe
IF %ERRORLEVEL% NEQ 0 exit /B 1
exit /B 0
