Skip to content

Latest commit

 

History

History
147 lines (103 loc) · 3.78 KB

File metadata and controls

147 lines (103 loc) · 3.78 KB

Windows Setup Guide for Distributed Computing Framework

Prerequisites Installation

Step 1: Install Microsoft MPI

Microsoft MPI (MS-MPI) is required for running this distributed computing framework on Windows.

Download and Install MS-MPI:

  1. Download MS-MPI v10.1.2 (or latest):

  2. Install in this order:

    • First, run msmpisetup.exe (Runtime)
    • Then, run msmpisdk.msi (SDK)
  3. Verify Installation: Open a new Command Prompt and run:

    mpiexec -help

    You should see MPI help output.

Step 2: Install Build Tools

You need a C++ compiler. Choose one:

Option A: Visual Studio (Recommended)

  1. Download Visual Studio 2022 Community (free): https://visualstudio.microsoft.com/downloads/
  2. During installation, select:
    • "Desktop development with C++"
    • CMake tools for Windows

Option B: MinGW-w64

  1. Download from: https://www.mingw-w64.org/
  2. Add to PATH: C:\mingw64\bin

Step 3: Install CMake

  1. Download CMake: https://cmake.org/download/
  2. Choose "Add CMake to system PATH for all users" during installation
  3. Verify: cmake --version

Building the Project

Option 1: Using the Build Script

cd "c:\Users\ankit\OneDrive\Desktop\sem 4\New folder\DistributedComputingFramework"
build.bat

Option 2: Manual Build (if build.bat doesn't work)

cd "c:\Users\ankit\OneDrive\Desktop\sem 4\New folder\DistributedComputingFramework"

REM Create build directory
mkdir build
cd build

REM Configure with CMake
cmake .. -G "Visual Studio 17 2022"

REM Build
cmake --build . --config Release

cd ..

Running Examples

After successful build:

1. Run Main Framework Demo

mpiexec -n 4 build\Release\distributed_framework_main.exe

2. Run Matrix Multiplication

mpiexec -n 4 build\Release\matrix_multiply.exe 1000

3. Run Monte Carlo Pi Estimation

mpiexec -n 8 build\Release\monte_carlo_pi.exe 100000000

Running on Local Machine

When running on a single machine, you can simulate multiple nodes:

mpiexec -n 4 build\Release\distributed_framework_main.exe

The -n 4 flag creates 4 processes (1 master + 3 workers).

Troubleshooting

Error: "mpiexec is not recognized"

  • Solution: MS-MPI is not installed or not in PATH
  • Reinstall MS-MPI Runtime
  • Restart Command Prompt
  • Check PATH contains: C:\Program Files\Microsoft MPI\Bin\

Error: "cmake is not recognized"

  • Solution: Install CMake and restart Command Prompt

Error: Build fails with compiler errors

  • Solution: Install Visual Studio with C++ tools
  • Or use MinGW-w64 and modify CMake generator:
    cmake .. -G "MinGW Makefiles"
    mingw32-make

Error: Cannot find MPI libraries during build

  • Solution: MS-MPI SDK not installed
  • Install msmpisdk.msi
  • CMake should auto-detect at: C:\Program Files (x86)\Microsoft SDKs\MPI

Alternative: Run Without Building (Simplified Demo)

If you just want to understand the concepts without building, I can create a simplified single-file demo that doesn't require MPI.

Next Steps

Once everything builds successfully, you can:

  1. Modify task implementations in src/core/task.cpp
  2. Adjust load balancing strategies in config/framework.conf
  3. Create custom applications in src/examples/
  4. Test fault tolerance by killing worker processes

Performance Tips

  • Use Release build for better performance
  • Increase worker count for larger datasets
  • Enable checkpointing for long-running tasks
  • Adjust task_timeout in config for your workload

Questions?

Check the main README.md for architecture details and API documentation.