Skip to content

Commit

Permalink
Cleanup of some old issues with wrapper functions that obscured what …
Browse files Browse the repository at this point in the history
…was going on.
  • Loading branch information
elbriggs committed Jul 25, 2019
1 parent 856fee0 commit b4d14b6
Show file tree
Hide file tree
Showing 64 changed files with 111 additions and 356 deletions.
1 change: 0 additions & 1 deletion Headers/common_prototypes1.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ int get_index (int gridpe, ION * iptr, int *Aix, int *Aiy, int *Aiz,
int nxgrid, int nygrid, int nzgrid, double * xcstart, double * ycstart, double * zcstart);

double linint (double *y, double rv, double invdr);
void my_barrier (void);


/* Conversion between crystal and cartesian coordinate prototypes */
Expand Down
2 changes: 1 addition & 1 deletion Headers/rmg_control.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef RMG_control_H
#define RMG_control_H 1

#include <vector>
#include <stdbool.h>
#ifdef __cplusplus
#include <complex>
Expand Down
1 change: 0 additions & 1 deletion Misc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ get_index.c
get_te.c
minimage.c
get_vtot_psi.c
my_mpi.c
blaswrappers.c
set_bc.c
cgen_prolong.c
Expand Down
6 changes: 3 additions & 3 deletions NEGF/Common/InitNegf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void InitNegf (double * vh, double * rho, double * rhocore, double * rhoc, doubl

} /* endif */

my_barrier ();
MPI_Barrier(pct.img_comm);

/* Initialize the mehrstellen weights */
/*get_mehr (); */
Expand All @@ -160,7 +160,7 @@ void InitNegf (double * vh, double * rho, double * rhocore, double * rhoc, doubl
AllocatePsi (states, states1);

duplicate_states_info (states, states1);
my_barrier ();
MPI_Barrier(pct.img_comm);


pmo_init();
Expand Down Expand Up @@ -263,7 +263,7 @@ void InitNegf (double * vh, double * rho, double * rhocore, double * rhoc, doubl


}
my_barrier ();
MPI_Barrier(pct.img_comm);


for (level = 0; level < ct.eig_parm.levels + 1; level++)
Expand Down
2 changes: 1 addition & 1 deletion NEGF/Common/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int main (int argc, char **argv)
ReadOrbitals (ct.cfile, states, ct.ions, pct.img_comm, perm_ion_index);
get_state_to_proc(states);

my_barrier ();
MPI_Barrier(pct.img_comm);

/* Begin to do the real calculations */
Run (states, states1, ControlMap);
Expand Down
2 changes: 1 addition & 1 deletion NEGF/Common/QuenchNegf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void QuenchNegf (STATE * states, STATE * states1, double * vxc, double * vh, dou
sigma_all_energy_point (sigma_all, ct.kp[pct.kstart].kpt[1], ct.kp[pct.kstart].kpt[2]);
delete(RT1);
}
my_barrier();
MPI_Barrier(pct.img_comm);
if(pct.imgpe==0) printf("\n sigma_all done");


Expand Down
6 changes: 3 additions & 3 deletions NEGF/Common/Run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,16 @@ void Run (STATE * states, STATE * states1, std::unordered_map<std::string, Input
write_data_lead (ct.outfile, vh, vxc, vh_old, vxc_old, rho);


my_barrier ();
MPI_Barrier(pct.img_comm);
writeout_matrix_p ();
delete(RT5);

my_barrier ();
MPI_Barrier(pct.img_comm);
if (pct.imgpe == 0)
printf ("\n Run done...\n");
fflush (NULL);

my_barrier();
MPI_Barrier(pct.img_comm);


}
Expand Down
10 changes: 5 additions & 5 deletions NEGF/Common/ScfNegf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void ScfNegf (DoubleC *sigma_all, STATE * states, double *vxc,
/* Generate new density */
dcopy (&fpbasis, rho, &ione, rho_old, &ione);

my_barrier ();
MPI_Barrier(pct.img_comm);
if (ct.runflag == 111 && ct.metal == 1)
find_fermi (sigma_all);
if (ct.runflag == 111 && ct.metal == 0)
Expand All @@ -165,13 +165,13 @@ void ScfNegf (DoubleC *sigma_all, STATE * states, double *vxc,
delete(RT2);
}

my_barrier ();
MPI_Barrier(pct.img_comm);

RmgTimer *RT3 = new RmgTimer("3-SCF: charge_density_matrix");
charge_density_matrix_p (sigma_all);


my_barrier ();
MPI_Barrier(pct.img_comm);

delete(RT3);

Expand Down Expand Up @@ -235,7 +235,7 @@ void ScfNegf (DoubleC *sigma_all, STATE * states, double *vxc,

/* mix_rho(rho, rho_old, ct.mix, ct.steps, 1); */

my_barrier ();
MPI_Barrier(pct.img_comm);

delete(RT5);

Expand Down Expand Up @@ -331,7 +331,7 @@ void update_pot (double *vxc, double *vh, double * vxc_old, double * vh_old, dou
vtot[idx] = vxc[idx] + vh[idx] - vtot[idx];
}

my_barrier ();
MPI_Barrier(pct.img_comm);

if (ct.scf_steps < 4 && ct.runflag == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion NEGF/Common/allocate_matrix_LCR.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void allocate_matrix_LCR ()


/* Wait until everybody gets here */
my_barrier ();
MPI_Barrier(pct.img_comm);

ntot = 0;
ndim = 0;
Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/apply_potential_drop.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void apply_potential_drop (double *vbias)
int x, y;


my_barrier ();
MPI_Barrier(pct.img_comm);

xoff = get_FPX_OFFSET();
yoff = get_FPY_OFFSET();
Expand Down Expand Up @@ -411,7 +411,7 @@ void apply_potential_drop (double *vbias)



my_barrier ();
MPI_Barrier(pct.img_comm);


}
Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/get_3Ddos.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void get_3Ddos (STATE * states, double EMIN, double EMAX, int EPoints, int numbe
}
}
}
my_barrier ();
MPI_Barrier(pct.img_comm);
}


