c++ - MPI_Comm_size always returns 1 on Code Blocks -


I have the tutorial below for executing the MPI on codeblocks

If I execute the simple MPI code tutorial, I always get 1 for MPI_Comm_size. How do I get more sources than the code below?

  #include & lt; Iostream & gt; #include "mpi.h" #include & lt; String & gt; using namespace std; Int main (int argc, char * argv []) {int my_rank; / * Ranks of process * / int no processions; / * Number of processes * / int name sequence; / * Name length * / four computer name [MPI_MAX_PROCESSOR_NAME]; MPI_Init (& amp; argc, & argv); / * Start determines the size of the group associated with MPI * / * * / * Communicator * / MPI_Comm_size (MPI_COMM_WORLD, & NO Processes); / * Communications * / MPI_Comm_rank (MPI_COMM_WORLD, & my_rank) determines the rank of calling process; / * Processor Name * / MPI_Get_processor_name (Computer Name, and Name Seize); Printf ("% d processor% d on% s process \ n", my_rank, noProcesses, computerName); MPI_Finalize (); / * Remove MPI * / Return 0; }  

I have already tried the mpiexec -n2 file.exe on the cmd prompt at this location.

But I can not find an error message can not be found ~~ __gxx_personality_v0 ~~~ DLL libstdc ++ - 6.dll ~~~


I solved other mpiexec.exe file by changing the name. In my case it was in C: \ program files \ Microsoft \ MPI \ bin

Problem in system path The other was caused by mpiexec.exe.

So I wrote a special path in front of, like: "C: \ Program Files \ MPICH2 \ bin \ mpiexec.exe". After changing the name of another mpiexec.exe file in "C: \ Program Files \ Microsoft \ MPI \ Bin" in "C: \ Program Files \ Microsoft MPI_temp \ Bin".

But it returns another error after rename "smpd version mismatch" so i checked it version by SMPD-version. It was "1.0.3" so I just installed the smpd by "smpd.exe -install" command again.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -