October 25, 2024
Chicago 12, Melborne City, USA
C#

trying to work with MPI but it outputs 'The batch file cannot be found' in cmd when I debug the file in Visual studio 2010


I am trying to install MPI on ms visual studio 2010 (our professor forced us to use 2010 version specifically probably for the privileges it offers that newer version don’t idk) and it’s driving me insane

I’ve done exactly as he told us, first I created a new c++ win32 project (yes I already have MPI and MPI SDK installed on my pc) than I edited the properties as follows:

  1. changed ‘Debugging mode’ to ‘MPI cluster debugger’
  2. changed run environment to ‘localhost/4’
  3. added ‘$(MSMPI_INC);%(AdditionalIncludeDirectories)’ to the ‘Additional include directories’ in the ‘C/C++’ tab
  4. added ‘$(MSMPI_LIB32);%(AddtionalLibraryDirectories)’ to the ‘Additional library directories’ in the ‘Linker’ tab
  5. added ‘msmpi.lib’ to the additional dependencies in the ‘Input’ section of he ‘Linker’ tab

but when I press ‘Debug’ four cmd windows flash and it outputs ‘The batch file cannot be found’
this is a code sample I am trying to run:

#include "stdafx.h"
#include <mpi.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    int rank, size;
    MPI_Init(&argc, &argv);

    MPI_Comm_rank(MPI_COMM_WORLD,&rank);
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    printf("I am %d of %d\n", rank, size);

    MPI_Finalize();
    return 0;
}

what am I doing wrong ? I have a homework due tomorrow.and I already tried running visual studio as an admin
thank you for any help in advance



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video