Expand Down Expand Up @@ -303,7 +303,7 @@ void get_3Ddos (STATE * states, double EMIN, double EMAX, int EPoints, int numbe
fclose (file);
}

my_barrier ();
MPI_Barrier(pct.img_comm);
fflush (NULL);

/*===============================*/
Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/get_cond_frommatrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void get_cond_frommatrix ()

} /* end for iene */

my_barrier ();
MPI_Barrier(pct.img_comm);
iene = E_POINTS;
global_sums (cond, &iene, pct.grid_comm);

Expand Down Expand Up @@ -393,7 +393,7 @@ void get_cond_frommatrix ()
my_free(lcr[iprobe].SCL);
}

my_barrier ();
MPI_Barrier(pct.img_comm);

}

Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/get_cond_frommatrix_kyz.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void get_cond_frommatrix_kyz ()
} /* end for iene */


my_barrier ();
MPI_Barrier(pct.img_comm);

global_sums (cond_temp, &EP, pct.grid_comm);

Expand Down Expand Up @@ -499,7 +499,7 @@ void get_cond_frommatrix_kyz ()
my_free(lcr[iprobe].SCL);
}

my_barrier ();
MPI_Barrier(pct.img_comm);

}

Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/get_dos.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void get_dos (STATE * states)
}
}

my_barrier ();
MPI_Barrier(pct.img_comm);
}


Expand Down Expand Up @@ -354,7 +354,7 @@ void get_dos (STATE * states)
}


my_barrier ();
MPI_Barrier(pct.img_comm);
fflush (NULL);

/*===============================*/
Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/init_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void init_comp (double *vh)

fflush(NULL);

my_barrier();
MPI_Barrier(pct.img_comm);

/* Get this processors offset */
pxoff = get_FPX_OFFSET();
Expand Down Expand Up @@ -159,7 +159,7 @@ void init_comp (double *vh)

/* Wait until everyone gets here */
fflush(NULL);
my_barrier();
MPI_Barrier(pct.img_comm);
my_free(zvec);

} /* end init_comp */
Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/init_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void init_ext (double *vext, double gbias_begin, double gbias_end, double BT, d

fflush(NULL);

my_barrier();
MPI_Barrier(pct.img_comm);


/* Grab some memory for storage */
Expand Down Expand Up @@ -89,7 +89,7 @@ void init_ext (double *vext, double gbias_begin, double gbias_end, double BT, d

/* Wait until everyone gets here */
fflush(NULL);
my_barrier();
MPI_Barrier(pct.img_comm);

} /* end init_ext */

Expand Down
2 changes: 1 addition & 1 deletion NEGF/Common/init_loc_xyz.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void init_loc_xyz ()
printf ("\n init_loc_xyz.c done\n");

}
my_barrier ();
MPI_Barrier(pct.img_comm);
fflush (NULL);


