Note that there are some explanatory texts on larger screens.

plurals
  1. POMPI Error: No output
    primarykey
    data
    text
    <p>The code below is for using 4 nodes to communicate using MPI. I am able to compile it successfully on the cluster using "mpiicpc". </p> <p>However, the output screen just gives me a warning, ‘Warning: Cant read mpd.hosts for list of hosts start only on current’ and hangs. </p> <p>Could you please suggest what the warning means and also if it is the reason why my code hangs?</p> <hr> <pre><code>#include &lt;mpi.h&gt; #include &lt;fstream&gt; using namespace std; #define Cols 96 #define Rows 96 #define beats 1 ofstream fout("Vm0"); ofstream f1out("Vm1"); ..... ..... double V[Cols][Rows]; int r,i,y,ibeat; int my_rank; int p; int source; int dest; int tag = 0; //Allocating Memory double *A = new double[Rows*sizeof(double)]; double *B = new double[Rows*sizeof(double)]; ..... ...... void prttofile (); // MAIN FUNCTION int main (int argc, char *argv[]) { //MPI Commands MPI_Status status; MPI_Request send_request, recv_request; MPI_Init (&amp;argc, &amp;argv); MPI_Comm_rank(MPI_COMM_WORLD, &amp;my_rank); MPI_Comm_size(MPI_COMM_WORLD, &amp;p); for (ibeat=0;ibeat&lt;beats;ibeat++) { for (i=0; i&lt;Cols/2; i++) { for (y=0; y&lt;Rows/2; y++) { if (my_rank == 0) if (i &lt; 48) if (y&lt;48) V[i][y] = 0; .... ....... ..... } } //Load the Array with the edge values for (r=0; r&lt;Rows/2; y++) { if ((my_rank == 0) || (my_rank == 1)) { A[r] = V[r][48]; BB[r] = V[r][48]; } ..... ..... } int test = 2; if ((my_rank%test) == 0) { MPI_Isend(C, Rows, MPI_DOUBLE, my_rank+1, 0, MPI_COMM_WORLD, &amp;send_request); MPI_Irecv(CC, Rows, MPI_DOUBLE, my_rank+1, MPI_ANY_TAG, MPI_COMM_WORLD, &amp;recv_request); } else if ((my_rank%test) == 1) ...... ...... ibeat = ibeat+1; prttofile (); } //close ibeat MPI_Finalize (); } //close main //Print to File Function to save output values void prttofile () { for (i = 0; i&lt;Cols/2; i++) { for (y = 0; y&lt;Rows/2; y++) { if (my_rank == 0) fout &lt;&lt; V[i][y] &lt;&lt; " " ; .... ..... } } if (my_rank == 0) fout &lt;&lt; endl; if .... .... } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload