X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fmdlib%2Fwnblist.cpp;fp=src%2Fgromacs%2Fmdlib%2Fwnblist.c;h=89c030c71736aa0c9d95130ee77bfc09fb962898;hb=c3f2d46e4047f0c465f7234b3784a2fa6f02a065;hp=0e72450f564f0229d872adcc4a345210ddc6d48a;hpb=0595b4a4c763a0bc574658992081abf8b0abc3fe;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/mdlib/wnblist.c b/src/gromacs/mdlib/wnblist.cpp similarity index 89% rename from src/gromacs/mdlib/wnblist.c rename to src/gromacs/mdlib/wnblist.cpp index 0e72450f56..89c030c717 100644 --- a/src/gromacs/mdlib/wnblist.c +++ b/src/gromacs/mdlib/wnblist.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -40,6 +40,8 @@ #include #include +#include + #include "gromacs/domdec/domdec.h" #include "gromacs/fileio/gmxfio.h" #include "gromacs/legacyheaders/force.h" @@ -75,7 +77,7 @@ static void write_nblist(FILE *out, gmx_domdec_t *dd, t_nblist *nblist, int nDNL ca1[zi] = dd->cgindex[dd_zones->cg_range[zi+1]]; } i = 0; - for (zi = 0; zi < dd_zones->nizone; zi++) + for (zi = 0; zi < dd_zones->nizone && zi < dd_zones->n; zi++) { zj0 = dd_zones->izone[zi].j0; zj1 = dd_zones->izone[zi].j1; @@ -160,34 +162,6 @@ static void set_mat(FILE *fp, int **mat, int i0, int ni, int j0, int nj, void dump_nblist(FILE *out, t_commrec *cr, t_forcerec *fr, int nDNL) { -#if 0 - static FILE *fp = NULL; - char buf[STRLEN]; - int n, i; - - if (fp == NULL) - { - if (PAR(cr)) - { - sprintf(buf, "nlist_n%d.txt", cr->nodeid); - } - else - { - sprintf(buf, "nlist.txt"); - } - fp = gmx_fio_fopen(buf, "w"); - } - fprintf(fp, "%s\n", header); - - for (n = 0; (n < fr->nnblists); n++) - { - for (i = 0; (i < eNL_NR); i++) - { - write_nblist(fp, cr->dd, &fr->nblists[n].nlist_sr[i], nDNL); - } - } -#endif - char buf[STRLEN]; int n, i; fprintf(out, "%s\n", header);