I want to run Open MPI program in Xcode. I follow http://www.macresearch.org/compiling-running-and-debugging-mpi-programs-xcode tutorial. I am getting output for MPI_test executable. but when i am running mpiexec, i got the following error:
- Failed to find or execute the following executable:
- Cannot continue
If you are running
mpiexecfrom the command line, you are probably not starting in the correct directory. Your executable’s directory is in either the Debug or Release directory in your project directory depending on which configuration you select when you build. If you named your project MPI_test, go into the appropriate directory and type./MPI_testand make sure the program runs. If it doesn’t, you’re not in the correct directory. Once you’ve found the correct directory, you can typempiexec -np 4 MPI_testand that should run as well.If you are following the instructions to run
mpiexecwithin Xcode, it wlll only work if you name your project MPI_test. Instead of setting the second argument in the custom executable to$(PROJECT_DIR)/$(CONFIGURATION_BUILD_DIR)/MPI_test, set it to$(PROJECT_DIR)/$(CONFIGURATION_BUILD_DIR)/$(PROJECT_NAME)and it will work no matter what you name your project as long as it’s a valid command line program name (e.g. it can’t have spaces).