From 567b55aebeb9f14663d31405bbb818bf4a723511 Mon Sep 17 00:00:00 2001 From: Cesar Ramirez Perez Date: Wed, 19 Feb 2020 04:11:50 -0800 Subject: [PATCH 1/2] Changed output in common.c file --- src/common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common.c b/src/common.c index a9543ea..5bc858b 100644 --- a/src/common.c +++ b/src/common.c @@ -248,7 +248,7 @@ void mpi_init(int* p_argc,char*** p_argv) #ifdef _DEBUG if(NodeThis==0) { for(ii=0;iidens_type==DENS_TYPE_1LPT) || (par->dens_type==DENS_TYPE_2LPT)) printf(", %.3lf GB (%dLPT)",(double)(total_GB_lpt/pow(1024.,3)),par->dens_type); From 383cf5d4de7f9bafb02f65619fc039fdd91485bb Mon Sep 17 00:00:00 2001 From: Cesar Ramirez Perez Date: Thu, 20 Feb 2020 09:02:01 -0800 Subject: [PATCH 2/2] Changed messages about MPI Tasks. --- src/beaming.c | 2 +- src/density.c | 6 +++--- src/srcs.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/beaming.c b/src/beaming.c index fd4e6f5..0c9a3fa 100644 --- a/src/beaming.c +++ b/src/beaming.c @@ -320,7 +320,7 @@ void get_beam_properties(ParamCoLoRe *par) int node_i_am_now=(NodeThis-i-1+NNodes)%NNodes; #ifdef _HAVE_MPI #ifdef _DEBUG - print_info("Communication %d, Node %d is now Node %d\n",i,NodeThis,node_i_am_now); + print_info("Communication %d, MPI task %d is now MPI task %d\n",i,NodeThis,node_i_am_now); #endif //_DEBUG mpi_sendrecv_wrap(par->grid_npot,buffer_sr,size_slice_npot,i); mpi_sendrecv_wrap(par->grid_dens,buffer_sr,size_slice_dens,i); diff --git a/src/density.c b/src/density.c index ba15876..58cbc33 100644 --- a/src/density.c +++ b/src/density.c @@ -226,7 +226,7 @@ static void share_particles(ParamCoLoRe *par,unsigned long long np_allocated,uns z_bright_right[inode]=(par->lpt_interp_type+1)*0.5*dx; } #ifdef _DEBUG - print_info("Node %d: [%lf,%lf] [%lf,%lf] [%lf %lf] [%lf %lf]\n",inode, + print_info("MPI task %d: [%lf,%lf] [%lf,%lf] [%lf %lf] [%lf %lf]\n",inode, z_left[inode],z_right[inode], z_true_left[inode],z_true_right[inode], z_bleft_left[inode],z_bleft_right[inode], @@ -269,7 +269,7 @@ static void share_particles(ParamCoLoRe *par,unsigned long long np_allocated,uns } #ifdef _DEBUG - printf("Node %d: %llu %llu %llu %llu\n",NodeThis,np_allocated,n_inrange,nbuffer,n_inbuffer); + printf("MPI task %d: %llu %llu %llu %llu\n",NodeThis,np_allocated,n_inrange,nbuffer,n_inbuffer); #ifdef _HAVE_MPI MPI_Barrier(MPI_COMM_WORLD); #endif @@ -335,7 +335,7 @@ static void share_particles(ParamCoLoRe *par,unsigned long long np_allocated,uns #ifdef _DEBUG - printf("%d. Node %d: send %d particles to node %d, receive %d particles from node %d\n", + printf("%d. MPI task %d: send %d particles to node %d, receive %d particles from MPI task %d\n", inode,NodeThis,nsend,node_to,nrecv,node_from); #ifdef _HAVE_MPI MPI_Barrier(MPI_COMM_WORLD); diff --git a/src/srcs.c b/src/srcs.c index f2d1d10..307c25a 100644 --- a/src/srcs.c +++ b/src/srcs.c @@ -154,7 +154,7 @@ static void srcs_set_cartesian_single(ParamCoLoRe *par,int ipop) print_info(" There will be %ld objects in total \n",(long)nsources_total); #ifdef _DEBUG - fprintf(par->f_dbg,"Node %d has %ld particles\n",NodeThis,(long)(par->nsources_c_this[ipop])); + fprintf(par->f_dbg,"MPI task %d has %ld particles\n",NodeThis,(long)(par->nsources_c_this[ipop])); #endif //_DEBUG for(ii=nthr-1;ii>0;ii--) { @@ -307,7 +307,7 @@ static void srcs_distribute_single(ParamCoLoRe *par,int ipop) int node_from=(NodeLeft -ii+NNodes)%NNodes; int npart_send=ns_transfer_matrix[NodeThis*NNodes+node_to]; int npart_recv=ns_transfer_matrix[node_from*NNodes+NodeThis]; - // print_info("Node %d: %d-th iteration. to->%d from->%d.",NodeThis,ii,node_to,node_from); + // print_info("MPI task %d: %d-th iteration. to->%d from->%d.",NodeThis,ii,node_to,node_from); // print_info(" Should get %07ld objects, and will send %07ld.\n",npart_recv,npart_send); #ifdef _HAVE_MPI MPI_Sendrecv(&(pos_ordered[NPOS_CC*i0_in_nodes[node_to]]),NPOS_CC*npart_send,MPI_FLOAT,node_to ,ii,