Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxlib / checkpoint.cpp
index 05edae309621284e92bdac2e981c4e7284c056b0..c1a806c42dc785c6bb80ba0fbc0c0b865bbe9b5c 100644 (file)
 
 /* The source code in this file should be thread-safe.
    Please keep it that way. */
-#include "checkpoint.h"
+#include "gmxpre.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gromacs/legacyheaders/checkpoint.h"
+
+#include "config.h"
 
 #include <errno.h>
 #include <stdlib.h>
 #include <time.h>
 
 #include <fcntl.h>
+
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
 #ifdef GMX_NATIVE_WINDOWS
 /* _chsize_s */
 #include <io.h>
 #include <sys/locking.h>
 #endif
 
-#include "copyrite.h"
-#include "names.h"
-#include "typedefs.h"
-#include "types/commrec.h"
-#include "txtdump.h"
-#include "gromacs/math/vec.h"
-#include "network.h"
-
+#include "buildinfo.h"
 #include "gromacs/fileio/filenm.h"
-#include "gromacs/utility/futil.h"
 #include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/xdrf.h"
 #include "gromacs/fileio/xdr_datatype.h"
+#include "gromacs/fileio/xdrf.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/utility/basenetwork.h"
 #include "gromacs/utility/baseversion.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-#include "buildinfo.h"
-
 #ifdef GMX_FAHCORE
 #include "corewrap.h"
 #endif
@@ -177,7 +174,11 @@ gmx_wintruncate(const char *filename, __int64 size)
         return -1;
     }
 
+#ifdef _MSC_VER
     return _chsize_s( fileno(fp), size);
+#else
+    return _chsize( fileno(fp), size);
+#endif
 #endif
 }
 #endif
@@ -912,12 +913,12 @@ static void do_cpt_header(XDR *xd, gmx_bool bRead, int *file_version,
         *step = idum;
     }
     do_cpt_double_err(xd, "t", t, list);
-    do_cpt_int_err(xd, "#PP-nodes", nnodes, list);
+    do_cpt_int_err(xd, "#PP-ranks", nnodes, list);
     idum = 1;
     do_cpt_int_err(xd, "dd_nc[x]", dd_nc ? &(dd_nc[0]) : &idum, list);
     do_cpt_int_err(xd, "dd_nc[y]", dd_nc ? &(dd_nc[1]) : &idum, list);
     do_cpt_int_err(xd, "dd_nc[z]", dd_nc ? &(dd_nc[2]) : &idum, list);
-    do_cpt_int_err(xd, "#PME-only nodes", npme, list);
+    do_cpt_int_err(xd, "#PME-only ranks", npme, list);
     do_cpt_int_err(xd, "state flags", flags_state, list);
     if (*file_version >= 4)
     {
@@ -1806,10 +1807,10 @@ static void check_match(FILE *fplog,
     check_int   (fplog, "Double prec.", GMX_CPT_BUILD_DP, double_prec, &mm);
     check_string(fplog, "Program name", Program(), fprog, &mm);
 
-    check_int   (fplog, "#nodes", cr->nnodes, npp_f+npme_f, &mm);
+    check_int   (fplog, "#ranks", cr->nnodes, npp_f+npme_f, &mm);
     if (cr->nnodes > 1)
     {
-        check_int (fplog, "#PME-nodes", cr->npmenodes, npme_f, &mm);
+        check_int (fplog, "#PME-ranks", cr->npmenodes, npme_f, &mm);
 
         npp = cr->nnodes;
         if (cr->npmenodes >= 0)