/*********************************************************************** INIT_TIMERS() ************************************************************************/ void init_timers(void) { int i; for(i=0; i 0){ fprintf(nabout,"\n|Molecular Dynamics Timing Summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "1st Derivative", *tmd-*tmdIO-*tmdOther); fprintf(nabout, "| %*s %10.3f\n", labelLen, "I/O", *tmdIO); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tmdOther); fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tmd); } if(*tnmode > 0){ fprintf(nabout,"\n|Normal Mode Timing Summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Build Hessian", *tnmodeHessian); if(*tnmodeDSYEV > 0) fprintf(nabout, "| %*s %10.3f\n", labelLen, "diagonalize w/ dsyev", *tnmodeDSYEV); if(*tnmodeDSYEVD > 0) fprintf(nabout, "| %*s %10.3f\n", labelLen, "diagonalize w/ dsyevd", *tnmodeDSYEVD); if(*tnmodeFact > 0){ fprintf(nabout, "| %*s %10.3f\n", labelLen, "Cholesky factorization", *tnmodeFact); fprintf(nabout, "| %*s %10.3f\n", labelLen, "diagonalize inverted Hessian", *tnmodeInvdiag); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Hessian eigenvectors", *tnmodeEigenvec); } if(*tnmodeAmat > 0){ fprintf(nabout, "| %*s %10.3f\n", labelLen, "Setup 'a' matrix", *tnmodeAmat); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Diagonalize 'a' matrix", *tnmodeDiagA); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Sort eigenvalues", *tnmodeSort); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Normalize 'L' matrix", *tnmodeNorm); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Langevin modes", *tnmodeLan); } fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tnmodeOther); fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tnmode); } if(*tconjgrad > 0){ fprintf(nabout, "\n|Conjugate gradient timing summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "1st Derivative", *tconjgradMME); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tconjgradOther); fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tconjgrad); /* fprintf(nabout, "| %*s %10.3e\n", labelLen, "Relative Error", */ /* (*tconjgrad-*tconjgradMME-*tconjgradOther)/ *tconjgrad); */ } if(*tnewton > 0){ fprintf(nabout, "\n|Newton-Rhapson timing summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "1st Derivative", *tnewtonMME); fprintf(nabout, "| %*s %10.3f\n", labelLen, "1st & 2nd Derivative", *tnewtonMME2); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Level", *tnewtonLevel); fprintf(nabout, "| %*s %10.3f\n", labelLen, "dposv", *tnewtonCholesky); fprintf(nabout, "| %*s %10.3f\n", labelLen, "dsyev", *tnewtonDSYEV); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tnewtonOther); fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tnewton); /* fprintf(nabout, "| %*s %10.3e\n", labelLen, "Relative Error", */ /* (*tnewton-*tnewtonMME-*tnewtonMME2-*tnewtonLevel-*tnewtonCholesky-*tnewtonDSYEV-*tnewtonOther) / *tnewton); */ } /* energy and gradients */ /* mme */ if(*tmme > 0){ fprintf(nabout, "\n|1st derivative timing summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "constraints", *tmmeCons); fprintf(nabout, "| %*s %10.3f\n", labelLen, "bonds", *tmmeBond); fprintf(nabout, "| %*s %10.3f\n", labelLen, "angles", *tmmeAngl); fprintf(nabout, "| %*s %10.3f\n", labelLen, "torsions", *tmmePhi); fprintf(nabout, "| %*s %10.3f\n", labelLen, "pairlist", *tmmePair); fprintf(nabout, "| %*s %10.3f\n", labelLen, "nonbond", *tmmeNonb); fprintf(nabout, "| %*s %10.3f\n", labelLen, "gen. Born", *tmmeBorn); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Poisson Boltzmann", *tmmePB); fprintf(nabout, "| %*s %10.3f\n", labelLen, "3D-RISM", *tmmeRism); #ifdef MPI /* PBSA is serial only so wait time on idle nodes ends up in tmmeOther. As a simple work around we take the difference*/ fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tmmeOther-*tmmePB); #else fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tmmeOther); #endif fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tmme); /* fprintf(nabout, "| %*s %10.3e\n", labelLen, "Relative Error", */ /* (*tmme-*tmmeCons-*tmmeBond-*tmmeAngl-*tmmePhi-*tmmePair-*tmmeNonb-*tmmeBorn-*tmmeRism-*tmmeOther) / *tmme); */ } /* mme2 */ if(*tmme2 > 0){ fprintf(nabout, "\n|1st & 2nd derivative timing summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "constraints", *tmme2Cons); fprintf(nabout, "| %*s %10.3f\n", labelLen, "bonds", *tmme2Bond); fprintf(nabout, "| %*s %10.3f\n", labelLen, "angles", *tmme2Angl); fprintf(nabout, "| %*s %10.3f\n", labelLen, "torsions", *tmme2Phi); fprintf(nabout, "| %*s %10.3f\n", labelLen, "pairlist", *tmme2Pair); fprintf(nabout, "| %*s %10.3f\n", labelLen, "nonbond", *tmme2Nonb); fprintf(nabout, "| %*s %10.3f\n", labelLen, "gen. Born", *tmme2Born); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tmme2Other); fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tmme2); /* fprintf(nabout, "| %*s %10.3e\n", labelLen, "Relative Error", */ /* (*tmme2-*tmme2Cons-*tmme2Bond-*tmme2Angl-*tmme2Phi-*tmme2Pair-*tmme2Nonb-*tmme2Born-*tmme2Other) / *tmme2); */ } /* EGB2 */ if(*tgb2 > 0){ fprintf(nabout, "\n|Generalized Born 1st & 2nd derivative timing summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "dgemm1", *tgb2dgemm1); fprintf(nabout, "| %*s %10.3f\n", labelLen, "dgemm2", *tgb2dgemm2); fprintf(nabout, "| %*s %10.3f\n", labelLen, "dgemm3", *tgb2dgemm3); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Other", *tgb2Other); fprintf(nabout, "|-------------------------\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "Total", *tgb2); /* fprintf(nabout, "| %*s %10.3e\n", labelLen, "Relative Error", (*tgb2-*tgb2dgemm1-*tgb2dgemm2-*tgb2dgemm3-*tgb2Other) / *tgb2); */ } /* MPI */ if(*treduceegb + *treducemme > 0){ fprintf(nabout, "\n|MPI timing summary:\n"); fprintf(nabout, "| %*s %10.3f\n", labelLen, "egb reduct.", *treduceegb); fprintf(nabout, "| %*s %10.3f\n", labelLen, "mme reduct.", *treducemme); } fflush(nabout); } /* 3D-RISM */ #ifdef RISMSFF if(*tmmeRism > 0 && rismData.rism){ /* use the built in timer report */ rism_printtimer_(); } #endif /*RISMSFF*/ return (0); }