diff --git a/src/ex1.c b/src/ex1.c index d27c41f..88e86c6 100644 --- a/src/ex1.c +++ b/src/ex1.c @@ -104,7 +104,7 @@ int main(int argc,char **argv) MPI_Comm_rank(MPI_COMM_WORLD,&mpiid); ierr = MatGetOwnershipRange(A,&Istart,&Iend);CHKERRQ(ierr); ierr = PetscTime(&tt1);CHKERRQ(ierr); - ierr = PetscPrintf(PETSC_COMM_WORLD," start: %d end: %d\n",Istart, Iend);CHKERRQ(ierr); + ierr = PetscPrintf(PETSC_COMM_WORLD," start: %d end: %d | %d\n",Istart, Iend,getdata.natom);CHKERRQ(ierr); // Iend = range[mpiid]; // if(mpiid==0){ diff --git a/src/get_s2.c b/src/get_s2.c index 087a578..d882d00 100644 --- a/src/get_s2.c +++ b/src/get_s2.c @@ -22,13 +22,16 @@ * xymat = the S^2 value */ -void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom, PetscReal *norm, PetscReal *norm2, PetscReal *norm3, PetscReal *norm4, PetscReal *xymat, PetscReal *xymat2, PetscReal *xymat3, PetscReal *xymat4, PetscReal *weight3, - int *s21a1, int *s21a2, int *s21b1, int *s21b2, int *s22a1, int *s22a2, int *s22b1, int *s22b2, int *s23a1, int *s23a2, int *s23b1, int *s23b2, int *postrou){ +void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom, + PetscReal *norm, PetscReal *norm2, PetscReal *norm3, PetscReal *norm4, + PetscReal *xymat, PetscReal *xymat2, PetscReal *xymat3, PetscReal *xymat4, PetscReal *weight3, + int *s21a1, int *s21a2, int *s21b1, int *s21b2, int *s22a1, int *s22a2, + int *s22b1, int *s22b2, int *s23a1, int *s23a2, int *s23b1, int *s23b2, int *postrou){ const int natomax=700; long int iaa2, iaa; long int iii; - long int ideter[natomax]; - long int ideter2[natomax]; + int ideter[natomax]; + int ideter2[natomax]; int kko,kok,kkio; long int ii; double xmat=0.0; @@ -678,6 +681,6 @@ void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *n ierr = PetscTime(&tt2); //printf(" norm = %18f weight = %18f weight/N = %18f tmpwe = %18f\n", *norm2, *weight3, *weight3/(*norm2),tmpwe); -//printf(" norm = %18f %18f xymat = %18f %18f\n", *norm2, *norm3, *xymat2, *xymat3); +//printf(" norm = %18f %18f xymat = %18f %18f | %d %d %d %d %d\n", *norm, *norm3, *xymat, *xymat3, *s22a1, *s22a2, *s22b1, *s22b2, *postrou); //ierr = PetscPrintf(PETSC_COMM_WORLD," Time used for the s2 loop: %f\n",tt2-tt1);CHKERRQ(ierr); } diff --git a/src/get_s2.h b/src/get_s2.h index 2eb0415..5bf7e13 100644 --- a/src/get_s2.h +++ b/src/get_s2.h @@ -4,20 +4,8 @@ #include #include -void get_s2(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, - int *, - int *, - int *, - int *, - int *, - int *, - int *, - int *, - int *, - int *, - int *, - int *, - int *); +void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom, PetscReal *norm, PetscReal *norm2, PetscReal *norm3, PetscReal *norm4, PetscReal *xymat, PetscReal *xymat2, PetscReal *xymat3, PetscReal *xymat4, PetscReal *weight3, + int *s21a1, int *s21a2, int *s21b1, int *s21b2, int *s22a1, int *s22a2, int *s22b1, int *s22b2, int *s23a1, int *s23a2, int *s23b1, int *s23b2, int *postrou); void get_s2_mov(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, int *, diff --git a/src/get_s2_cyclic.c b/src/get_s2_cyclic.c index e2075c0..ae7a20f 100644 --- a/src/get_s2_cyclic.c +++ b/src/get_s2_cyclic.c @@ -27,8 +27,8 @@ void get_s2_cyclic(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, const int natomax=700; long int iaa2, iaa; long int iii; - long int ideter[natomax]; - long int ideter2[natomax]; + int ideter[natomax]; + int ideter2[natomax]; int kko,kok,kkio,kk; int kko2,kok2; long int ii; diff --git a/src/get_s2_mov.c b/src/get_s2_mov.c index a7f30ba..a829e77 100644 --- a/src/get_s2_mov.c +++ b/src/get_s2_mov.c @@ -27,8 +27,8 @@ void get_s2_mov(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, in const int natomax=700; long int iaa2, iaa; long int iii; - long int ideter[natomax]; - long int ideter2[natomax]; + int ideter[natomax]; + int ideter2[natomax]; int kko,kok,kkio; long int ii; double xmat=0.0; diff --git a/src/read2.h b/src/read2.h index ce325db..aa4aff3 100644 --- a/src/read2.h +++ b/src/read2.h @@ -33,7 +33,7 @@ typedef struct { int s23a2; int s23b1; int s23b2; - long int postrou; + int postrou; long int fix_trou1; long int fix_trou2;