Expand Down
2 changes: 1 addition & 1 deletion NEGF/Common/interpolation_orbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ lcr[idx0].x_shift);
my_free(psi_old);
my_free(psi_new);

my_barrier ();
MPI_Barrier(pct.img_comm);
if (pct.gridpe == 0) printf ("\n interpolation_orbit is done! ");

}
6 changes: 3 additions & 3 deletions NEGF/Common/lead_bandstructure.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ void lead_bandstructure ()

}

my_barrier ();
MPI_Barrier(pct.img_comm);
idx = kpoints[0] * nL;
comm_sums (ener_band, &idx, COMM_EN1);

my_barrier ();
MPI_Barrier(pct.img_comm);
if (pct.gridpe == 0)
{
file = fopen ("band.dat", "w");
Expand All @@ -294,6 +294,6 @@ void lead_bandstructure ()
fprintf (file, "&\n");
}
}
my_barrier ();
MPI_Barrier(pct.img_comm);

}
2 changes: 1 addition & 1 deletion NEGF/Common/modify_rho.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void modify_rho (double * rho, double * rho_old)
*/

}
my_barrier ();
MPI_Barrier(pct.img_comm);


}
2 changes: 1 addition & 1 deletion NEGF/Common/nlforce_partial_H_part2.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void nlforce_partial_H_part2 (STATE * states, STATE * states1, double *GHG, doub
MPI_Send (psi1, size1, MPI_DOUBLE, proc1, i, pct.grid_comm);
}

my_barrier ();
MPI_Barrier(pct.img_comm);
}


Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/partial_vloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void partial_vloc ()
SPECIES *sp;


my_barrier ();
MPI_Barrier(pct.img_comm);

/* get total number of vnuc on this processor */
/* pct.n_ion_center: number of ions whose nl projector overlap
Expand Down Expand Up @@ -143,7 +143,7 @@ void partial_vloc ()
printf (" partial_vloc.c done\n");

}
my_barrier ();
MPI_Barrier(pct.img_comm);
fflush (NULL);

}
2 changes: 1 addition & 1 deletion NEGF/Common/pmo_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void pmo_init ()
Cblacs_gridinfo (pmo.ictxt[pmo.myblacs], &nprow, &npcol, &myrow, &mycol);

fflush(NULL);
my_barrier();
MPI_Barrier(pct.img_comm);
/* If I'm not in the process grid, return */
if(myrow == -1) return;

Expand Down
2 changes: 1 addition & 1 deletion NEGF/Common/read_lead_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void read_lead_matrix ()
int size, rank, ndims, gsizes[2], distribs[2];

/* Wait until everyone gets here */
my_barrier ();
MPI_Barrier(pct.img_comm);


ictxt = pmo.ictxt[pmo.myblacs];
Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/read_orbital.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void read_orbital (STATE * states)


/* Wait until everybody gets here */
my_barrier ();
MPI_Barrier(pct.img_comm);

/*
printf ("state_begin, state_end %d %d \n", ct.state_begin, ct.state_end);
Expand Down Expand Up @@ -181,7 +181,7 @@ void read_orbital (STATE * states)
} /* st loop ends */


my_barrier ();
MPI_Barrier(pct.img_comm);

fflush (NULL);

Expand Down
4 changes: 2 additions & 2 deletions NEGF/Common/read_potrho.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void read_potrho (double *vh, int iflag, char *file_ex)


/* Wait until everybody gets here */
my_barrier ();
MPI_Barrier(pct.img_comm);

rcount = (int *) malloc(pct.grid_npes * sizeof(int));
rdisp = (int *) malloc(pct.grid_npes * sizeof(int));
Expand Down Expand Up @@ -600,7 +600,7 @@ void read_potrho (double *vh, int iflag, char *file_ex)



my_barrier ();
MPI_Barrier(pct.img_comm);

fflush (NULL);

Expand Down
Loading

0 comments on commit b4d14b6

Please sign in to comment.