From da77dde04de70a75a215a7bd0044e757d189352a Mon Sep 17 00:00:00 2001 From: Risto Toijala Date: Thu, 4 Apr 2019 14:32:49 +0300 Subject: [PATCH 1/3] MC/fix_bond_break: Use TAGINT_FORMAT where appropriate --- src/MC/fix_bond_break.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index a1c9bb3ab0..05edc0509e 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -800,26 +800,27 @@ void FixBondBreak::print_bb() for (int i = 0; i < atom->nlocal; i++) { printf("TAG " TAGINT_FORMAT ": %d nbonds: ",atom->tag[i],atom->num_bond[i]); for (int j = 0; j < atom->num_bond[i]; j++) { - printf(" %d",atom->bond_atom[i][j]); + printf(" " TAGINT_FORMAT, atom->bond_atom[i][j]); } printf("\n"); printf("TAG " TAGINT_FORMAT ": %d nangles: ",atom->tag[i],atom->num_angle[i]); for (int j = 0; j < atom->num_angle[i]; j++) { - printf(" %d %d %d,",atom->angle_atom1[i][j], - atom->angle_atom2[i][j],atom->angle_atom3[i][j]); + printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT ",", + atom->angle_atom1[i][j],atom->angle_atom2[i][j], + atom->angle_atom3[i][j]); } printf("\n"); printf("TAG " TAGINT_FORMAT ": %d ndihedrals: ",atom->tag[i],atom->num_dihedral[i]); for (int j = 0; j < atom->num_dihedral[i]; j++) { - printf(" %d %d %d %d,",atom->dihedral_atom1[i][j], - atom->dihedral_atom2[i][j],atom->dihedral_atom3[i][j], - atom->dihedral_atom4[i][j]); + printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT ",", + atom->dihedral_atom1[i][j],atom->dihedral_atom2[i][j], + atom->dihedral_atom3[i][j],atom->dihedral_atom4[i][j]); } printf("\n"); printf("TAG " TAGINT_FORMAT ": %d %d %d nspecial: ",atom->tag[i], atom->nspecial[i][0],atom->nspecial[i][1],atom->nspecial[i][2]); for (int j = 0; j < atom->nspecial[i][2]; j++) { - printf(" %d",atom->special[i][j]); + printf(" " TAGINT_FORMAT, atom->special[i][j]); } printf("\n"); } @@ -830,7 +831,7 @@ void FixBondBreak::print_bb() void FixBondBreak::print_copy(const char *str, tagint m, int n1, int n2, int n3, int *v) { - printf("%s %i: %d %d %d nspecial: ",str,m,n1,n2,n3); + printf("%s " TAGINT_FORMAT ": %d %d %d nspecial: ",str,m,n1,n2,n3); for (int j = 0; j < n3; j++) printf(" %d",v[j]); printf("\n"); } From 66794692201d4345cde7aaa5573b4cf4f06cdea7 Mon Sep 17 00:00:00 2001 From: Risto Toijala Date: Thu, 4 Apr 2019 15:35:44 +0300 Subject: [PATCH 2/3] USER-MANIFOLD: Use TAGINT_FORMAT where appropriate --- src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index 794a324f03..de134e32ed 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -559,7 +559,8 @@ void FixNVEManifoldRattle::rattle_manifold_x(double *x, double *v, if (iters >= max_iter && res > tolerance) { char msg[2048]; - sprintf(msg,"Failed to constrain atom %d (x = (%f, %f, %f)! res = %e, iters = %d\n", + sprintf(msg,"Failed to constrain atom " TAGINT_FORMAT + " (x = (%f, %f, %f)! res = %e, iters = %d\n", tagi, x[0], x[1], x[2], res, iters); error->one(FLERR,msg); } @@ -652,7 +653,8 @@ void FixNVEManifoldRattle::rattle_manifold_v(double *v, double *f, if (iters >= max_iter && res >= tolerance) { char msg[2048]; - sprintf(msg,"Failed to constrain atom %d (x = (%f, %f, %f)! res = %e, iters = %d\n", + sprintf(msg,"Failed to constrain atom " TAGINT_FORMAT + " (x = (%f, %f, %f)! res = %e, iters = %d\n", tagi, x[0], x[1], x[2], res, iters); error->all(FLERR,msg); } From 2aa7a150b48fbbf080087000d9f7096d8d449e42 Mon Sep 17 00:00:00 2001 From: Risto Toijala Date: Thu, 4 Apr 2019 15:38:53 +0300 Subject: [PATCH 3/3] USER-SMD: Use TAGINT_FORMAT where appropriate --- src/USER-SMD/pair_smd_tlsph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-SMD/pair_smd_tlsph.cpp b/src/USER-SMD/pair_smd_tlsph.cpp index ac67a3279a..1d7bbca780 100644 --- a/src/USER-SMD/pair_smd_tlsph.cpp +++ b/src/USER-SMD/pair_smd_tlsph.cpp @@ -308,7 +308,7 @@ void PairTlsph::PreCompute() { */ if ((detF[i] < DETF_MIN) || (detF[i] > DETF_MAX) || (numNeighsRefConfig[i] == 0)) { - printf("deleting particle [%d] because det(F)=%f is outside stable range %f -- %f \n", tag[i], + printf("deleting particle [" TAGINT_FORMAT "] because det(F)=%f is outside stable range %f -- %f \n", tag[i], Fincr[i].determinant(), DETF_MIN, DETF_MAX); printf("nn = %d, damage=%f\n", numNeighsRefConfig[i], damage[i]);