Replace gmx_large_int_t with gmx_int64_t
authorRoland Schulz <roland@utk.edu>
Sun, 8 Dec 2013 21:08:49 +0000 (16:08 -0500)
committerTeemu Murtola <teemu.murtola@gmail.com>
Mon, 23 Dec 2013 18:31:30 +0000 (20:31 +0200)
Most changes are only the rename:
gmx_large_int_t -> gmx_int64_t
gmx_large_int_fmt -> GMX_PRId64 (or GMX_SCNd64)
gmx_large_int_pfmt -> "%"GMX_PRId64 (with space for cpp)
SIZEOF_GMX_LARGE_INT -> 8
GMX_LARGE_INT_MAX -> GMX_INT64_MAX
GMX_MPI_LARGE_INT -> MPI_INT64_T
str_to_large_int_t -> str_to_int64_t
get_egmx_large_int -> get_eint64

Exceptions:
simple.h: Adding of new type
xdrd.c: Remove code for SIZEOF_GMX_LARGE_INT!=8
thread_mpi: Add MPI_INT64_T type
scanner.*: Insert #include for simple.h to fix macro issues

Change-Id: I99abbec0ecafb2580ddba89677a110c137e9abd6

106 files changed:
admin/installguide/installguide.tex
src/gromacs/commandline/pargs.cpp
src/gromacs/commandline/pargs.h
src/gromacs/commandline/wman.cpp
src/gromacs/fileio/enxio.h
src/gromacs/fileio/futil.h
src/gromacs/fileio/gmxfio.h
src/gromacs/fileio/gmxfio_asc.c
src/gromacs/fileio/gmxfio_bin.c
src/gromacs/fileio/gmxfio_rw.c
src/gromacs/fileio/gmxfio_xdr.c
src/gromacs/fileio/trajectory_writing.c
src/gromacs/fileio/trajectory_writing.h
src/gromacs/fileio/trajectory_writing_low_level.c
src/gromacs/fileio/xdrd.c
src/gromacs/fileio/xdrf.h
src/gromacs/gmxana/gmx_bar.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_covar.c
src/gromacs/gmxana/gmx_eneconv.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxana/gmx_genion.c
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_sham.c
src/gromacs/gmxana/gmx_tune_pme.c
src/gromacs/gmxana/nsfactor.c
src/gromacs/gmxlib/bondfree.c
src/gromacs/gmxlib/checkpoint.c
src/gromacs/gmxlib/main.cpp
src/gromacs/gmxlib/maths.c
src/gromacs/gmxlib/network.c
src/gromacs/gmxlib/nrnb.c
src/gromacs/gmxlib/readinp.c
src/gromacs/gmxlib/smalloc.c
src/gromacs/gmxlib/string2.c
src/gromacs/gmxlib/thread_mpi/type.c
src/gromacs/gmxlib/txtdump.c
src/gromacs/gmxlib/typedefs.c
src/gromacs/legacyheaders/bondf.h
src/gromacs/legacyheaders/checkpoint.h
src/gromacs/legacyheaders/constr.h
src/gromacs/legacyheaders/domdec.h
src/gromacs/legacyheaders/ebin.h
src/gromacs/legacyheaders/edsam.h
src/gromacs/legacyheaders/force.h
src/gromacs/legacyheaders/main.h
src/gromacs/legacyheaders/maths.h
src/gromacs/legacyheaders/md_support.h
src/gromacs/legacyheaders/mdebin.h
src/gromacs/legacyheaders/mdrun.h
src/gromacs/legacyheaders/network.h
src/gromacs/legacyheaders/nrnb.h
src/gromacs/legacyheaders/pme.h
src/gromacs/legacyheaders/pull.h
src/gromacs/legacyheaders/pull_rotation.h
src/gromacs/legacyheaders/readinp.h
src/gromacs/legacyheaders/shellfc.h
src/gromacs/legacyheaders/sim_util.h
src/gromacs/legacyheaders/string2.h
src/gromacs/legacyheaders/thread_mpi/mpi_bindings.h
src/gromacs/legacyheaders/thread_mpi/tmpi.h
src/gromacs/legacyheaders/typedefs.h
src/gromacs/legacyheaders/types/commrec.h
src/gromacs/legacyheaders/types/inputrec.h
src/gromacs/legacyheaders/types/nlistheuristics.h
src/gromacs/legacyheaders/types/simple.h
src/gromacs/legacyheaders/types/state.h
src/gromacs/legacyheaders/update.h
src/gromacs/mdlib/clincs.c
src/gromacs/mdlib/constr.c
src/gromacs/mdlib/coupling.c
src/gromacs/mdlib/domdec.c
src/gromacs/mdlib/domdec_setup.c
src/gromacs/mdlib/edsam.c
src/gromacs/mdlib/expanded.c
src/gromacs/mdlib/force.c
src/gromacs/mdlib/md_support.c
src/gromacs/mdlib/mdebin.c
src/gromacs/mdlib/mdebin_bar.c
src/gromacs/mdlib/mdebin_bar.h
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/nlistheuristics.c
src/gromacs/mdlib/pme.c
src/gromacs/mdlib/pme_pp.c
src/gromacs/mdlib/pull.c
src/gromacs/mdlib/pull_rotation.c
src/gromacs/mdlib/shellfc.c
src/gromacs/mdlib/sim_util.c
src/gromacs/mdlib/stat.c
src/gromacs/mdlib/update.c
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.l
src/gromacs/selection/scanner_flex.h
src/gromacs/timing/wallcycle.c
src/gromacs/timing/wallcycle.h
src/gromacs/timing/walltime_accounting.c
src/gromacs/timing/walltime_accounting.h
src/programs/gmx/tpbcmp.c
src/programs/gmx/tpbconv.c
src/programs/mdrun/md.c
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/pme_loadbal.c
src/programs/mdrun/pme_loadbal.h
src/programs/mdrun/repl_ex.c
src/programs/mdrun/repl_ex.h
src/programs/mdrun/runner.c

index 015a274a11dcac139a7ed9d6d44ed4919ff2d1cf..40a0395dbfdef9de4cd23400bb398cafa48d741a 100644 (file)
@@ -90,12 +90,14 @@ are only going to continue to get more complex.
 \gromacs{} can be compiled for any distribution of Linux, Mac OS X,
 Windows (native, Cygwin or MinGW), BlueGene, Cray and many other
 architectures. Technically, it can be compiled on any platform with
-an ANSI C89 compiler, an ISO C++98 compiler, and supporting libraries,
+an ANSI C99 compiler, an ISO C++98 compiler, and supporting libraries,
 such as the GNU C library. However, \gromacs{} also comes with many
 hardware-specific extensions to provide very high performance on those
 platforms, and to enable these we have slightly more specific
 requirements since old compilers do not support new features, or they
-can be buggy.
+can be buggy. Not all of the C99 standard is required and some C89
+compilers (including Microsoft Visual C) will also be able to compile
+Gromacs.
 
 \subsection{Compiler}
 
index 5e71cd8b0517655b53697be4715913dcb21a5bf1..245ec60790278123ab8b2d93366a76515166e1b7 100644 (file)
@@ -100,7 +100,7 @@ static int iscan(int argc, char *argv[], int *i)
 }
 
 /* Same as above, but for large integer values */
-static gmx_large_int_t istepscan(int argc, char *argv[], int *i)
+static gmx_int64_t istepscan(int argc, char *argv[], int *i)
 {
     const char *const arg = argv[*i];
     if (argc <= (*i)+1)
@@ -109,7 +109,7 @@ static gmx_large_int_t istepscan(int argc, char *argv[], int *i)
     }
     const char *const value = argv[++(*i)];
     char             *endptr;
-    gmx_large_int_t   var = str_to_large_int_t(value, &endptr);
+    gmx_int64_t       var = str_to_int64_t(value, &endptr);
     if (*value == '\0' || *endptr != '\0')
     {
         usage("an integer", arg);
index c3b8cd859a3bbfdaf3cda6cdc1086c0337e0c019..b89a347d9549172de46ac364c512f6fa907c1ac5 100644 (file)
@@ -61,7 +61,7 @@ typedef struct
     {
         void            *v; /* This is a nasty workaround, to be able to use initialized */
         int             *i; /* arrays */
-        gmx_large_int_t *is;
+        gmx_int64_t     *is;
         real            *r;
         const char     **c; /* Must be pointer to string (when type == etSTR)         */
         /* or null terminated list of enums (when type == etENUM) */
index ffd0e59576cbba0daf99b91f97c4345d0cf55b90..de19f7aa3f5229752d9054bdc0c44c4e580c7617 100644 (file)
@@ -205,7 +205,7 @@ static char *pa_val(t_pargs *pa, char buf[], int sz)
             sprintf(buf, "%-d", *(pa->u.i));
             break;
         case etGMX_LARGE_INT:
-            sprintf(buf, gmx_large_int_pfmt, *(pa->u.is));
+            sprintf(buf, "%" GMX_PRId64, *(pa->u.is));
             break;
         case etTIME:
         case etREAL:
index 122941a291c22cad7afd03c84c2304c9d41aeb28..922467a0cc3d40756fc45127fb5511438bb35333 100644 (file)
@@ -102,7 +102,7 @@ typedef struct
     float*             fval;
     double*            dval;
     int*               ival;
-    gmx_large_int_t*   lval;
+    gmx_int64_t*       lval;
     unsigned char*     cval;
     char**             sval;
 
@@ -130,8 +130,8 @@ typedef struct t_enxblock{
 /* The frames that are read/written */
 typedef struct {
     double          t;            /* Timestamp of this frame                        */
-    gmx_large_int_t step;         /* MD step                                */
-    gmx_large_int_t nsteps;       /* The number of steps between frames            */
+    gmx_int64_t     step;         /* MD step                                */
+    gmx_int64_t     nsteps;       /* The number of steps between frames            */
     double          dt;           /* The MD time step                              */
     int             nsum;         /* The number of terms for the sums in ener      */
     int             nre;          /* Number of energies                             */
index 8e644085a0f8a4f133a2aec34045ccf0730553ae..0447f9de4d9eddb5cd5215c20f34b42a389ecaca 100644 (file)
@@ -81,9 +81,8 @@ typedef off_t              gmx_off_t;
 typedef __int64            gmx_off_t;
 #  define SIZEOF_GMX_OFF_T   8
 #else
-/* Almost certainly 64 bits, and guaranteed to be available */
-typedef gmx_large_int_t    gmx_off_t;
-#  define SIZEOF_GMX_OFF_T   SIZEOF_GMX_LARGE_INT
+typedef gmx_int64_t    gmx_off_t;
+#  define SIZEOF_GMX_OFF_T   8
 #endif
 
 
index a9ffc11c5d96931676e538d83d699a8caf0eb968..58cc2651c450e274bbcd8b8c08f29018d1b8283f 100644 (file)
@@ -245,7 +245,7 @@ gmx_bool gmx_fio_reade_double(t_fileio *fio, double *item,
                               const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_reade_int(t_fileio *fio, int *item,
                            const char *desc, const char *srcfile, int line);
-gmx_bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item,
+gmx_bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_int64_t *item,
                                      const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_reade_uchar(t_fileio *fio, unsigned char *item,
                              const char *desc, const char *srcfile, int line);
@@ -266,7 +266,7 @@ gmx_bool gmx_fio_writee_double(t_fileio *fio, double item,
                                const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_writee_int(t_fileio *fio, int item,
                             const char *desc, const char *srcfile, int line);
-gmx_bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_large_int_t item,
+gmx_bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_int64_t item,
                                       const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_writee_uchar(t_fileio *fio, unsigned char item,
                               const char *desc, const char *srcfile, int line);
@@ -290,7 +290,7 @@ gmx_bool gmx_fio_doe_gmx_bool(t_fileio *fio, gmx_bool *item,
                               const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_doe_int(t_fileio *fio, int *item,
                          const char *desc, const char *srcfile, int line);
-gmx_bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item,
+gmx_bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_int64_t *item,
                                    const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_doe_uchar(t_fileio *fio, unsigned char *item,
                            const char *desc, const char *srcfile, int line);
@@ -315,7 +315,7 @@ gmx_bool gmx_fio_nreade_double(t_fileio *fio, double *item, int n,
                                const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_nreade_int(t_fileio *fio, int *item, int n,
                             const char *desc, const char *srcfile, int line);
-gmx_bool gmx_fio_nreade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n,
+gmx_bool gmx_fio_nreade_gmx_large_int(t_fileio *fio, gmx_int64_t *item, int n,
                                       const char *desc, const char *srcfile,
                                       int line);
 gmx_bool gmx_fio_nreade_uchar(t_fileio *fio, unsigned char *item, int n,
@@ -338,7 +338,7 @@ gmx_bool gmx_fio_nwritee_double(t_fileio *fio, const double *item, int n,
 gmx_bool gmx_fio_nwritee_int(t_fileio *fio, const int *item, int n,
                              const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_nwritee_gmx_large_int(t_fileio *fio,
-                                       const gmx_large_int_t *item, int n,
+                                       const gmx_int64_t *item, int n,
                                        const char *desc, const char *srcfile,
                                        int line);
 gmx_bool gmx_fio_nwritee_uchar(t_fileio *fio, const unsigned char *item, int n,
@@ -362,7 +362,7 @@ gmx_bool gmx_fio_ndoe_gmx_bool(t_fileio *fio, gmx_bool *item, int n,
                                const char *desc, const char *srcfile, int line);
 gmx_bool gmx_fio_ndoe_int(t_fileio *fio, int *item, int n,
                           const char *desc, const char *srcfile, int line);
-gmx_bool gmx_fio_ndoe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n,
+gmx_bool gmx_fio_ndoe_gmx_large_int(t_fileio *fio, gmx_int64_t *item, int n,
                                     const char *desc, const char *srcfile,
                                     int line);
 gmx_bool gmx_fio_ndoe_uchar(t_fileio *fio, unsigned char *item, int n,
index b8563657d12762ba778eb2cf46e17344b5bd93a5..57bc1b6a805b97c74e10e0633f4ae58d4e2787d0 100644 (file)
@@ -171,8 +171,8 @@ static gmx_bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio,
                                                                           buf));
             break;
         case eioGMX_LARGE_INT:
-            sprintf(strbuf, "%s%s%s", "%", gmx_large_int_fmt, "\n");
-            res = fprintf(fp, strbuf, *((gmx_large_int_t *) item),
+            sprintf(strbuf, "%s%s%s", "%", GMX_PRId64, "\n");
+            res = fprintf(fp, strbuf, *((gmx_int64_t *) item),
                           gmx_fio_dbgstr(fio, desc, buf));
             break;
         case eioUCHAR:
@@ -292,7 +292,7 @@ static gmx_bool do_ascread(t_fileio *fio, void *item, int nitem, int eio,
 {
     FILE           *fp = fio->fp;
     int             i, m, res = 0, *iptr, ix;
-    gmx_large_int_t s;
+    gmx_int64_t     s;
     double          d, x;
     real           *ptr;
     unsigned char   uc, *ucptr;
@@ -321,10 +321,10 @@ static gmx_bool do_ascread(t_fileio *fio, void *item, int nitem, int eio,
             break;
         case eioGMX_LARGE_INT:
             res = sscanf(next_item(fp, ni_buf, NEXT_ITEM_BUF_LEN),
-                         gmx_large_int_pfmt, &s);
+                         "%"GMX_SCNd64, &s);
             if (item)
             {
-                *((gmx_large_int_t *) item) = s;
+                *((gmx_int64_t *) item) = s;
             }
             break;
         case eioUCHAR:
index 821da26aa6f4c09513179a0388f4b6e513a6ac66..6c2bc2ab5d552ab1f32da237f5abae688bd89db3 100644 (file)
@@ -90,7 +90,7 @@ static gmx_bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio,
             size = sizeof(int);
             break;
         case eioGMX_LARGE_INT:
-            size = sizeof(gmx_large_int_t);
+            size = sizeof(gmx_int64_t);
             break;
         case eioUCHAR:
             size = sizeof(unsigned char);
@@ -160,7 +160,7 @@ static gmx_bool do_binread(t_fileio *fio, void *item, int nitem, int eio,
             size = sizeof(int);
             break;
         case eioGMX_LARGE_INT:
-            size = sizeof(gmx_large_int_t);
+            size = sizeof(gmx_int64_t);
             break;
         case eioUCHAR:
             size = sizeof(unsigned char);
index 5036fd75efeae12c91ae0b8f651b663046d105d7..bdeed1855408bb4527dba225b0c7afc88faa68c2 100644 (file)
@@ -104,7 +104,7 @@ gmx_bool gmx_fio_reade_int(t_fileio *fio, int *item,
     return ret;
 }
 
-gmx_bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item,
+gmx_bool gmx_fio_reade_gmx_large_int(t_fileio *fio, gmx_int64_t *item,
                                      const char *desc, const char *srcfile, int line)
 {
     gmx_bool ret;
@@ -209,7 +209,7 @@ gmx_bool gmx_fio_writee_int(t_fileio *fio, int item,
     return ret;
 }
 
-gmx_bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_large_int_t item,
+gmx_bool gmx_fio_writee_gmx_large_int(t_fileio *fio, gmx_int64_t item,
                                       const char *desc, const char *srcfile, int line)
 {
     gmx_bool ret;
@@ -364,7 +364,7 @@ gmx_bool gmx_fio_doe_int(t_fileio *fio, int *item,
     return ret;
 }
 
-gmx_bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item,
+gmx_bool gmx_fio_doe_gmx_large_int(t_fileio *fio, gmx_int64_t *item,
                                    const char *desc, const char *srcfile, int line)
 {
     gmx_bool ret;
@@ -533,7 +533,7 @@ gmx_bool gmx_fio_nreade_int(t_fileio *fio, int *item, int n,
     return ret;
 }
 
-gmx_bool gmx_fio_nreade_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n,
+gmx_bool gmx_fio_nreade_gmx_large_int(t_fileio *fio, gmx_int64_t *item, int n,
                                       const char *desc, const char *srcfile, int line)
 {
     gmx_bool ret = TRUE;
@@ -678,7 +678,7 @@ gmx_bool gmx_fio_nwritee_int(t_fileio *fio, const int *item, int n,
 }
 
 gmx_bool gmx_fio_nwritee_gmx_large_int(t_fileio *fio,
-                                       const gmx_large_int_t *item, int n,
+                                       const gmx_int64_t *item, int n,
                                        const char *desc, const char *srcfile, int line)
 {
     gmx_bool ret = TRUE;
@@ -890,7 +890,7 @@ gmx_bool gmx_fio_ndoe_int(t_fileio *fio, int *item, int n,
 
 
 
-gmx_bool gmx_fio_ndoe_gmx_large_int(t_fileio *fio, gmx_large_int_t *item, int n,
+gmx_bool gmx_fio_ndoe_gmx_large_int(t_fileio *fio, gmx_int64_t *item, int n,
                                     const char *desc, const char *srcfile, int line)
 {
     gmx_bool ret = TRUE;
index 5d82febed976ffe4a31c0c338648b1714a52eddf..11217cb6d7905d0c074846f57e808110cb8acd0c 100644 (file)
@@ -79,7 +79,7 @@ static gmx_bool do_xdr(t_fileio *fio, void *item, int nitem, int eio,
     float           fvec[DIM];
     double          dvec[DIM];
     int             j, m, *iptr, idum;
-    gmx_large_int_t sdum;
+    gmx_int64_t     sdum;
     real           *ptr;
     unsigned short  us;
     double          d = 0;
@@ -148,17 +148,14 @@ static gmx_bool do_xdr(t_fileio *fio, void *item, int nitem, int eio,
             }
             break;
         case eioGMX_LARGE_INT:
-            /* do_xdr will not generate a warning when a 64bit gmx_large_int_t
-             * value that is out of 32bit range is read into a 32bit gmx_large_int_t.
-             */
             if (item && !fio->bRead)
             {
-                sdum = *(gmx_large_int_t *) item;
+                sdum = *(gmx_int64_t *) item;
             }
             res = xdr_gmx_large_int(fio->xdr, &sdum);
             if (item)
             {
-                *(gmx_large_int_t *) item = sdum;
+                *(gmx_int64_t *) item = sdum;
             }
             break;
         case eioUCHAR:
index d204b6cbc52fca568a5b92bda99c2621c8c02394..e109fc75ed9d3a2b93760a08ed230e0d1a149826 100644 (file)
@@ -53,8 +53,8 @@ do_trajectory_writing(FILE           *fplog,
                       t_commrec      *cr,
                       int             nfile,
                       const t_filenm  fnm[],
-                      gmx_large_int_t step,
-                      gmx_large_int_t step_rel,
+                      gmx_int64_t     step,
+                      gmx_int64_t     step_rel,
                       double          t,
                       t_inputrec     *ir,
                       t_state        *state,
index 2fa803abe33640dbb47f6b39c3feed2a9b9c8954..53fd96d887460ef9821dedd1f350ef5fbacc93d0 100644 (file)
@@ -51,8 +51,8 @@ do_trajectory_writing(FILE           *fplog,
                       t_commrec      *cr,
                       int             nfile,
                       const t_filenm  fnm[],
-                      gmx_large_int_t step,
-                      gmx_large_int_t step_rel,
+                      gmx_int64_t     step,
+                      gmx_int64_t     step_rel,
                       double          t,
                       t_inputrec     *ir,
                       t_state        *state,
@@ -80,7 +80,7 @@ void write_traj(FILE *fplog, t_commrec *cr,
                 gmx_mdoutf_t *of,
                 int mdof_flags,
                 gmx_mtop_t *top_global,
-                gmx_large_int_t step, double t,
+                gmx_int64_t step, double t,
                 t_state *state_local, t_state *state_global,
                 rvec *f_local, rvec *f_global,
                 int *n_xtc, rvec **x_xtc);
index 764b961972de3a85f0583009b5b6d7df8dd57ac4..0559b9af3570d3c5af9cba63cca66144903618e2 100644 (file)
@@ -55,7 +55,7 @@ void write_traj(FILE *fplog, t_commrec *cr,
                 gmx_mdoutf_t *of,
                 int mdof_flags,
                 gmx_mtop_t *top_global,
-                gmx_large_int_t step, double t,
+                gmx_int64_t step, double t,
                 t_state *state_local, t_state *state_global,
                 rvec *f_local, rvec *f_global,
                 int *n_xtc, rvec **x_xtc)
index 8da1b6af2ff1f2d7fca921c94a49de65eccdfdd5..bfe81fd0aea54c09a26b3ddb3bd711f5b940dfe8 100644 (file)
@@ -94,49 +94,24 @@ int xdr3drcoord(XDR *xdrs, real *fp, int *size, real *precision)
 #endif
 }
 
-int xdr_gmx_large_int(XDR *xdrs, gmx_large_int_t *i)
+int xdr_gmx_large_int(XDR *xdrs, gmx_int64_t *i)
 {
     /* This routine stores values compatible with xdr_int64_t */
 
     int imaj, imin;
     int ret;
 
-#if ((defined SIZEOF_GMX_LARGE_INT) && SIZEOF_GMX_LARGE_INT == 8)
-    static const gmx_large_int_t two_p32_m1 = 0xFFFFFFFF;
-    gmx_large_int_t              imaj64, imin64;
+    static const gmx_int64_t two_p32_m1 = 0xFFFFFFFF;
+    gmx_int64_t              imaj64, imin64;
 
     imaj64 = ((*i)>>32) & two_p32_m1;
     imin64 = (*i) & two_p32_m1;
     imaj   = (int)imaj64;
     imin   = (int)imin64;
-#else
-    /* Our code has 4 bytes, but we should make sure that this value
-     * will be correctly read by 8 byte code.
-     */
-    if (*i >= 0)
-    {
-        imaj = 0;
-    }
-    else
-    {
-        imaj = -1;
-    }
-    imin = *i;
-#endif
-    ret = xdr_int(xdrs, &imaj);
-    ret = xdr_int(xdrs, &imin);
+    ret    = xdr_int(xdrs, &imaj);
+    ret    = xdr_int(xdrs, &imin);
 
-#if ((defined SIZEOF_GMX_LARGE_INT) && SIZEOF_GMX_LARGE_INT == 8)
-    *i = (((gmx_large_int_t)imaj << 32) | ((gmx_large_int_t)imin & two_p32_m1));
-#else
-    *i = imin;
-
-    if (warn != NULL && (imaj < -1 || imaj > 0))
-    {
-        fprintf(stderr, "\nWARNING during %s:\n", warn);
-        fprintf(stderr, "a step value written by code supporting 64bit integers is read by code that only supports 32bit integers, out of range step value has been converted to %d\n\n", *i);
-    }
-#endif
+    *i = (((gmx_int64_t)imaj << 32) | ((gmx_int64_t)imin & two_p32_m1));
 
     return ret;
 }
index 7e2714c0c7b4a0ef9d16718ad195c89edb02e839..3a19b42b9dfe86ed64642d63556718df79a25258 100644 (file)
@@ -71,10 +71,8 @@ int xdr_real(XDR *xdrs, real *r);
 int xdr3drcoord(XDR *xdrs, real *fp, int *size, real *precision);
 
 
-int xdr_gmx_large_int(XDR *xdrs, gmx_large_int_t *i);
-/* Read or write a gmx_large_int_t value.
- * 32bit code reading a 64bit gmx_large_int_t value from xdrs could
- * lead to values out of int range.
+int xdr_gmx_large_int(XDR *xdrs, gmx_int64_t *i);
+/* Read or write a gmx_int64_t value.
  * When warn!=NULL a warning will be written to stderr
  * when a value does not fit,
  * the first line is:
index 3354fb5600510b6b79c1eed94b9766f052db5777..9ab07bd480914c4164dc42a591427a2a095bf433 100644 (file)
@@ -107,12 +107,12 @@ typedef struct hist_t
     unsigned int   *bin[2];                 /* the (forward + reverse) histogram values */
     double          dx[2];                  /* the histogram spacing. The reverse
                                                dx is the negative of the forward dx.*/
-    gmx_large_int_t x0[2];                  /* the (forward + reverse) histogram start
-                                               point(s) as int */
+    gmx_int64_t     x0[2];                  /* the (forward + reverse) histogram start
+                                                   point(s) as int */
 
     int             nbin[2];                /* the (forward+reverse) number of bins */
-    gmx_large_int_t sum;                    /* the total number of counts. Must be
-                                               the same for forward + reverse.  */
+    gmx_int64_t     sum;                    /* the total number of counts. Must be
+                                                   the same for forward + reverse.  */
     int             nhist;                  /* number of hist datas (forward or reverse) */
 
     double          start_time, delta_time; /* start time, end time of histogram */
@@ -141,7 +141,7 @@ typedef struct samples_t
     size_t          ndu_alloc, nt_alloc; /* pre-allocated sizes */
     hist_t         *hist_alloc;          /* allocated hist */
 
-    gmx_large_int_t ntot;                /* total number of samples */
+    gmx_int64_t     ntot;                /* total number of samples */
     const char     *filename;            /* the file name this sample comes from */
 } samples_t;
 
@@ -171,8 +171,8 @@ typedef struct sample_coll_t
     sample_range_t *r;                 /* the sample ranges */
     int             nsamples_alloc;    /* number of allocated samples */
 
-    gmx_large_int_t ntot;              /* total number of samples in the ranges of
-                                          this collection */
+    gmx_int64_t     ntot;              /* total number of samples in the ranges of
+                                              this collection */
 
     struct sample_coll_t *next, *prev; /* next and previous in the list */
 } sample_coll_t;
@@ -1420,9 +1420,9 @@ static gmx_bool sample_coll_create_subsample(sample_coll_t  *sc,
     int             j;
     int             hist_start, hist_end;
 
-    gmx_large_int_t ntot_start;
-    gmx_large_int_t ntot_end;
-    gmx_large_int_t ntot_so_far;
+    gmx_int64_t     ntot_start;
+    gmx_int64_t     ntot_end;
+    gmx_int64_t     ntot_so_far;
 
     *sc = *sc_orig; /* just copy all fields */
 
@@ -1439,13 +1439,13 @@ static gmx_bool sample_coll_create_subsample(sample_coll_t  *sc,
 
     /* now fix start and end fields */
     /* the casts avoid possible overflows */
-    ntot_start  = (gmx_large_int_t)(sc_orig->ntot*(double)i/(double)ni);
-    ntot_end    = (gmx_large_int_t)(sc_orig->ntot*(double)(i+1)/(double)ni);
+    ntot_start  = (gmx_int64_t)(sc_orig->ntot*(double)i/(double)ni);
+    ntot_end    = (gmx_int64_t)(sc_orig->ntot*(double)(i+1)/(double)ni);
     ntot_so_far = 0;
     for (j = 0; j < sc->nsamples; j++)
     {
-        gmx_large_int_t ntot_add;
-        gmx_large_int_t new_start, new_end;
+        gmx_int64_t ntot_add;
+        gmx_int64_t new_start, new_end;
 
         if (sc->r[j].use)
         {
@@ -3131,7 +3131,7 @@ static samples_t *read_edr_hist_block(int *nsamples, t_enxblock *blk,
     for (i = 0; i < nhist; i++)
     {
         int             nbin;
-        gmx_large_int_t sum = 0;
+        gmx_int64_t     sum = 0;
 
         for (j = 0; j < s->hist->nbin[i]; j++)
         {
index 7e64bb71004e36439991f655953c56c361703454..4b58ca85316a23665c21cf2d3c5e860b0eb6ec34 100644 (file)
@@ -1405,7 +1405,7 @@ int gmx_cluster(int argc, char *argv[])
 
     FILE              *fp, *log;
     int                nf, i, i1, i2, j;
-    gmx_large_int_t    nrms = 0;
+    gmx_int64_t        nrms = 0;
 
     matrix             box;
     rvec              *xtps, *usextps, *x1, **xx = NULL;
@@ -1740,7 +1740,7 @@ int gmx_cluster(int argc, char *argv[])
     else   /* !bReadMat */
     {
         rms  = init_mat(nf, method == m_diagonalize);
-        nrms = ((gmx_large_int_t)nf*((gmx_large_int_t)nf-1))/2;
+        nrms = ((gmx_int64_t)nf*((gmx_int64_t)nf-1))/2;
         if (!bRMSdist)
         {
             fprintf(stderr, "Computing %dx%d RMS deviation matrix\n", nf, nf);
@@ -1761,8 +1761,8 @@ int gmx_cluster(int argc, char *argv[])
                     rmsd = rmsdev(isize, mass, xx[i2], x1);
                     set_mat_entry(rms, i1, i2, rmsd);
                 }
-                nrms -= (gmx_large_int_t) (nf-i1-1);
-                fprintf(stderr, "\r# RMSD calculations left: " gmx_large_int_pfmt "   ", nrms);
+                nrms -= (gmx_int64_t) (nf-i1-1);
+                fprintf(stderr, "\r# RMSD calculations left: " "%"GMX_PRId64 "   ", nrms);
             }
             sfree(x1);
         }
@@ -1787,7 +1787,7 @@ int gmx_cluster(int argc, char *argv[])
                     set_mat_entry(rms, i1, i2, rms_dist(isize, d1, d2));
                 }
                 nrms -= (nf-i1-1);
-                fprintf(stderr, "\r# RMSD calculations left: " gmx_large_int_pfmt "   ", nrms);
+                fprintf(stderr, "\r# RMSD calculations left: " "%"GMX_PRId64 "   ", nrms);
             }
             /* Clean up work arrays */
             for (i = 0; (i < isize); i++)
index 237b8602ef5a921105ba2ada154f5264b8772d24..503032fc9ac50d833f3cdcedbbf50d6b4a364ab8 100644 (file)
@@ -132,7 +132,7 @@ int gmx_covar(int argc, char *argv[])
     real            min, max, *axis;
     int             ntopatoms, step;
     int             natoms, nat, count, nframes0, nframes, nlevels;
-    gmx_large_int_t ndim, i, j, k, l;
+    gmx_int64_t     ndim, i, j, k, l;
     int             WriteXref;
     const char     *fitfile, *trxfile, *ndxfile;
     const char     *eigvalfile, *eigvecfile, *averfile, *logfile;
@@ -266,7 +266,7 @@ int gmx_covar(int argc, char *argv[])
     snew(x, natoms);
     snew(xav, natoms);
     ndim = natoms*DIM;
-    if (sqrt(GMX_LARGE_INT_MAX) < ndim)
+    if (sqrt(GMX_INT64_MAX) < ndim)
     {
         gmx_fatal(FARGS, "Number of degrees of freedoms to large for matrix.\n");
     }
index 4946eb0a84174e52780e6fae670ab05a52ed720b..b265992d61ee6c063a994be372e9a6a43e245847 100644 (file)
@@ -347,8 +347,8 @@ static void copy_ee(t_energy *src, t_energy *dst, int nre)
     }
 }
 
-static void update_ee(t_energy *lastee, gmx_large_int_t laststep,
-                      t_energy *startee, gmx_large_int_t startstep,
+static void update_ee(t_energy *lastee, gmx_int64_t laststep,
+                      t_energy *startee, gmx_int64_t startstep,
                       t_energy *ee, int step,
                       t_energy *outee, int nre)
 {
@@ -383,8 +383,8 @@ static void update_ee(t_energy *lastee, gmx_large_int_t laststep,
          */
         if (startstep > 0)
         {
-            gmx_large_int_t q = laststep+step;
-            gmx_large_int_t p = startstep+1;
+            gmx_int64_t q = laststep+step;
+            gmx_int64_t p = startstep+1;
             prestart_esum  = startee[i].esum-startee[i].e;
             sigmacorr      = prestart_esum-(p-1)*startee[i].e;
             prestart_sigma = startee[i].eav-
@@ -407,13 +407,13 @@ static void update_ee(t_energy *lastee, gmx_large_int_t laststep,
 }
 
 static void update_ee_sum(int nre,
-                          gmx_large_int_t *ee_sum_step,
-                          gmx_large_int_t *ee_sum_nsteps,
-                          gmx_large_int_t *ee_sum_nsum,
+                          gmx_int64_t *ee_sum_step,
+                          gmx_int64_t *ee_sum_nsteps,
+                          gmx_int64_t *ee_sum_nsum,
                           t_energy *ee_sum,
                           t_enxframe *fr, int out_step)
 {
-    gmx_large_int_t nsteps, nsum, fr_nsum;
+    gmx_int64_t     nsteps, nsum, fr_nsum;
     int             i;
 
     nsteps = *ee_sum_nsteps;
@@ -517,9 +517,9 @@ int gmx_eneconv(int argc, char *argv[])
     gmx_enxnm_t    *enm = NULL;
 #endif
     t_enxframe     *fr, *fro;
-    gmx_large_int_t ee_sum_step = 0, ee_sum_nsteps, ee_sum_nsum;
+    gmx_int64_t     ee_sum_step = 0, ee_sum_nsteps, ee_sum_nsum;
     t_energy       *ee_sum;
-    gmx_large_int_t lastfilestep, laststep, startstep, startstep_file = 0;
+    gmx_int64_t     lastfilestep, laststep, startstep, startstep_file = 0;
     int             noutfr;
     int             nre, nremax, this_nre, nfile, f, i, j, kkk, nset, *set = NULL;
     double          last_t;
@@ -725,8 +725,8 @@ int gmx_eneconv(int argc, char *argv[])
                 }
                 else
                 {
-                    fro->nsum = gmx_large_int_to_int(ee_sum_nsum,
-                                                     "energy average summation");
+                    fro->nsum = gmx_int64_to_int(ee_sum_nsum,
+                                                 "energy average summation");
                     /* Copy the energy sums */
                     for (i = 0; i < nre; i++)
                     {
index ad81bced5dfafb5d7eb756cdafe307b8b7503f9b..6d700e1726a1729e6952532880570b1791f705c0 100644 (file)
@@ -79,8 +79,8 @@ typedef struct {
 } enerdat_t;
 
 typedef struct {
-    gmx_large_int_t  nsteps;
-    gmx_large_int_t  npoints;
+    gmx_int64_t      nsteps;
+    gmx_int64_t      npoints;
     int              nframes;
     int             *step;
     int             *steps;
@@ -633,7 +633,7 @@ static void einstein_visco(const char *fn, const char *fni, int nsets,
 }
 
 typedef struct {
-    gmx_large_int_t np;
+    gmx_int64_t     np;
     double          sum;
     double          sav;
     double          sav2;
@@ -642,8 +642,8 @@ typedef struct {
 typedef struct {
     int             b;
     ee_sum_t        sum;
-    gmx_large_int_t nst;
-    gmx_large_int_t nst_min;
+    gmx_int64_t     nst;
+    gmx_int64_t     nst_min;
 } ener_ee_t;
 
 static void clear_ee_sum(ee_sum_t *ees)
@@ -697,7 +697,7 @@ static void calc_averages(int nset, enerdata_t *edat, int nbmin, int nbmax)
 {
     int             nb, i, f, nee;
     double          sum, sum2, sump, see2;
-    gmx_large_int_t steps, np, p, bound_nb;
+    gmx_int64_t     steps, np, p, bound_nb;
     enerdat_t      *ed;
     exactsum_t     *es;
     gmx_bool        bAllZero;
@@ -1132,8 +1132,8 @@ static void calc_fluctuation_props(FILE *fp,
 static void analyse_ener(gmx_bool bCorr, const char *corrfn,
                          gmx_bool bFee, gmx_bool bSum, gmx_bool bFluct,
                          gmx_bool bVisco, const char *visfn, int nmol,
-                         gmx_large_int_t start_step, double start_t,
-                         gmx_large_int_t step, double t,
+                         gmx_int64_t start_step, double start_t,
+                         gmx_int64_t step, double t,
                          double time[], real reftemp,
                          enerdata_t *edat,
                          int nset, int set[], gmx_bool *bIsEner,
@@ -1149,7 +1149,7 @@ static void analyse_ener(gmx_bool bCorr, const char *corrfn,
     real            xxx, integral, intBulk, Temp = 0, Pres = 0;
     real            sfrac, oldfrac, diffsum, diffav, fstep, pr_aver, pr_stddev, pr_errest;
     double          beta = 0, expE, expEtot, *fee = NULL;
-    gmx_large_int_t nsteps;
+    gmx_int64_t     nsteps;
     int             nexact, nnotexact;
     double          x1m, x1mk;
     int             i, j, k, nout;
@@ -1695,7 +1695,7 @@ static void do_dhdl(t_enxframe *fr, t_inputrec *ir, FILE **fp_dhdl,
     /* write the data */
     if (nblock_hist > 0)
     {
-        gmx_large_int_t sum = 0;
+        gmx_int64_t sum = 0;
         /* histograms */
         for (i = 0; i < fr->nblock; i++)
         {
@@ -1703,7 +1703,7 @@ static void do_dhdl(t_enxframe *fr, t_inputrec *ir, FILE **fp_dhdl,
             if (blk->id == enxDHHIST)
             {
                 double          foreign_lambda, dx;
-                gmx_large_int_t x0;
+                gmx_int64_t     x0;
                 int             nhist, derivative;
 
                 /* check the block types etc. */
@@ -1985,7 +1985,7 @@ int gmx_energy(int argc, char *argv[])
     int                cur = 0;
 #define NEXT (1-cur)
     int                nre, teller, teller_disre, nfr;
-    gmx_large_int_t    start_step;
+    gmx_int64_t        start_step;
     int                nor = 0, nex = 0, norfr = 0, enx_i = 0;
     real               start_t;
     real              *bounds  = NULL, *violaver = NULL, *oobs = NULL, *orient = NULL, *odrms = NULL;
index 05dea2dec31a1e7dab96f84af3133e55d2294eaa..d60ea75c3fedfa512631c49d80a6497cbe001a16 100644 (file)
@@ -67,7 +67,7 @@ static void insert_ion(int nsa, int *nwater,
     int             i, ei, nw;
     real            rmin2;
     rvec            dx;
-    gmx_large_int_t maxrand;
+    gmx_int64_t     maxrand;
 
     ei       = -1;
     nw       = *nwater;
index 5865577c826c91686c5de4b327428e7cfa0f00ff..27ae29b5e636f16de34737f503886ef50d112e70 100644 (file)
@@ -79,7 +79,7 @@ enum {
 
 typedef struct
 {
-    gmx_large_int_t orig_sim_steps;  /* Number of steps to be done in the real simulation  */
+    gmx_int64_t     orig_sim_steps;  /* Number of steps to be done in the real simulation  */
     int             n_entries;       /* Number of entries in arrays                        */
     real            volume;          /* The volume of the box                              */
     matrix          recipbox;        /* The reciprocal box                                 */
index 67a66d2128eddd894dd703252789f1fda5b5e255..53f3082132d7297dd9665f87f72d67df816584da 100644 (file)
@@ -65,9 +65,9 @@ static int index3(int *ibox, int x, int y, int z)
     return (ibox[2]*(ibox[1]*x+y)+z);
 }
 
-static gmx_large_int_t indexn(int ndim, const int *ibox, const int *nxyz)
+static gmx_int64_t indexn(int ndim, const int *ibox, const int *nxyz)
 {
-    gmx_large_int_t d, dd;
+    gmx_int64_t     d, dd;
     int             k, kk;
 
     /* Compute index in 1-D array */
@@ -200,7 +200,7 @@ static void normalize_p_e(int len, double *P, int *nbin, real *E, real pmin)
 }
 
 typedef struct {
-    gmx_large_int_t index;
+    gmx_int64_t     index;
     real            ener;
 } t_minimum;
 
@@ -227,7 +227,7 @@ static inline
 void print_minimum(FILE *fp, int num, const t_minimum *min)
 {
     fprintf(fp,
-            "Minimum %d at index " gmx_large_int_pfmt " energy %10.3f\n",
+            "Minimum %d at index " "%"GMX_PRId64 " energy %10.3f\n",
             num, min->index, min->ener);
 }
 
@@ -1023,7 +1023,7 @@ int gmx_sham(int argc, char *argv[])
     double         *av, *sig, cum1, cum2, cum3, cum4, db;
     const char     *fn_ge, *fn_ene;
     output_env_t    oenv;
-    gmx_large_int_t num_grid_points;
+    gmx_int64_t     num_grid_points;
 
     t_filenm        fnm[] = {
         { efXVG, "-f",    "graph",    ffREAD   },
@@ -1142,17 +1142,15 @@ int gmx_sham(int argc, char *argv[])
     num_grid_points = ibox[0];
     for (i = 1; i < nset; i++)
     {
-        gmx_large_int_t result;
+        gmx_int64_t result;
         if (!check_int_multiply_for_overflow(num_grid_points, ibox[i], &result))
         {
             gmx_fatal(FARGS,
-                      "The number of dimensions and grid points is too large for this tool\n"
-                      "to handle with what it knows about the architecture upon which it\n"
-                      "is running. Use a different machine or consult the GROMACS mailing list.");
+                      "The number of dimensions and grid points is too large for this tool.\n");
         }
         num_grid_points = result;
     }
-    /* The number of grid points fits in a gmx_large_int_t. */
+    /* The number of grid points fits in a gmx_int64_t. */
 
     do_sham(opt2fn("-dist", NFILE, fnm), opt2fn("-bin", NFILE, fnm),
             opt2fn("-lp", NFILE, fnm),
index fa1cba5516b4ba056a54be733ec0149691cd914f..194bacb1f864f472f4bf142b735badfa71f030d3 100644 (file)
@@ -96,8 +96,8 @@ typedef struct
 typedef struct
 {
     int             nr_inputfiles;  /* The number of tpr and mdp input files */
-    gmx_large_int_t orig_sim_steps; /* Number of steps to be done in the real simulation */
-    gmx_large_int_t orig_init_step; /* Init step for the real simulation */
+    gmx_int64_t     orig_sim_steps; /* Number of steps to be done in the real simulation */
+    gmx_int64_t     orig_init_step; /* Init step for the real simulation */
     real           *rcoulomb;       /* The coulomb radii [0...nr_inputfiles] */
     real           *rvdw;           /* The vdW radii */
     real           *rlist;          /* Neighbourlist cutoff radius */
@@ -187,7 +187,7 @@ enum {
 };
 
 static int parse_logfile(const char *logfile, const char *errfile,
-                         t_perf *perfdata, int test_nr, int presteps, gmx_large_int_t cpt_steps,
+                         t_perf *perfdata, int test_nr, int presteps, gmx_int64_t cpt_steps,
                          int nnodes)
 {
     FILE           *fp;
@@ -202,7 +202,7 @@ static int parse_logfile(const char *logfile, const char *errfile,
     float           dum1, dum2, dum3, dum4;
     int             ndum;
     int             npme;
-    gmx_large_int_t resetsteps     = -1;
+    gmx_int64_t     resetsteps     = -1;
     gmx_bool        bFoundResetStr = FALSE;
     gmx_bool        bResetChecked  = FALSE;
 
@@ -242,7 +242,7 @@ static int parse_logfile(const char *logfile, const char *errfile,
         {
             if (strstr(line, matchstrcr) != NULL)
             {
-                sprintf(dumstring, "step %s", gmx_large_int_pfmt);
+                sprintf(dumstring, "step %s", "%"GMX_SCNd64);
                 sscanf(line, dumstring, &resetsteps);
                 bFoundResetStr = TRUE;
                 if (resetsteps == presteps+cpt_steps)
@@ -251,8 +251,8 @@ static int parse_logfile(const char *logfile, const char *errfile,
                 }
                 else
                 {
-                    sprintf(dumstring, gmx_large_int_pfmt, resetsteps);
-                    sprintf(dumstring2, gmx_large_int_pfmt, presteps+cpt_steps);
+                    sprintf(dumstring, "%"GMX_PRId64, resetsteps);
+                    sprintf(dumstring2, "%"GMX_PRId64, presteps+cpt_steps);
                     fprintf(stderr, "WARNING: Time step counters were reset at step %s,\n"
                             "         though they were supposed to be reset at step %s!\n",
                             dumstring, dumstring2);
@@ -772,8 +772,8 @@ static void launch_simulation(
 
 
 static void modify_PMEsettings(
-        gmx_large_int_t simsteps,    /* Set this value as number of time steps */
-        gmx_large_int_t init_step,   /* Set this value as init_step */
+        gmx_int64_t     simsteps,    /* Set this value as number of time steps */
+        gmx_int64_t     init_step,   /* Set this value as init_step */
         const char     *fn_best_tpr, /* tpr file with the best performance */
         const char     *fn_sim_tpr)  /* name of tpr file to be launched */
 {
@@ -790,7 +790,7 @@ static void modify_PMEsettings(
     ir->init_step = init_step;
 
     /* Write the tpr file which will be launched */
-    sprintf(buf, "Writing optimized simulation file %s with nsteps=%s.\n", fn_sim_tpr, gmx_large_int_pfmt);
+    sprintf(buf, "Writing optimized simulation file %s with nsteps=%s.\n", fn_sim_tpr, "%"GMX_PRId64);
     fprintf(stdout, buf, ir->nsteps);
     fflush(stdout);
     write_tpx_state(fn_sim_tpr, ir, &state, &mtop);
@@ -806,8 +806,8 @@ static void modify_PMEsettings(
 static void make_benchmark_tprs(
         const char     *fn_sim_tpr,      /* READ : User-provided tpr file                 */
         char           *fn_bench_tprs[], /* WRITE: Names of benchmark tpr files           */
-        gmx_large_int_t benchsteps,      /* Number of time steps for benchmark runs       */
-        gmx_large_int_t statesteps,      /* Step counter in checkpoint file               */
+        gmx_int64_t     benchsteps,      /* Number of time steps for benchmark runs       */
+        gmx_int64_t     statesteps,      /* Step counter in checkpoint file               */
         real            rmin,            /* Minimal Coulomb radius                        */
         real            rmax,            /* Maximal Coulomb radius                        */
         real            bScaleRvdw,      /* Scale rvdw along with rcoulomb                */
@@ -830,11 +830,11 @@ static void make_benchmark_tprs(
 
 
     sprintf(buf, "Making benchmark tpr file%s with %s time step%s",
-            *ntprs > 1 ? "s" : "", gmx_large_int_pfmt, benchsteps > 1 ? "s" : "");
+            *ntprs > 1 ? "s" : "", "%"GMX_PRId64, benchsteps > 1 ? "s" : "");
     fprintf(stdout, buf, benchsteps);
     if (statesteps > 0)
     {
-        sprintf(buf, " (adding %s steps from checkpoint file)", gmx_large_int_pfmt);
+        sprintf(buf, " (adding %s steps from checkpoint file)", "%"GMX_PRId64);
         fprintf(stdout, buf, statesteps);
         benchsteps += statesteps;
     }
@@ -1032,7 +1032,7 @@ static void make_benchmark_tprs(
         sprintf(buf, "_bench%.2d.tpr", j);
         strcat(fn_bench_tprs[j], buf);
         fprintf(stdout, "Writing benchmark tpr %s with nsteps=", fn_bench_tprs[j]);
-        fprintf(stdout, gmx_large_int_pfmt, ir->nsteps);
+        fprintf(stdout, "%"GMX_PRId64, ir->nsteps);
         if (j > 0)
         {
             fprintf(stdout, ", scaling factor %f\n", fac);
@@ -1361,7 +1361,7 @@ static void do_the_tests(
         const t_filenm *fnm,            /* List of filenames from command line    */
         int             nfile,          /* Number of files specified on the cmdl. */
         int             presteps,       /* DLB equilibration steps, is checked    */
-        gmx_large_int_t cpt_steps)      /* Time step counter in the checkpoint    */
+        gmx_int64_t     cpt_steps)      /* Time step counter in the checkpoint    */
 {
     int      i, nr, k, ret, count = 0, totaltests;
     int     *nPMEnodes = NULL;
@@ -1559,7 +1559,7 @@ static void check_input(
         real            maxPMEfraction,
         real            minPMEfraction,
         int             npme_fixed,
-        gmx_large_int_t bench_nsteps,
+        gmx_int64_t     bench_nsteps,
         const t_filenm *fnm,
         int             nfile,
         int             sim_part,
@@ -1703,7 +1703,7 @@ static void check_input(
     if (bench_nsteps > 10000 || bench_nsteps < 100)
     {
         fprintf(stderr, "WARNING: steps=");
-        fprintf(stderr, gmx_large_int_pfmt, bench_nsteps);
+        fprintf(stderr, "%"GMX_PRId64, bench_nsteps);
         fprintf(stderr, ". Are you sure you want to perform so %s steps for each benchmark?\n", (bench_nsteps < 100) ? "few" : "many");
     }
 
@@ -2057,9 +2057,9 @@ int gmx_tune_pme(int argc, char *argv[])
     real            rmin           = 0.0, rmax = 0.0; /* min and max value for rcoulomb if scaling is requested */
     real            rcoulomb       = -1.0;            /* Coulomb radius as set in .tpr file */
     gmx_bool        bScaleRvdw     = TRUE;
-    gmx_large_int_t bench_nsteps   = BENCHSTEPS;
-    gmx_large_int_t new_sim_nsteps = -1;  /* -1 indicates: not set by the user */
-    gmx_large_int_t cpt_steps      = 0;   /* Step counter in .cpt input file   */
+    gmx_int64_t     bench_nsteps   = BENCHSTEPS;
+    gmx_int64_t     new_sim_nsteps = -1;  /* -1 indicates: not set by the user */
+    gmx_int64_t     cpt_steps      = 0;   /* Step counter in .cpt input file   */
     int             presteps       = 100; /* Do a full cycle reset after presteps steps */
     gmx_bool        bOverwrite     = FALSE, bKeepTPR;
     gmx_bool        bLaunch        = FALSE;
@@ -2380,13 +2380,13 @@ int gmx_tune_pme(int argc, char *argv[])
     fprintf(fp, "The mdrun  command is   : %s\n", cmd_mdrun);
     fprintf(fp, "mdrun args benchmarks   : %s\n", cmd_args_bench);
     fprintf(fp, "Benchmark steps         : ");
-    fprintf(fp, gmx_large_int_pfmt, bench_nsteps);
+    fprintf(fp, "%"GMX_PRId64, bench_nsteps);
     fprintf(fp, "\n");
     fprintf(fp, "dlb equilibration steps : %d\n", presteps);
     if (sim_part > 1)
     {
         fprintf(fp, "Checkpoint time step    : ");
-        fprintf(fp, gmx_large_int_pfmt, cpt_steps);
+        fprintf(fp, "%"GMX_PRId64, cpt_steps);
         fprintf(fp, "\n");
     }
     fprintf(fp, "mdrun args at launchtime: %s\n", cmd_args_launch);
@@ -2395,10 +2395,10 @@ int gmx_tune_pme(int argc, char *argv[])
     {
         bOverwrite = TRUE;
         fprintf(stderr, "Note: Simulation input file %s will have ", opt2fn("-so", NFILE, fnm));
-        fprintf(stderr, gmx_large_int_pfmt, new_sim_nsteps+cpt_steps);
+        fprintf(stderr, "%"GMX_PRId64, new_sim_nsteps+cpt_steps);
         fprintf(stderr, " steps.\n");
         fprintf(fp, "Simulation steps        : ");
-        fprintf(fp, gmx_large_int_pfmt, new_sim_nsteps);
+        fprintf(fp, "%"GMX_PRId64, new_sim_nsteps);
         fprintf(fp, "\n");
     }
     if (repeats > 1)
index 4bd810845c0b293b3c4808dd2407bd448b1c40e5..36a963603c84261998b57e90d6874a10bd2133ac 100644 (file)
@@ -206,7 +206,7 @@ gmx_radial_distribution_histogram_t *calc_radial_distribution_histogram (
     int               nthreads;
     gmx_rng_t        *trng = NULL;
 #endif
-    gmx_large_int_t   mc  = 0, max;
+    gmx_int64_t       mc  = 0, max;
     gmx_rng_t         rng = NULL;
 
     /* allocate memory for pr */
@@ -233,11 +233,11 @@ gmx_radial_distribution_histogram_t *calc_radial_distribution_histogram (
         /* Special case for setting automaticaly number of mc iterations to 1% of total number of direct iterations */
         if (mcover == -1)
         {
-            max = (gmx_large_int_t)floor(0.5*0.01*isize*(isize-1));
+            max = (gmx_int64_t)floor(0.5*0.01*isize*(isize-1));
         }
         else
         {
-            max = (gmx_large_int_t)floor(0.5*mcover*isize*(isize-1));
+            max = (gmx_int64_t)floor(0.5*mcover*isize*(isize-1));
         }
         rng = gmx_rng_init(seed);
 #ifdef GMX_OPENMP
index 43776abb701ed14ab40e3a25c398329c2f4ed925..38c4c9037285e348134eaaa991895441d05fa15b 100644 (file)
@@ -4189,10 +4189,10 @@ static real calc_one_bond(FILE *fplog, int thread,
             pdihs_noener_simd
 #endif
                 (nbn, idef->il[ftype].iatoms+nb0,
-                 idef->iparams,
-                 (const rvec*)x, f,
-                 pbc, g, lambda[efptFTYPE], md, fcd,
-                 global_atom_index);
+                idef->iparams,
+                (const rvec*)x, f,
+                pbc, g, lambda[efptFTYPE], md, fcd,
+                global_atom_index);
             v = 0;
         }
         else
@@ -4214,7 +4214,7 @@ static real calc_one_bond(FILE *fplog, int thread,
     {
         v = do_nonbonded_listed(ftype, nbn, iatoms+nb0, idef->iparams, (const rvec*)x, f, fshift,
                                 pbc, g, lambda, dvdl, md, fr, grpp, global_atom_index);
-        
+
         if (bPrintSepPot)
         {
             fprintf(fplog, "  %-5s + %-15s #%4d                  dVdl %12.5e\n",
@@ -4245,7 +4245,7 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
                 t_fcdata *fcd, int *global_atom_index,
                 t_atomtypes gmx_unused *atype, gmx_genborn_t gmx_unused *born,
                 int force_flags,
-                gmx_bool bPrintSepPot, gmx_large_int_t step)
+                gmx_bool bPrintSepPot, gmx_int64_t step)
 {
     gmx_bool      bCalcEnerVir;
     int           i;
@@ -4391,7 +4391,7 @@ void calc_bonds_lambda(FILE *fplog,
     real          dvdl_dum[efptNR];
     rvec         *f, *fshift;
     const  t_pbc *pbc_null;
-    t_idef       idef_fe;
+    t_idef        idef_fe;
 
     if (fr->bMolPBC)
     {
index 0445cb65e4737e12b6668649c737d3360279d3a3..11e3707cdc6ddbaba40071664f7b5dc11b032f9b 100644 (file)
@@ -273,7 +273,7 @@ static void do_cpt_int_err(XDR *xd, const char *desc, int *i, FILE *list)
     }
 }
 
-static void do_cpt_step_err(XDR *xd, const char *desc, gmx_large_int_t *i, FILE *list)
+static void do_cpt_step_err(XDR *xd, const char *desc, gmx_int64_t *i, FILE *list)
 {
     bool_t res = 0;
     char   buf[STEPSTRSIZE];
@@ -787,7 +787,7 @@ static void do_cpt_header(XDR *xd, gmx_bool bRead, int *file_version,
                           int *double_prec,
                           char **fprog, char **ftime,
                           int *eIntegrator, int *simulation_part,
-                          gmx_large_int_t *step, double *t,
+                          gmx_int64_t *step, double *t,
                           int *nnodes, int *dd_nc, int *npme,
                           int *natoms, int *ngtc, int *nnhpres, int *nhchainlength,
                           int *nlambda, int *flags_state,
@@ -995,7 +995,7 @@ static int do_cpt_state(XDR *xd, gmx_bool bRead,
 
     if (bRead) /* we need to allocate space for dfhist if we are reading */
     {
-        init_df_history(&state->dfhist,state->dfhist.nlambda);
+        init_df_history(&state->dfhist, state->dfhist.nlambda);
     }
 
     /* We want the MC_RNG the same across all the notes for now -- lambda MC is global */
@@ -1386,7 +1386,7 @@ void write_checkpoint(const char *fn, gmx_bool bNumberAndKeep,
                       FILE *fplog, t_commrec *cr,
                       int eIntegrator, int simulation_part,
                       gmx_bool bExpanded, int elamstats,
-                      gmx_large_int_t step, double t, t_state *state)
+                      gmx_int64_t step, double t, t_state *state)
 {
     t_fileio            *fp;
     int                  file_version;
@@ -1727,7 +1727,7 @@ static void check_match(FILE *fplog,
 
 static void read_checkpoint(const char *fn, FILE **pfplog,
                             t_commrec *cr, gmx_bool bPartDecomp, ivec dd_nc,
-                            int eIntegrator, int *init_fep_state, gmx_large_int_t *step, double *t,
+                            int eIntegrator, int *init_fep_state, gmx_int64_t *step, double *t,
                             t_state *state, gmx_bool *bReadRNG, gmx_bool *bReadEkin,
                             int *simulation_part,
                             gmx_bool bAppendOutputFiles, gmx_bool bForceAppend)
@@ -2165,7 +2165,7 @@ void load_checkpoint(const char *fn, FILE **fplog,
                      gmx_bool *bReadRNG, gmx_bool *bReadEkin,
                      gmx_bool bAppend, gmx_bool bForceAppend)
 {
-    gmx_large_int_t step;
+    gmx_int64_t     step;
     double          t;
 
     if (SIMMASTER(cr))
@@ -2194,7 +2194,7 @@ void load_checkpoint(const char *fn, FILE **fplog,
 }
 
 static void read_checkpoint_data(t_fileio *fp, int *simulation_part,
-                                 gmx_large_int_t *step, double *t, t_state *state,
+                                 gmx_int64_t *step, double *t, t_state *state,
                                  gmx_bool bReadRNG,
                                  int *nfiles, gmx_file_position_t **outputfiles)
 {
@@ -2273,7 +2273,7 @@ static void read_checkpoint_data(t_fileio *fp, int *simulation_part,
 
 void
 read_checkpoint_state(const char *fn, int *simulation_part,
-                      gmx_large_int_t *step, double *t, t_state *state)
+                      gmx_int64_t *step, double *t, t_state *state)
 {
     t_fileio *fp;
 
@@ -2293,7 +2293,7 @@ void read_checkpoint_trxframe(t_fileio *fp, t_trxframe *fr)
      * this will all go away for 5.0. */
     t_state         state;
     int             simulation_part;
-    gmx_large_int_t step;
+    gmx_int64_t     step;
     double          t;
 
     init_state(&state, 0, 0, 0, 0, 0);
@@ -2303,8 +2303,8 @@ void read_checkpoint_trxframe(t_fileio *fp, t_trxframe *fr)
     fr->natoms  = state.natoms;
     fr->bTitle  = FALSE;
     fr->bStep   = TRUE;
-    fr->step    = gmx_large_int_to_int(step,
-                                       "conversion of checkpoint to trajectory");
+    fr->step    = gmx_int64_to_int(step,
+                                   "conversion of checkpoint to trajectory");
     fr->bTime      = TRUE;
     fr->time       = t;
     fr->bLambda    = TRUE;
@@ -2339,7 +2339,7 @@ void list_checkpoint(const char *fn, FILE *out)
     char                *version, *btime, *buser, *bhost, *fprog, *ftime;
     int                  double_prec;
     int                  eIntegrator, simulation_part, nppnodes, npme;
-    gmx_large_int_t      step;
+    gmx_int64_t          step;
     double               t;
     ivec                 dd_nc;
     t_state              state;
@@ -2425,13 +2425,13 @@ static gmx_bool exist_output_file(const char *fnm_cp, int nfile, const t_filenm
 
 /* This routine cannot print tons of data, since it is called before the log file is opened. */
 gmx_bool read_checkpoint_simulation_part(const char *filename, int *simulation_part,
-                                         gmx_large_int_t *cpt_step, t_commrec *cr,
+                                         gmx_int64_t *cpt_step, t_commrec *cr,
                                          gmx_bool bAppendReq,
                                          int nfile, const t_filenm fnm[],
                                          const char *part_suffix, gmx_bool *bAddPart)
 {
     t_fileio            *fp;
-    gmx_large_int_t      step = 0;
+    gmx_int64_t          step = 0;
     double               t;
     /* This next line is nasty because the sub-structures of t_state
      * cannot be assumed to be zeroed (or even initialized in ways the
index c56df9da5747c1fa4f67f0bfd732d4b89781aeae..98ad830e868b5b3442c946b2bf1f16e7611732dc 100644 (file)
@@ -165,10 +165,10 @@ void check_multi_int(FILE *log, const gmx_multisim_t *ms, int val,
 }
 
 void check_multi_large_int(FILE *log, const gmx_multisim_t *ms,
-                           gmx_large_int_t val, const char *name,
+                           gmx_int64_t val, const char *name,
                            gmx_bool bQuiet)
 {
-    gmx_large_int_t  *ibuf;
+    gmx_int64_t      *ibuf;
     int               p;
     gmx_bool          bCompatible;
 
@@ -210,7 +210,7 @@ void check_multi_large_int(FILE *log, const gmx_multisim_t *ms,
                 char strbuf[255];
                 /* first make the format string */
                 snprintf(strbuf, 255, "  subsystem %%d: %s\n",
-                         gmx_large_int_pfmt);
+                         "%" GMX_PRId64);
                 fprintf(log, strbuf, p, ibuf[p]);
             }
         }
index 794f3cc84ac165d5d6f6334b7e825ee8b410caba..8cdeecd000cfaccec8ac6cd0a4654654ef51d3bb 100644 (file)
@@ -756,11 +756,11 @@ gmx_bool gmx_isnan(real x)
 }
 
 gmx_bool
-check_int_multiply_for_overflow(gmx_large_int_t  a,
-                                gmx_large_int_t  b,
-                                gmx_large_int_t *result)
+check_int_multiply_for_overflow(gmx_int64_t  a,
+                                gmx_int64_t  b,
+                                gmx_int64_t *result)
 {
-    gmx_large_int_t sign = 1;
+    gmx_int64_t sign = 1;
     if ((0 == a) || (0 == b))
     {
         *result = 0;
@@ -776,9 +776,9 @@ check_int_multiply_for_overflow(gmx_large_int_t  a,
         b    = -b;
         sign = -sign;
     }
-    if (GMX_LARGE_INT_MAX / b < a)
+    if (GMX_INT64_MAX / b < a)
     {
-        *result = (sign > 0) ? GMX_LARGE_INT_MAX : GMX_LARGE_INT_MIN;
+        *result = (sign > 0) ? GMX_INT64_MAX : GMX_INT64_MIN;
         return FALSE;
     }
     *result = sign * a * b;
index f14338822a3dbdc7f7de60479a1850386163f58a..bf3e71c8ff469782ad705d8d34cb8bb08e714335 100644 (file)
@@ -706,7 +706,7 @@ void gmx_sumi(int gmx_unused nr, int gmx_unused r[], const t_commrec gmx_unused
 #endif
 }
 
-void gmx_sumli(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const t_commrec gmx_unused *cr)
+void gmx_sumli(int gmx_unused nr, gmx_int64_t gmx_unused r[], const t_commrec gmx_unused *cr)
 {
 #ifndef GMX_MPI
     gmx_call("gmx_sumli");
@@ -717,23 +717,23 @@ void gmx_sumli(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const t_commre
         /* Use two step summing */
         if (cr->nc.rank_intra == 0)
         {
-            MPI_Reduce(MPI_IN_PLACE, r, nr, GMX_MPI_LARGE_INT, MPI_SUM, 0,
+            MPI_Reduce(MPI_IN_PLACE, r, nr, MPI_INT64_T, MPI_SUM, 0,
                        cr->nc.comm_intra);
             /* Sum with the buffers reversed */
-            MPI_Allreduce(MPI_IN_PLACE, r, nr, GMX_MPI_LARGE_INT, MPI_SUM,
+            MPI_Allreduce(MPI_IN_PLACE, r, nr, MPI_INT64_T, MPI_SUM,
                           cr->nc.comm_inter);
         }
         else
         {
             /* This is here because of the silly MPI specification
                 that MPI_IN_PLACE should be put in sendbuf instead of recvbuf */
-            MPI_Reduce(r, NULL, nr, GMX_MPI_LARGE_INT, MPI_SUM, 0, cr->nc.comm_intra);
+            MPI_Reduce(r, NULL, nr, MPI_INT64_T, MPI_SUM, 0, cr->nc.comm_intra);
         }
-        MPI_Bcast(r, nr, GMX_MPI_LARGE_INT, 0, cr->nc.comm_intra);
+        MPI_Bcast(r, nr, MPI_INT64_T, 0, cr->nc.comm_intra);
     }
     else
     {
-        MPI_Allreduce(MPI_IN_PLACE, r, nr, GMX_MPI_LARGE_INT, MPI_SUM, cr->mpi_comm_mygroup);
+        MPI_Allreduce(MPI_IN_PLACE, r, nr, MPI_INT64_T, MPI_SUM, cr->mpi_comm_mygroup);
     }
 #else
     int i;
@@ -746,19 +746,19 @@ void gmx_sumli(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const t_commre
     if (cr->nc.bUse)
     {
         /* Use two step summing */
-        MPI_Allreduce(r, cr->mpb->libuf, nr, GMX_MPI_LARGE_INT, MPI_SUM,
+        MPI_Allreduce(r, cr->mpb->libuf, nr, MPI_INT64_T, MPI_SUM,
                       cr->nc.comm_intra);
         if (cr->nc.rank_intra == 0)
         {
             /* Sum with the buffers reversed */
-            MPI_Allreduce(cr->mpb->libuf, r, nr, GMX_MPI_LARGE_INT, MPI_SUM,
+            MPI_Allreduce(cr->mpb->libuf, r, nr, MPI_INT64_T, MPI_SUM,
                           cr->nc.comm_inter);
         }
-        MPI_Bcast(r, nr, GMX_MPI_LARGE_INT, 0, cr->nc.comm_intra);
+        MPI_Bcast(r, nr, MPI_INT64_T, 0, cr->nc.comm_intra);
     }
     else
     {
-        MPI_Allreduce(r, cr->mpb->libuf, nr, GMX_MPI_LARGE_INT, MPI_SUM,
+        MPI_Allreduce(r, cr->mpb->libuf, nr, MPI_INT64_T, MPI_SUM,
                       cr->mpi_comm_mygroup);
         for (i = 0; i < nr; i++)
         {
@@ -860,13 +860,13 @@ void gmx_sumi_sim(int gmx_unused nr, int gmx_unused r[], const gmx_multisim_t gm
 #endif
 }
 
-void gmx_sumli_sim(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const gmx_multisim_t gmx_unused *ms)
+void gmx_sumli_sim(int gmx_unused nr, gmx_int64_t gmx_unused r[], const gmx_multisim_t gmx_unused *ms)
 {
 #ifndef GMX_MPI
     gmx_call("gmx_sumli_sim");
 #else
 #if defined(MPI_IN_PLACE_EXISTS)
-    MPI_Allreduce(MPI_IN_PLACE, r, nr, GMX_MPI_LARGE_INT, MPI_SUM,
+    MPI_Allreduce(MPI_IN_PLACE, r, nr, MPI_INT64_T, MPI_SUM,
                   ms->mpi_comm_masters);
 #else
     /* this is thread-unsafe, but it will do for now: */
@@ -877,7 +877,7 @@ void gmx_sumli_sim(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const gmx_
         ms->mpb->libuf_alloc = nr;
         srenew(ms->mpb->libuf, ms->mpb->libuf_alloc);
     }
-    MPI_Allreduce(r, ms->mpb->libuf, nr, GMX_MPI_LARGE_INT, MPI_SUM,
+    MPI_Allreduce(r, ms->mpb->libuf, nr, MPI_INT64_T, MPI_SUM,
                   ms->mpi_comm_masters);
     for (i = 0; i < nr; i++)
     {
index 748785e5dde401ba8b53517181ac6e3de072422e..7b0a7cb029bd875973f8fd4ef3d24a8a6ce999e5 100644 (file)
@@ -384,7 +384,7 @@ void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop)
 }
 
 void print_perf(FILE *out, double time_per_thread, double time_per_node,
-                gmx_large_int_t nsteps, real delta_t,
+                gmx_int64_t nsteps, real delta_t,
                 double nbfs, double mflop)
 {
     real wallclocktime;
index 8e007072ef0b3b95fb4aa78b645189eb379374b0..9875d87a83ec40f83781ae5e8ad11945b9149a25 100644 (file)
@@ -396,26 +396,26 @@ int get_eint(int *ninp, t_inpfile **inp, const char *name, int def,
     }
 }
 
-gmx_large_int_t get_egmx_large_int(int *ninp, t_inpfile **inp,
-                                   const char *name, gmx_large_int_t def,
-                                   warninp_t wi)
+gmx_int64_t get_eint64(int *ninp, t_inpfile **inp,
+                       const char *name, gmx_int64_t def,
+                       warninp_t wi)
 {
     char            buf[32], *ptr, warn_buf[STRLEN];
     int             ii;
-    gmx_large_int_t ret;
+    gmx_int64_t     ret;
 
     ii = get_einp(ninp, inp, name);
 
     if (ii == -1)
     {
-        sprintf(buf, gmx_large_int_pfmt, def);
+        sprintf(buf, "%"GMX_PRId64, def);
         (*inp)[(*ninp)-1].value = strdup(buf);
 
         return def;
     }
     else
     {
-        ret = str_to_large_int_t((*inp)[ii].value, &ptr);
+        ret = str_to_int64_t((*inp)[ii].value, &ptr);
         if (ptr == (*inp)[ii].value)
         {
             sprintf(warn_buf, "Right hand side '%s' for parameter '%s' in parameter file is not an integer value\n", (*inp)[ii].value, (*inp)[ii].name);
index c5cccd5a99f99b24bbef1ada65fe59a672ffe371..d1337d78d8ffc1a44dc4d1f62620bf57e4a384f5 100644 (file)
@@ -105,9 +105,9 @@ static void log_action(int bMal, const char *what, const char *file, int line,
 }
 #endif
 
-static char *gmx_large_int_str(gmx_large_int_t i, char *buf)
+static char *gmx_large_int_str(gmx_int64_t i, char *buf)
 {
-    sprintf(buf, gmx_large_int_pfmt, i);
+    sprintf(buf, "%"GMX_PRId64, i);
 
     return buf;
 }
@@ -129,7 +129,7 @@ void *save_malloc(const char *name, const char *file, int line, size_t size)
             gmx_fatal(errno, __FILE__, __LINE__,
                       "Not enough memory. Failed to malloc %s bytes for %s\n"
                       "(called from file %s, line %d)",
-                      gmx_large_int_str((gmx_large_int_t)size, cbuf),
+                      gmx_large_int_str((gmx_int64_t)size, cbuf),
                       name, file, line);
         }
         (void) memset(p, 0, size);
@@ -169,10 +169,10 @@ void *save_calloc(const char *name, const char *file, int line,
         if ((p = malloc((size_t)nelem*(size_t)elsize)) == NULL)
         {
             gmx_fatal(errno, __FILE__, __LINE__,
-                      "Not enough memory. Failed to calloc %"gmx_large_int_fmt
-                      " elements of size %"gmx_large_int_fmt
+                      "Not enough memory. Failed to calloc %"GMX_PRId64
+                      " elements of size %"GMX_PRId64
                       " for %s\n(called from file %s, line %d)",
-                      (gmx_large_int_t)nelem, (gmx_large_int_t)elsize,
+                      (gmx_int64_t)nelem, (gmx_int64_t)elsize,
                       name, file, line);
         }
         memset(p, 0, (size_t) (nelem * elsize));
@@ -180,10 +180,10 @@ void *save_calloc(const char *name, const char *file, int line,
         if ((p = calloc((size_t)nelem, (size_t)elsize)) == NULL)
         {
             gmx_fatal(errno, __FILE__, __LINE__,
-                      "Not enough memory. Failed to calloc %"gmx_large_int_fmt
-                      " elements of size %"gmx_large_int_fmt
+                      "Not enough memory. Failed to calloc %"GMX_PRId64
+                      " elements of size %"GMX_PRId64
                       " for %s\n(called from file %s, line %d)",
-                      (gmx_large_int_t)nelem, (gmx_large_int_t)elsize, name, file, line);
+                      (gmx_int64_t)nelem, (gmx_int64_t)elsize, name, file, line);
         }
 #endif
     }
@@ -231,7 +231,7 @@ void *save_realloc(const char *name, const char *file, int line, void *ptr,
             gmx_fatal(errno, __FILE__, __LINE__,
                       "Not enough memory. Failed to realloc %s bytes for %s, %s=%x\n"
                       "(called from file %s, line %d)",
-                      gmx_large_int_str((gmx_large_int_t)size, cbuf),
+                      gmx_large_int_str((gmx_int64_t)size, cbuf),
                       name, name, ptr, file, line);
         }
 #ifdef DEBUG
index f40e2a2319f87bd2013549fc62f53eeda020f8bb..22a84adb50fa23098ad5d54390e9ee53a6267cd8 100644 (file)
@@ -621,11 +621,11 @@ char **split(char sep, const char *str)
 }
 
 
-gmx_large_int_t
-str_to_large_int_t(const char *str, char **endptr)
+gmx_int64_t
+str_to_int64_t(const char *str, char **endptr)
 {
     int              sign = 1;
-    gmx_large_int_t  val  = 0;
+    gmx_int64_t      val  = 0;
     char             ch;
     const char      *p;
 
index 6390705d8c3cc04678d8087f43856e281cc39359..8c9e7ff66f9da99bcc81eed1450f790359b72d1e 100644 (file)
 #define INTTYPE 1
 #include "tmpi_ops.h"
 
+#ifdef _MSC_VER
+#define TYPE __int64
+#else
+#define TYPE int64_t
+#endif
+#define TYPENM INT64_T
+#define INTTYPE 1
+#include "tmpi_ops.h"
+
 
 /* These are the fundamental data types. They exist as global variables */
 tmpi_dt tmpi_char    = {sizeof(char),              oplist_CHAR,     0, NULL, TRUE};
@@ -174,7 +183,7 @@ tmpi_dt tmpi_double  = {sizeof(double),            oplist_DOUBLE,   0, NULL, TRU
 tmpi_dt tmpi_l_double = {sizeof(long double),       oplist_L_DOUBLE, 0, NULL, TRUE};
 tmpi_dt tmpi_byte    = {sizeof(char),              oplist_CHAR,     0, NULL, TRUE};
 tmpi_dt tmpi_pointer = {sizeof(void*),             NULL,            0, NULL, TRUE};
-
+tmpi_dt tmpi_int64_t = {8,                         oplist_INT64_T,  0, NULL, TRUE};
 
 
 /* the variable types as they are referred to from MPI */
@@ -204,6 +213,7 @@ const tMPI_Datatype TMPI_BYTE               = &tmpi_byte;
 
 const tMPI_Datatype TMPI_POINTER            = &tmpi_pointer;
 
+const tMPI_Datatype TMPI_INT64_T            = &tmpi_int64_t;
 
 
 
index b1e3acff6f10474989c747d2bd021e9833ab208e..44b2d85f0b1a8309d5fc6c6b7660efe07cc53ee5 100644 (file)
@@ -336,7 +336,7 @@ static void pr_int(FILE *fp, int indent, const char *title, int i)
     fprintf(fp, "%-20s = %d\n", title, i);
 }
 
-static void pr_gmx_large_int(FILE *fp, int indent, const char *title, gmx_large_int_t i)
+static void pr_gmx_large_int(FILE *fp, int indent, const char *title, gmx_int64_t i)
 {
     char buf[STEPSTRSIZE];
 
index 9fe3cb08ea6fc20aef1ea4b1d89e3b240c421e2e..3be1ea2cf048536f27a4a861b89f653c57bce7e8 100644 (file)
@@ -52,7 +52,7 @@
 
 
 
-static gmx_bool            bOverAllocDD = FALSE;
+static gmx_bool            bOverAllocDD     = FALSE;
 static tMPI_Thread_mutex_t over_alloc_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
 
 
@@ -77,7 +77,7 @@ int over_alloc_dd(int n)
     }
 }
 
-int gmx_large_int_to_int(gmx_large_int_t step, const char *warn)
+int gmx_int64_to_int(gmx_int64_t step, const char *warn)
 {
     int i;
 
@@ -87,16 +87,16 @@ int gmx_large_int_to_int(gmx_large_int_t step, const char *warn)
     {
         fprintf(stderr, "\nWARNING during %s:\n", warn);
         fprintf(stderr, "step value ");
-        fprintf(stderr, gmx_large_int_pfmt, step);
+        fprintf(stderr, "%"GMX_PRId64, step);
         fprintf(stderr, " does not fit in int, converted to %d\n\n", i);
     }
 
     return i;
 }
 
-char *gmx_step_str(gmx_large_int_t i, char *buf)
+char *gmx_step_str(gmx_int64_t i, char *buf)
 {
-    sprintf(buf, gmx_large_int_pfmt, i);
+    sprintf(buf, "%"GMX_PRId64, i);
 
     return buf;
 }
@@ -464,12 +464,12 @@ void done_inputrec(t_inputrec *ir)
 
 static void zero_history(history_t *hist)
 {
-    hist->disre_initf = 0;
-    hist->ndisrepairs = 0;
+    hist->disre_initf  = 0;
+    hist->ndisrepairs  = 0;
     hist->disre_rm3tav = NULL;
-    hist->orire_initf = 0;
-    hist->norire_Dtav = 0;
-    hist->orire_Dtav = NULL;
+    hist->orire_initf  = 0;
+    hist->norire_Dtav  = 0;
+    hist->orire_Dtav   = NULL;
 }
 
 static void zero_ekinstate(ekinstate_t *eks)
@@ -617,7 +617,7 @@ void init_state(t_state *state, int natoms, int ngtc, int nnhpres, int nhchainle
     zero_history(&state->hist);
     zero_ekinstate(&state->ekinstate);
     init_energyhistory(&state->enerhist);
-    init_df_history(&state->dfhist,nlambda);
+    init_df_history(&state->dfhist, nlambda);
     state->ddp_count       = 0;
     state->ddp_count_cg_gl = 0;
     state->cg_gl           = NULL;
@@ -964,8 +964,8 @@ extern void copy_df_history(df_history_t *df_dest, df_history_t *df_source)
 
     /* Currently, there should not be any difference in nlambda between the two,
        but this is included for completeness for potential later functionality */
-    df_dest->nlambda = df_source->nlambda;
-    df_dest->bEquil  = df_source->bEquil;
+    df_dest->nlambda  = df_source->nlambda;
+    df_dest->bEquil   = df_source->bEquil;
     df_dest->wl_delta = df_source->wl_delta;
 
     for (i = 0; i < df_dest->nlambda; i++)
@@ -982,10 +982,10 @@ extern void copy_df_history(df_history_t *df_dest, df_history_t *df_source)
     {
         for (j = 0; j < df_dest->nlambda; j++)
         {
-            df_dest->accum_p[i][j]      = df_source->accum_p[i][j];
-            df_dest->accum_m[i][j]      = df_source->accum_m[i][j];
-            df_dest->accum_p2[i][j]     = df_source->accum_p2[i][j];
-            df_dest->accum_m2[i][j]     = df_source->accum_m2[i][j];
+            df_dest->accum_p[i][j]        = df_source->accum_p[i][j];
+            df_dest->accum_m[i][j]        = df_source->accum_m[i][j];
+            df_dest->accum_p2[i][j]       = df_source->accum_p2[i][j];
+            df_dest->accum_m2[i][j]       = df_source->accum_m2[i][j];
             df_dest->Tij[i][j]            = df_source->Tij[i][j];
             df_dest->Tij_empirical[i][j]  = df_source->Tij_empirical[i][j];
         }
@@ -1005,7 +1005,7 @@ void done_df_history(df_history_t *dfhist)
         sfree(dfhist->sum_minvar);
         sfree(dfhist->sum_variance);
 
-        for (i=0;i<dfhist->nlambda;i++)
+        for (i = 0; i < dfhist->nlambda; i++)
         {
             sfree(dfhist->Tij[i]);
             sfree(dfhist->Tij_empirical[i]);
index 6893ccbc83c71bfc0077bf641d1ce929eca60cbc..4b9a0b87cf9df73673263bbf25f0b89df6493828 100644 (file)
@@ -64,7 +64,7 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms,
                 t_fcdata *fcd, int *ddgatindex,
                 t_atomtypes *atype, gmx_genborn_t *born,
                 int force_flags,
-                gmx_bool bPrintSepPot, gmx_large_int_t step);
+                gmx_bool bPrintSepPot, gmx_int64_t step);
 /*
  * The function calc_bonds() calculates all bonded force interactions.
  * The "bonds" are specified as follows:
index 40df46de2a223f1cb1d8561aa4f5f72780d6ea90..18c36700219d837ab94356005df1d43d78805a51 100644 (file)
@@ -56,7 +56,7 @@ void write_checkpoint(const char *fn, gmx_bool bNumberAndKeep,
                       FILE *fplog, t_commrec *cr,
                       int eIntegrator, int simulation_part,
                       gmx_bool bExpanded, int elamstats,
-                      gmx_large_int_t step, double t,
+                      gmx_int64_t step, double t,
                       t_state *state);
 
 /* Loads a checkpoint from fn for run continuation.
@@ -80,7 +80,7 @@ void load_checkpoint(const char *fn, FILE **fplog,
  * number of nodes was read.
  */
 void read_checkpoint_state(const char *fn, int *simulation_part,
-                           gmx_large_int_t *step, double *t, t_state *state);
+                           gmx_int64_t *step, double *t, t_state *state);
 
 /* Read everything that can be stored in t_trxframe from a checkpoint file */
 void read_checkpoint_trxframe(t_fileio *fp, t_trxframe *fr);
@@ -99,7 +99,7 @@ void list_checkpoint(const char *fn, FILE *out);
  * needs to be added to the output file name.
  */
 gmx_bool read_checkpoint_simulation_part(const char *filename, int *simulation_part,
-                                         gmx_large_int_t *step, t_commrec *cr,
+                                         gmx_int64_t *step, t_commrec *cr,
                                          gmx_bool bAppendReq,
                                          int nfile, const t_filenm fnm[],
                                          const char *part_suffix, gmx_bool *bAddPart);
index cc2dbfa6a9fd2bd028ea79c08da025ddd53df206..7c456db6928df35553d5f27790c49ef50182056c 100644 (file)
@@ -137,7 +137,7 @@ gmx_bool constrain(FILE *log, gmx_bool bLog, gmx_bool bEner,
                    t_inputrec *ir,
                    gmx_ekindata_t *ekind,
                    t_commrec *cr,
-                   gmx_large_int_t step, int delta_step,
+                   gmx_int64_t step, int delta_step,
                    t_mdatoms *md,
                    rvec *x, rvec *xprime, rvec *min_proj,
                    gmx_bool bMolPBC, matrix box,
@@ -252,7 +252,7 @@ real constr_r_max(FILE *fplog, gmx_mtop_t *mtop, t_inputrec *ir);
 gmx_bool
 constrain_lincs(FILE *log, gmx_bool bLog, gmx_bool bEner,
                 t_inputrec *ir,
-                gmx_large_int_t step,
+                gmx_int64_t step,
                 gmx_lincsdata_t lincsd, t_mdatoms *md,
                 t_commrec *cr,
                 rvec *x, rvec *xprime, rvec *min_proj,
index 4ee0d6352917c72f5f37de9ac0f82301e8d3013e..1b449748f7f3ffbdd84a8f3cd5b1e8311db1b863 100644 (file)
@@ -173,7 +173,7 @@ void dd_atom_sum_real(gmx_domdec_t *dd, real v[]);
 /* Sum the contributions to a real for each atom over the neighboring cells. */
 
 void dd_partition_system(FILE                *fplog,
-                         gmx_large_int_t      step,
+                         gmx_int64_t          step,
                          t_commrec           *cr,
                          gmx_bool             bMasterState,
                          int                  nstglobalcomm,
@@ -272,7 +272,7 @@ void dd_bonded_cg_distance(FILE *fplog, gmx_mtop_t *mtop,
                            gmx_bool bBCheck,
                            real *r_2b, real *r_mb);
 
-void write_dd_pdb(const char *fn, gmx_large_int_t step, const char *title,
+void write_dd_pdb(const char *fn, gmx_int64_t step, const char *title,
                   gmx_mtop_t *mtop,
                   t_commrec *cr,
                   int natoms, rvec x[], matrix box);
index c57cb316c73cd0b34c17ce6418249447e7bc94d7..d3fe4d32e623df2612be18f0dd0118c9f0d092ff 100644 (file)
@@ -49,11 +49,11 @@ extern "C" {
 typedef struct {
     int             nener;
     gmx_enxnm_t    *enm;
-    gmx_large_int_t nsteps;
-    gmx_large_int_t nsum;
+    gmx_int64_t     nsteps;
+    gmx_int64_t     nsum;
     t_energy       *e;
-    gmx_large_int_t nsteps_sim;
-    gmx_large_int_t nsum_sim;
+    gmx_int64_t     nsteps_sim;
+    gmx_int64_t     nsum_sim;
     t_energy       *e_sim;
 } t_ebin;
 
index 1a4468fbe185bb7a396bfdfc126e919338d4de2a..497488c6cbf1d360aafe67d18ab7cbeea8f57b2b 100644 (file)
@@ -42,7 +42,7 @@
 extern "C" {
 #endif
 
-void do_edsam(t_inputrec *ir, gmx_large_int_t step,
+void do_edsam(t_inputrec *ir, gmx_int64_t step,
               t_commrec *cr, rvec xs[], rvec v[], matrix box, gmx_edsam_t ed);
 /* Essential dynamics constraints, called from constrain() */
 
@@ -60,7 +60,7 @@ void dd_make_local_ed_indices(gmx_domdec_t *dd, gmx_edsam_t ed);
  * Should be called at every domain decomposition. */
 
 void do_flood(t_commrec *cr, t_inputrec *ir, rvec x[], rvec force[], gmx_edsam_t ed,
-              matrix box, gmx_large_int_t step, gmx_bool bNS);
+              matrix box, gmx_int64_t step, gmx_bool bNS);
 /* Flooding - called from do_force() */
 
 #ifdef __cplusplus
index 9f7834f43a4d64f0ab4c038b593c0568e90169ce..f7bb5c2e86058117e4b1725ad725ee4ff4eafb2a 100644 (file)
@@ -204,7 +204,7 @@ void set_avcsixtwelve(FILE *fplog, t_forcerec *fr,
 
 extern void do_force(FILE *log, t_commrec *cr,
                      t_inputrec *inputrec,
-                     gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+                     gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
                      gmx_localtop_t *top,
                      gmx_groups_t *groups,
                      matrix box, rvec x[], history_t *hist,
@@ -241,7 +241,7 @@ void ns(FILE              *fplog,
 /* Call the neighborsearcher */
 
 extern void do_force_lowlevel(FILE         *fplog,
-                              gmx_large_int_t   step,
+                              gmx_int64_t   step,
                               t_forcerec   *fr,
                               t_inputrec   *ir,
                               t_idef       *idef,
index 73c717f2c6360a427ab30adf705c2d9d42b2f218..c7c7d4c09b67cbbbdf92ed1a141e8964b3bbead4 100644 (file)
@@ -64,7 +64,7 @@ void check_multi_int(FILE *log, const gmx_multisim_t *ms,
                      int val, const char *name,
                      gmx_bool bQuiet);
 void check_multi_large_int(FILE *log, const gmx_multisim_t *ms,
-                           gmx_large_int_t val, const char *name,
+                           gmx_int64_t val, const char *name,
                            gmx_bool bQuiet);
 /* Check if val is the same on all processors for a mdrun -multi run
  * The string name is used to print to the log file and in a fatal error
index efbfdaebbe97f9862e8a0b1f158ae9c92846cd6a..d39810c2f8d94fdb74f8943e8a0313aea27e3735 100644 (file)
@@ -166,9 +166,9 @@ gmx_log2(real x)
  *  Returns true when overflow did not occur.
  */
 gmx_bool
-check_int_multiply_for_overflow(gmx_large_int_t  a,
-                                gmx_large_int_t  b,
-                                gmx_large_int_t *result);
+check_int_multiply_for_overflow(gmx_int64_t  a,
+                                gmx_int64_t  b,
+                                gmx_int64_t *result);
 
 static int gmx_greatest_common_divisor(int p, int q)
 {
@@ -176,8 +176,8 @@ static int gmx_greatest_common_divisor(int p, int q)
     while (q != 0)
     {
         tmp = q;
-        q = p % q;
-        p = tmp;
+        q   = p % q;
+        p   = tmp;
     }
     return p;
 }
index eeea4d4288f14b4e636c1604adadfafd6a0ebb5e..ad0389d51f4faf293da95f8aa494b8a529289fc9 100644 (file)
@@ -87,8 +87,8 @@ void check_nst_param(FILE *fplog, t_commrec *cr,
 
 /* check which of the multisim simulations has the shortest number of
    steps and return that number of nsteps */
-gmx_large_int_t get_multisim_nsteps(const t_commrec *cr,
-                                    gmx_large_int_t  nsteps);
+gmx_int64_t get_multisim_nsteps(const t_commrec *cr,
+                                gmx_int64_t      nsteps);
 
 void rerun_parallel_comm(t_commrec *cr, t_trxframe *fr,
                          gmx_bool *bNotLastFrame);
@@ -98,7 +98,7 @@ real compute_conserved_from_auxiliary(t_inputrec *ir, t_state *state,
                                       t_extmass *MassQ);
 
 /* set the lambda values at each step of mdrun when they change */
-void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bRerunMD,
+void set_current_lambdas(gmx_int64_t step, t_lambda *fepvals, gmx_bool bRerunMD,
                          t_trxframe *rerun_fr, t_state *state_global, t_state *state, double lam0[]);
 
 int multisim_min(const gmx_multisim_t *ms, int nmin, int n);
index 932bbf7aa94fa7d2d477a676d8d1c3730522eb4c..8bb1146626602633673f01ccb13cca3511be1c14 100644 (file)
@@ -142,11 +142,11 @@ void upd_mdebin(t_mdebin       *md,
 void upd_mdebin_step(t_mdebin *md);
 /* Updates only the step count in md */
 
-void print_ebin_header(FILE *log, gmx_large_int_t steps, double time, real lamb);
+void print_ebin_header(FILE *log, gmx_int64_t steps, double time, real lamb);
 
 void print_ebin(ener_file_t fp_ene, gmx_bool bEne, gmx_bool bDR, gmx_bool bOR,
                 FILE *log,
-                gmx_large_int_t step, double time,
+                gmx_int64_t step, double time,
                 int mode, gmx_bool bCompact,
                 t_mdebin *md, t_fcdata *fcd,
                 gmx_groups_t *groups, t_grpopts *opts);
index c321d5fbddb0141bd4d233a9b2bb83c7cdb7e2fe..9713feb0c0eaf133346fcbc928f6430573ac7148 100644 (file)
@@ -87,7 +87,7 @@ enum {
  * used in runner.c and md.c.
  * (These variables should be stored in the tpx file.)
  */
-extern gmx_large_int_t     deform_init_init_step_tpx;
+extern gmx_int64_t         deform_init_init_step_tpx;
 extern matrix              deform_init_box_tpx;
 extern tMPI_Thread_mutex_t deform_init_box_mutex;
 
@@ -150,11 +150,11 @@ void init_expanded_ensemble(gmx_bool bStateFromCP, t_inputrec *ir, gmx_rng_t *mc
 
 int ExpandedEnsembleDynamics(FILE *log, t_inputrec *ir, gmx_enerdata_t *enerd,
                              t_state *state, t_extmass *MassQ, int fep_state, df_history_t *dfhist,
-                             gmx_large_int_t step, gmx_rng_t mcrng,
+                             gmx_int64_t step, gmx_rng_t mcrng,
                              rvec *v, t_mdatoms *mdatoms);
 
 void PrintFreeEnergyInfoToFile(FILE *outfile, t_lambda *fep, t_expanded *expand, t_simtemp *simtemp, df_history_t *dfhist,
-                               int fep_state, int frequency, gmx_large_int_t step);
+                               int fep_state, int frequency, gmx_int64_t step);
 
 void get_mc_state(gmx_rng_t rng, t_state *state);
 
@@ -179,7 +179,7 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
              real rdd, real rconstr, const char *dddlb_opt, real dlb_scale,
              const char *ddcsx, const char *ddcsy, const char *ddcsz,
              const char *nbpu_opt, int nstlist_cmdline,
-             gmx_large_int_t nsteps_cmdline, int nstepout, int resetstep,
+             gmx_int64_t nsteps_cmdline, int nstepout, int resetstep,
              int nmultisim, int repl_ex_nst, int repl_ex_nex,
              int repl_ex_seed, real pforce, real cpt_period, real max_hours,
              const char *deviceOptions, unsigned long Flags);
index a903c2ccae438fabfc6e6cffb763f8dfac4392ee..d0654a96d618cb22d4da6d28e5b1cb3550e7052e 100644 (file)
@@ -109,7 +109,7 @@ void gmx_bcast_sim(int nbytes, void *b, const t_commrec *cr);
 void gmx_sumi(int nr, int r[], const t_commrec *cr);
 /* Calculate the global sum of an array of ints */
 
-void gmx_sumli(int nr, gmx_large_int_t r[], const t_commrec *cr);
+void gmx_sumli(int nr, gmx_int64_t r[], const t_commrec *cr);
 /* Calculate the global sum of an array of large ints */
 
 void gmx_sumf(int nr, float r[], const t_commrec *cr);
@@ -127,7 +127,7 @@ void gmx_sumd_comm(int nr, double r[], MPI_Comm mpi_comm);
 void gmx_sumi_sim(int nr, int r[], const gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of ints */
 
-void gmx_sumli_sim(int nr, gmx_large_int_t r[], const gmx_multisim_t *ms);
+void gmx_sumli_sim(int nr, gmx_int64_t r[], const gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of large ints */
 
 void gmx_sumf_sim(int nr, float r[], const gmx_multisim_t *ms);
index 14b90e14777d07a8455de08a5c7df2b0ed9f0419..d0d66cfafe1d4f6e7e2036f8935c093b2df9155f 100644 (file)
@@ -66,7 +66,7 @@ void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop);
  */
 
 void print_perf(FILE *out, double nodetime, double realtime,
-                gmx_large_int_t nsteps, real delta_t,
+                gmx_int64_t nsteps, real delta_t,
                 double nbfs, double mflop);
 /* Prints the performance, nbfs and mflop come from print_flop */
 
index 5969123a49000fc2504db7cf7c65998b5ad92339..b560d2b791681138d98816f794e5e0fd031451fa 100644 (file)
@@ -162,7 +162,7 @@ void gmx_pme_send_coordinates(t_commrec *cr, matrix box, rvec *x,
                               gmx_bool bFreeEnergy_q, gmx_bool bFreeEnergy_lj,
                               real lambda_q, real lambda_lj,
                               gmx_bool bEnerVir, int pme_flags,
-                              gmx_large_int_t step);
+                              gmx_int64_t step);
 /* Send the coordinates to our PME-only node and request a PME calculation */
 
 void gmx_pme_send_finish(t_commrec *cr);
@@ -171,7 +171,7 @@ void gmx_pme_send_finish(t_commrec *cr);
 void gmx_pme_send_switchgrid(t_commrec *cr, ivec grid_size, real ewaldcoeff_q, real ewaldcoeff_lj);
 /* Tell our PME-only node to switch to a new grid size */
 
-void gmx_pme_send_resetcounters(t_commrec *cr, gmx_large_int_t step);
+void gmx_pme_send_resetcounters(t_commrec *cr, gmx_int64_t step);
 /* Tell our PME-only node to reset all cycle and flop counters */
 
 void gmx_pme_receive_f(t_commrec *cr,
@@ -199,7 +199,7 @@ int gmx_pme_recv_params_coords(gmx_pme_pp_t pme_pp,
                                gmx_bool *bFreeEnergy_q, gmx_bool *bFreeEnergy_lj,
                                real *lambda_q, real *lambda_lj,
                                gmx_bool *bEnerVir, int *pme_flags,
-                               gmx_large_int_t *step,
+                               gmx_int64_t *step,
                                ivec grid_size, real *ewaldcoeff_q, real *ewaldcoeff_lj);
 ;
 /* With return value:
index 4decb3c3e4f451c02e565d6e729f1b625177a843..8b9df4707b05bd289958c1333440bd78493a9655 100644 (file)
@@ -92,7 +92,7 @@ void init_pull(FILE              *fplog,
 void finish_pull(t_pull *pull);
 
 /* Print the pull output (x and/or f) */
-void pull_print_output(t_pull *pull, gmx_large_int_t step, double time);
+void pull_print_output(t_pull *pull, gmx_int64_t step, double time);
 
 /* In pullutil.c */
 
index a24cd1528ddce661e661836316ceab0ca748a86d..d3ff050ff795a641995858cb1012467589c9c106 100644 (file)
@@ -107,7 +107,7 @@ extern void dd_make_local_rotation_groups(gmx_domdec_t *dd, t_rot *rot);
  *                          local arrays have to be updated (masses, shifts)
  */
 extern void do_rotation(t_commrec *cr, t_inputrec *ir, matrix box, rvec x[], real t,
-                        gmx_large_int_t step, gmx_wallcycle_t wcycle, gmx_bool bNS);
+                        gmx_int64_t step, gmx_wallcycle_t wcycle, gmx_bool bNS);
 
 
 /*! \brief Add the enforced rotation forces to the official force array.
@@ -126,7 +126,7 @@ extern void do_rotation(t_commrec *cr, t_inputrec *ir, matrix box, rvec x[], rea
  * \param step              The time step, used for output.
  * \param t                 Time, used for output.
  */
-extern real add_rot_forces(t_rot *rot, rvec f[], t_commrec *cr, gmx_large_int_t step, real t);
+extern real add_rot_forces(t_rot *rot, rvec f[], t_commrec *cr, gmx_int64_t step, real t);
 
 
 /*! \brief Close the enforced rotation output files.
index 31fd5c31cfb02336d651d68f4802a574e2228006..053c9ad0635b6ce3ec768219c4bcdb9c190dfba0 100644 (file)
@@ -73,9 +73,9 @@ void replace_inp_entry(int ninp, t_inpfile *inp,
 int get_eint(int *ninp, t_inpfile **inp, const char *name, int def,
              warninp_t wi);
 
-gmx_large_int_t get_egmx_large_int(int *ninp, t_inpfile **inp,
-                                   const char *name, gmx_large_int_t def,
-                                   warninp_t);
+gmx_int64_t get_eint64(int *ninp, t_inpfile **inp,
+                       const char *name, gmx_int64_t def,
+                       warninp_t);
 
 double get_ereal(int *ninp, t_inpfile **inp, const char *name, double def,
                  warninp_t wi);
@@ -98,7 +98,7 @@ int get_eenum(int *ninp, t_inpfile **inp, const char *name, const char **defs);
 #define STYPE(name, var, def)  if ((tmp = get_estr(&ninp, &inp, name, def)) != NULL) strcpy(var, tmp)
 #define STYPENC(name, def) get_estr(&ninp, &inp, name, def)
 #define ITYPE(name, var, def)  var    = get_eint(&ninp, &inp, name, def, wi)
-#define STEPTYPE(name, var, def)  var = get_egmx_large_int(&ninp, &inp, name, def, wi)
+#define STEPTYPE(name, var, def)  var = get_eint64(&ninp, &inp, name, def, wi)
 #define RTYPE(name, var, def)  var    = get_ereal(&ninp, &inp, name, def, wi)
 #define ETYPE(name, var, defs) var    = get_eenum(&ninp, &inp, name, defs)
 #define EETYPE(name, var, defs) var   = get_eeenum(&ninp, &inp, name, defs, wi)
index 8e2419e7f8174b4e9e637e5b432ffcb4db210a0c..0298dd608d8dd05dcf6ce145c599453e872e98b3 100644 (file)
@@ -52,7 +52,7 @@ void make_local_shells(t_commrec *cr, t_mdatoms *md,
 
 /* Optimize shell positions */
 int relax_shell_flexcon(FILE *log, t_commrec *cr, gmx_bool bVerbose,
-                        gmx_large_int_t mdstep, t_inputrec *inputrec,
+                        gmx_int64_t mdstep, t_inputrec *inputrec,
                         gmx_bool bDoNS, int force_flags,
                         gmx_localtop_t *top,
                         gmx_constr_t constr,
index 07d3bf666cd3431a01b3b707219aced36e50a773..adb59d75c0931d60ff5abda7adf79218b8e16f89 100644 (file)
@@ -77,13 +77,13 @@ void global_stat(FILE *log, gmx_global_stat_t gs,
                  gmx_bool bSumEkinhOld, int flags);
 /* Communicate statistics over cr->mpi_comm_mysim */
 
-int do_per_step(gmx_large_int_t step, gmx_large_int_t nstep);
+int do_per_step(gmx_int64_t step, gmx_int64_t nstep);
 /* Return TRUE if io should be done */
 
 /* ROUTINES from sim_util.c */
 
 void print_time(FILE *out, gmx_walltime_accounting_t walltime_accounting,
-                gmx_large_int_t step, t_inputrec *ir, t_commrec *cr);
+                gmx_int64_t step, t_inputrec *ir, t_commrec *cr);
 
 void print_date_and_time(FILE *log, int pid, const char *title,
                          const gmx_walltime_accounting_t walltime_accounting);
@@ -98,7 +98,7 @@ void finish_run(FILE *log, t_commrec *cr,
 void calc_enervirdiff(FILE *fplog, int eDispCorr, t_forcerec *fr);
 
 void calc_dispcorr(FILE *fplog, t_inputrec *ir, t_forcerec *fr,
-                   gmx_large_int_t step, int natoms,
+                   gmx_int64_t step, int natoms,
                    matrix box, real lambda, tensor pres, tensor virial,
                    real *prescorr, real *enercorr, real *dvdlcorr);
 
index e4e51a179edc8968e7c97dbafee1bc2049b28456..5df39f79558e205990508b71e683a70db0906eb7 100644 (file)
@@ -208,7 +208,7 @@ char *wrap_lines(const char *buf, int line_width, int indent,
 char **split(char sep, const char *str);
 
 /*! \brief
- * Convert a string to gmx_large_int_t.
+ * Convert a string to gmx_int64_t.
  *
  * This method works as the standard library function strtol(), except that it
  * does not support different bases.
@@ -219,7 +219,7 @@ char **split(char sep, const char *str);
  *  - If an overflow occurs, returns zero and \p *endptr will equal \p str.
  *    errno is still set to ERANGE.
  */
-gmx_large_int_t str_to_large_int_t(const char *str, char **endptr);
+gmx_int64_t str_to_int64_t(const char *str, char **endptr);
 
 #ifdef GMX_NATIVE_WINDOWS
 #define snprintf _snprintf
index a03a73cc337d84058b07c4b6720b401b6581d849..419ffb64a236c1de024ebf7bc93363d7d20c4995 100644 (file)
@@ -92,7 +92,7 @@ typedef tMPI_Op MPI_Op;
 #define MPI_LONG_DOUBLE         TMPI_LONG_DOUBLE
 #define MPI_WCHAR               TMPI_WCHAR
 #define MPI_BYTE                TMPI_BYTE
-
+#define MPI_INT64_T             TMPI_INT64_T
 
 
 #define MPI_SUCCESS                 TMPI_SUCCESS
index d5f0e4bf4d09ac82c4015159ac9a7c1efd33d63e..38af58fe2426c630e14eed18fee47f2ff28a7109 100644 (file)
@@ -168,6 +168,9 @@ TMPI_EXPORT
 extern const tMPI_Datatype TMPI_POINTER;            /**< pointer (thread_mpi
                                                                   specific) */
 
+TMPI_EXPORT
+extern const tMPI_Datatype TMPI_INT64_T;            /**< int64_t */
+
 /*! \} */
 
 
index d3963b3db7c0e65416358d48ed5db38ceb2f993a..6d45e44bde6a57b8497408e62c2d360c755eeeeb 100644 (file)
@@ -103,8 +103,8 @@ int over_alloc_dd(int n);
 /* Over allocation for large data types: complex structs */
 #define over_alloc_large(n) (int)(OVER_ALLOC_FAC*(n) + 1000)
 
-int gmx_large_int_to_int(gmx_large_int_t step, const char *warn);
-/* Convert a gmx_large_int_t value to int.
+int gmx_int64_to_int(gmx_int64_t step, const char *warn);
+/* Convert a gmx_int64_t value to int.
  * If warn!=NULL a warning message will be written
  * to stderr when step does not fit in an int,
  * the first line is:
@@ -113,10 +113,10 @@ int gmx_large_int_to_int(gmx_large_int_t step, const char *warn);
 
 #define STEPSTRSIZE 22
 
-char *gmx_step_str(gmx_large_int_t i, char *buf);
-/* Prints a gmx_large_int_t value in buf and returns the pointer to buf.
+char *gmx_step_str(gmx_int64_t i, char *buf);
+/* Prints a gmx_int64_t value in buf and returns the pointer to buf.
  * buf should be large enough to contain i: STEPSTRSIZE (22) chars.
- * When multiple gmx_large_int_t values are printed in the same printf call,
+ * When multiple gmx_int64_t values are printed in the same printf call,
  * be sure to call gmx_step_str with different buffers.
  */
 
index 5e3926c8578d1437433c15ccd7dcc974f6ca9cb7..93efed42e822615f0c69db24b89f8aaee9e966c8 100644 (file)
@@ -119,7 +119,7 @@ typedef struct {
     int             *ibuf; /* for ints */
     int              ibuf_alloc;
 
-    gmx_large_int_t *libuf;
+    gmx_int64_t     *libuf;
     int              libuf_alloc;
 
     float           *fbuf; /* for floats */
@@ -215,7 +215,7 @@ typedef struct {
     gmx_domdec_comm_p_t comm;
 
     /* The partioning count, to keep track of the state */
-    gmx_large_int_t ddp_count;
+    gmx_int64_t ddp_count;
 
 
     /* gmx_pme_recv_f buffer */
index c773cbb547e11ca4c170c73f86cb564708f0a0b3..54fa1dfaffab2ee3a0873746b68a43e8adcce8ef 100644 (file)
@@ -292,9 +292,9 @@ typedef struct {
 
 typedef struct {
     int             eI;                     /* Integration method                 */
-    gmx_large_int_t nsteps;                 /* number of steps to be taken                     */
+    gmx_int64_t     nsteps;                 /* number of steps to be taken                     */
     int             simulation_part;        /* Used in checkpointing to separate chunks */
-    gmx_large_int_t init_step;              /* start at a stepcount >0 (used w. tpbconv)    */
+    gmx_int64_t     init_step;              /* start at a stepcount >0 (used w. tpbconv)    */
     int             nstcalcenergy;          /* frequency of energy calc. and T/P coupl. upd.   */
     int             cutoff_scheme;          /* group or verlet cutoffs     */
     int             ns_type;                /* which ns method should we use?               */
index 41db81a45fc3225326dd87561ff51af6dab2ab8f..07fcd641e2fe9c1f4491e4b5d6fac4f905416dd7 100644 (file)
@@ -46,9 +46,9 @@ extern "C" {
 
 typedef struct {
     gmx_bool        bGStatEveryStep;
-    gmx_large_int_t step_ns;
-    gmx_large_int_t step_nscheck;
-    gmx_large_int_t nns;
+    gmx_int64_t     step_ns;
+    gmx_int64_t     step_nscheck;
+    gmx_int64_t     nns;
     matrix          scale_tot;
     int             nabnsb;
     double          s1;
@@ -58,14 +58,14 @@ typedef struct {
     double          lt_runav2;
 } gmx_nlheur_t;
 
-void reset_nlistheuristics(gmx_nlheur_t *nlh, gmx_large_int_t step);
+void reset_nlistheuristics(gmx_nlheur_t *nlh, gmx_int64_t step);
 
 void init_nlistheuristics(gmx_nlheur_t *nlh,
-                          gmx_bool bGStatEveryStep, gmx_large_int_t step);
+                          gmx_bool bGStatEveryStep, gmx_int64_t step);
 
-void update_nliststatistics(gmx_nlheur_t *nlh, gmx_large_int_t step);
+void update_nliststatistics(gmx_nlheur_t *nlh, gmx_int64_t step);
 
-void set_nlistheuristics(gmx_nlheur_t *nlh, gmx_bool bReset, gmx_large_int_t step);
+void set_nlistheuristics(gmx_nlheur_t *nlh, gmx_bool bReset, gmx_int64_t step);
 
 #ifdef __cplusplus
 }
index a58ca74fd8aa2f5723388501d9c36422f179f4b0..55d77aff5d1321314599ce0949300f1b3ea7c91c 100644 (file)
 
 /* Information about integer data type sizes */
 #include <limits.h>
+#define __STDC_LIMIT_MACROS
+#include <stdint.h>
+#ifndef _MSC_VER
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -154,68 +160,51 @@ typedef int             ivec[DIM];
 
 typedef int             imatrix[DIM][DIM];
 
+#ifdef _MSC_VER
+typedef __int32 gmx_int32_t;
+#define GMX_PRId32 "I32d"
+#define GMX_SCNd32 "I32d"
 
-/* For the step count type gmx_large_int_t we aim for 8 bytes (64bit),
- * but we might only be able to get 4 bytes (32bit).
- *
- * We first try to find a type without reyling on any SIZEOF_XXX defines.
- *
- * Avoid using "long int" if we can. This type is really dangerous,
- * since the width frequently depends on compiler options, and they
- * might not be set correctly when (buggy) Cmake is detecting things.
- * Instead, start by looking for "long long", and just go down if we
- * have to (rarely on new systems). /EL 20100810
- */
-#if ( (defined SIZEOF_LONG_LONG_INT && SIZEOF_LONG_LONG_INT == 8) || (defined LLONG_MAX && LLONG_MAX == 9223372036854775807LL) )
-
-/* Long long int is 64 bit */
-typedef long long int gmx_large_int_t;
-#define gmx_large_int_fmt   "lld"
-#define gmx_large_int_pfmt "%lld"
-#define SIZEOF_GMX_LARGE_INT  8
-#define GMX_LARGE_INT_MAX     9223372036854775807LL
-#define GMX_LARGE_INT_MIN     (-GMX_LARGE_INT_MAX - 1LL)
-#define GMX_MPI_LARGE_INT MPI_LONG_LONG_INT
-
-#elif ( (defined SIZEOF_LONG_INT && SIZEOF_LONG_INT == 8) || (defined LONG_MAX && LONG_MAX == 9223372036854775807L) )
-
-/* Long int is 64 bit */
-typedef long int gmx_large_int_t;
-#define gmx_large_int_fmt   "ld"
-#define gmx_large_int_pfmt "%ld"
-#define SIZEOF_GMX_LARGE_INT  8
-#define GMX_LARGE_INT_MAX     9223372036854775807LL
-#define GMX_LARGE_INT_MIN     (-GMX_LARGE_INT_MAX - 1LL)
-#define GMX_MPI_LARGE_INT MPI_LONG_INT
-
-#elif ( (defined SIZEOF_INT && SIZEOF_INT == 8) || (defined INT_MAX && INT_MAX == 9223372036854775807L) )
-
-/* int is 64 bit */
-typedef int gmx_large_int_t;
-#define gmx_large_int_fmt   "d"
-#define gmx_large_int_pfmt  "%d"
-#define SIZEOF_GMX_LARGE_INT  8
-#define GMX_LARGE_INT_MAX     9223372036854775807LL
-#define GMX_LARGE_INT_MIN     (-GMX_LARGE_INT_MAX - 1LL)
-#define GMX_MPI_LARGE_INT MPI_INT
-
-#elif ( (defined INT_MAX && INT_MAX == 2147483647) || (defined SIZEOF_INT && SIZEOF_INT == 4) )
-
-/* None of the above worked, try a 32 bit integer */
-typedef int gmx_large_int_t;
-#define gmx_large_int_fmt   "d"
-#define gmx_large_int_pfmt "%d"
-#define SIZEOF_GMX_LARGE_INT  4
-#define GMX_LARGE_INT_MAX     2147483647
-#define GMX_LARGE_INT_MIN     (-GMX_LARGE_INT_MAX - 1)
-#define GMX_MPI_LARGE_INT MPI_INT
+typedef __int64 gmx_int64_t;
+#define GMX_PRId64 "I64d"
+#define GMX_SCNd64 "I64d"
+
+typedef unsigned __int32 gmx_uint32_t;
+#define GMX_PRIu32 "U32d"
+#define GMX_SCNu32 "U32d"
 
+typedef unsigned __int64 gmx_uint64_t;
+#define GMX_PRIu64 "U64d"
+#define GMX_SCNu64 "U64d"
 #else
+typedef int32_t gmx_int32_t;
+#define GMX_PRId32 PRId32
+#define GMX_SCNd32 SCNd32
 
-#error "Cannot find any 32 or 64 bit integer data type. Please extend the gromacs simple.h file!"
+typedef int64_t gmx_int64_t;
+#define GMX_PRId64 PRId64
+#define GMX_SCNd64 SCNd64
 
+typedef uint32_t gmx_uint32_t;
+#define GMX_PRIu32 PRIu32
+#define GMX_SCNu32 SCNu32
+
+typedef uint64_t gmx_uint64_t;
+#define GMX_PRIu64 PRIu64
+#define GMX_SCNu64 SCNu64
 #endif
 
+#define GMX_INT32_MAX INT32_MAX
+#define GMX_INT32_MIN INT32_MIN
+
+#define GMX_INT64_MAX INT64_MAX
+#define GMX_INT64_MIN INT64_MIN
+
+#define GMX_UINT32_MAX UINT32_MAX
+#define GMX_UINT32_MIN UINT32_MIN
+
+#define GMX_UINT64_MAX UINT64_MAX
+#define GMX_UINT64_MIN UINT64_MIN
 
 #ifndef gmx_inline
 /* config.h tests for inline definitions and should work on a much wider range
index 92fe106dd0e7c36bfe0aa046a94d8c95a5e88305..2d434e71cbe2b2880b303f052db75f0d3424023a 100644 (file)
@@ -143,13 +143,13 @@ typedef struct
 
 typedef struct
 {
-    gmx_large_int_t    nsteps;       /* The number of steps in the history            */
-    gmx_large_int_t    nsum;         /* The nr. of steps in the ener_ave and ener_sum */
+    gmx_int64_t        nsteps;       /* The number of steps in the history            */
+    gmx_int64_t        nsum;         /* The nr. of steps in the ener_ave and ener_sum */
     double         *   ener_ave;     /* Energy term history sum to get fluctuations   */
     double         *   ener_sum;     /* Energy term history sum to get fluctuations   */
     int                nener;        /* Number of energy terms in two previous arrays */
-    gmx_large_int_t    nsteps_sim;   /* The number of steps in ener_sum_sim      */
-    gmx_large_int_t    nsum_sim;     /* The number of frames in ener_sum_sim     */
+    gmx_int64_t        nsteps_sim;   /* The number of steps in ener_sum_sim      */
+    gmx_int64_t        nsum_sim;     /* The number of frames in ener_sum_sim     */
     double         *   ener_sum_sim; /* Energy term history sum of the whole sim      */
 
     delta_h_history_t *dht;          /* The BAR energy differences */
index a035acf91ad169d9c44e930c26c44ad544716ca0..02136afd122b776b23b93ed1a36fe94ca3f09d15 100644 (file)
@@ -64,9 +64,9 @@ void set_stochd_state(gmx_update_t sd, t_state *state);
  * as a reference state for simulations with box deformation.
  */
 void set_deform_reference_box(gmx_update_t upd,
-                              gmx_large_int_t step, matrix box);
+                              gmx_int64_t step, matrix box);
 
-void update_tcouple(gmx_large_int_t   step,
+void update_tcouple(gmx_int64_t       step,
                     t_inputrec       *inputrec,
                     t_state          *state,
                     gmx_ekindata_t   *ekind,
@@ -76,7 +76,7 @@ void update_tcouple(gmx_large_int_t   step,
                     );
 
 void update_pcouple(FILE             *fplog,
-                    gmx_large_int_t   step,
+                    gmx_int64_t       step,
                     t_inputrec       *inputrec,
                     t_state          *state,
                     matrix            pcoupl_mu,
@@ -84,7 +84,7 @@ void update_pcouple(FILE             *fplog,
                     gmx_bool          bInitStep);
 
 void update_coords(FILE             *fplog,
-                   gmx_large_int_t   step,
+                   gmx_int64_t       step,
                    t_inputrec       *inputrec, /* input record and box stuff   */
                    t_mdatoms        *md,
                    t_state          *state,
@@ -105,10 +105,10 @@ void update_coords(FILE             *fplog,
 
 /* Return TRUE if OK, FALSE in case of Shake Error */
 
-extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_large_int_t step, t_mdatoms *md, t_state *state, gmx_update_t upd, t_idef *idef, gmx_constr_t constr);
+extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_int64_t step, t_mdatoms *md, t_state *state, gmx_update_t upd, t_idef *idef, gmx_constr_t constr);
 
 void update_constraints(FILE             *fplog,
-                        gmx_large_int_t   step,
+                        gmx_int64_t       step,
                         real             *dvdlambda, /* FEP stuff */
                         t_inputrec       *inputrec,  /* input record and box stuff     */
                         gmx_ekindata_t   *ekind,
@@ -131,7 +131,7 @@ void update_constraints(FILE             *fplog,
 /* Return TRUE if OK, FALSE in case of Shake Error */
 
 void update_box(FILE             *fplog,
-                gmx_large_int_t   step,
+                gmx_int64_t       step,
                 t_inputrec       *inputrec, /* input record and box stuff      */
                 t_mdatoms        *md,
                 t_state          *state,
@@ -182,7 +182,7 @@ t_state *init_bufstate(const t_state *template_state);
 
 void destroy_bufstate(t_state *state);
 
-void trotter_update(t_inputrec *ir, gmx_large_int_t step, gmx_ekindata_t *ekind,
+void trotter_update(t_inputrec *ir, gmx_int64_t step, gmx_ekindata_t *ekind,
                     gmx_enerdata_t *enerd, t_state *state, tensor vir, t_mdatoms *md,
                     t_extmass *MassQ, int **trotter_seqlist, int trotter_seqno);
 
@@ -218,13 +218,13 @@ real calc_pres(int ePBC, int nwall, matrix box, tensor ekin, tensor vir,
  * The unit of pressure is bar.
  */
 
-void parrinellorahman_pcoupl(FILE *fplog, gmx_large_int_t step,
+void parrinellorahman_pcoupl(FILE *fplog, gmx_int64_t step,
                              t_inputrec *ir, real dt, tensor pres,
                              tensor box, tensor box_rel, tensor boxv,
                              tensor M, matrix mu,
                              gmx_bool bFirstStep);
 
-void berendsen_pcoupl(FILE *fplog, gmx_large_int_t step,
+void berendsen_pcoupl(FILE *fplog, gmx_int64_t step,
                       t_inputrec *ir, real dt, tensor pres, matrix box,
                       matrix mu);
 
index b2f48afca262fce736c8544396b264a9a876c896..240c3d5f6ef174545e7bf49a712a52c53efd505a 100644 (file)
@@ -1471,7 +1471,7 @@ static void cconerr(gmx_domdec_t *dd,
 
 gmx_bool constrain_lincs(FILE *fplog, gmx_bool bLog, gmx_bool bEner,
                          t_inputrec *ir,
-                         gmx_large_int_t step,
+                         gmx_int64_t step,
                          struct gmx_lincsdata *lincsd, t_mdatoms *md,
                          t_commrec *cr,
                          rvec *x, rvec *xprime, rvec *min_proj,
index 695015bcd0cd1c67f08dd0cfb381d22bd0df1fa3..af425d5e0670aaba93f77248884ab393ad6c9ef7 100644 (file)
@@ -265,7 +265,7 @@ static void write_constr_pdb(const char *fn, const char *title,
     gmx_fio_fclose(out);
 }
 
-static void dump_confs(FILE *fplog, gmx_large_int_t step, gmx_mtop_t *mtop,
+static void dump_confs(FILE *fplog, gmx_int64_t step, gmx_mtop_t *mtop,
                        int start, int homenr, t_commrec *cr,
                        rvec x[], rvec xprime[], matrix box)
 {
@@ -307,7 +307,7 @@ gmx_bool constrain(FILE *fplog, gmx_bool bLog, gmx_bool bEner,
                    struct gmx_constr *constr,
                    t_idef *idef, t_inputrec *ir, gmx_ekindata_t *ekind,
                    t_commrec *cr,
-                   gmx_large_int_t step, int delta_step,
+                   gmx_int64_t step, int delta_step,
                    t_mdatoms *md,
                    rvec *x, rvec *xprime, rvec *min_proj,
                    gmx_bool bMolPBC, matrix box,
@@ -583,7 +583,7 @@ gmx_bool constrain(FILE *fplog, gmx_bool bLog, gmx_bool bEner,
             {
                 char buf[256];
                 sprintf(buf,
-                        "\nstep " gmx_large_int_pfmt ": Water molecule starting at atom %d can not be "
+                        "\nstep " "%"GMX_PRId64 ": Water molecule starting at atom %d can not be "
                         "settled.\nCheck for bad contacts and/or reduce the timestep if appropriate.\n",
                         step, ddglatnr(cr->dd, settle->iatoms[settle_error*(1+NRAL(F_SETTLE))+1]));
                 if (fplog)
index bd20652e75035d06eba8cb159f74da92931588f4..62c3b0bc881ac1d69c240c49c65359c015c3b66c 100644 (file)
@@ -326,7 +326,7 @@ real calc_temp(real ekin, real nrdf)
     }
 }
 
-void parrinellorahman_pcoupl(FILE *fplog, gmx_large_int_t step,
+void parrinellorahman_pcoupl(FILE *fplog, gmx_int64_t step,
                              t_inputrec *ir, real dt, tensor pres,
                              tensor box, tensor box_rel, tensor boxv,
                              tensor M, matrix mu, gmx_bool bFirstStep)
@@ -524,7 +524,7 @@ void parrinellorahman_pcoupl(FILE *fplog, gmx_large_int_t step,
     mmul_ur0(invbox, t1, mu);
 }
 
-void berendsen_pcoupl(FILE *fplog, gmx_large_int_t step,
+void berendsen_pcoupl(FILE *fplog, gmx_int64_t step,
                       t_inputrec *ir, real dt, tensor pres, matrix box,
                       matrix mu)
 {
@@ -964,7 +964,7 @@ void destroy_bufstate(t_state *state)
     sfree(state);
 }
 
-void trotter_update(t_inputrec *ir, gmx_large_int_t step, gmx_ekindata_t *ekind,
+void trotter_update(t_inputrec *ir, gmx_int64_t step, gmx_ekindata_t *ekind,
                     gmx_enerdata_t *enerd, t_state *state,
                     tensor vir, t_mdatoms *md,
                     t_extmass *MassQ, int **trotter_seqlist, int trotter_seqno)
@@ -973,7 +973,7 @@ void trotter_update(t_inputrec *ir, gmx_large_int_t step, gmx_ekindata_t *ekind,
     int             n, i, j, d, ntgrp, ngtc, gc = 0;
     t_grp_tcstat   *tcstat;
     t_grpopts      *opts;
-    gmx_large_int_t step_eff;
+    gmx_int64_t     step_eff;
     real            ecorr, pcorr, dvdlcorr;
     real            bmass, qmass, reft, kT, dt, nd;
     tensor          dumpres, dumvir;
index ef1bd7e9a48e7d25f489e83430deaaec9f4c6605..6e4cc689cb80a5bf45b9239787ed772d8d7edc69 100644 (file)
@@ -399,7 +399,7 @@ typedef struct gmx_domdec_comm
     double load_pme;
 
     /* The last partition step */
-    gmx_large_int_t partition_step;
+    gmx_int64_t partition_step;
 
     /* Debugging */
     int  nstDDDump;
@@ -1971,7 +1971,7 @@ static char dim2char(int dim)
     return c;
 }
 
-static void write_dd_grid_pdb(const char *fn, gmx_large_int_t step,
+static void write_dd_grid_pdb(const char *fn, gmx_int64_t step,
                               gmx_domdec_t *dd, matrix box, gmx_ddbox_t *ddbox)
 {
     rvec   grid_s[2], *grid_r = NULL, cx, r;
@@ -2060,7 +2060,7 @@ static void write_dd_grid_pdb(const char *fn, gmx_large_int_t step,
     }
 }
 
-void write_dd_pdb(const char *fn, gmx_large_int_t step, const char *title,
+void write_dd_pdb(const char *fn, gmx_int64_t step, const char *title,
                   gmx_mtop_t *mtop, t_commrec *cr,
                   int natoms, rvec x[], matrix box)
 {
@@ -2828,7 +2828,7 @@ static real grid_jump_limit(gmx_domdec_comm_t *comm, real cutoff,
     return grid_jump_limit;
 }
 
-static gmx_bool check_grid_jump(gmx_large_int_t step,
+static gmx_bool check_grid_jump(gmx_int64_t     step,
                                 gmx_domdec_t   *dd,
                                 real            cutoff,
                                 gmx_ddbox_t    *ddbox,
@@ -3241,7 +3241,7 @@ static void set_dd_cell_sizes_slb(gmx_domdec_t *dd, gmx_ddbox_t *ddbox,
 static void dd_cell_sizes_dlb_root_enforce_limits(gmx_domdec_t *dd,
                                                   int d, int dim, gmx_domdec_root_t *root,
                                                   gmx_ddbox_t *ddbox,
-                                                  gmx_bool bUniform, gmx_large_int_t step, real cellsize_limit_f, int range[])
+                                                  gmx_bool bUniform, gmx_int64_t step, real cellsize_limit_f, int range[])
 {
     gmx_domdec_comm_t *comm;
     int                ncd, i, j, nmin, nmin_old;
@@ -3452,7 +3452,7 @@ static void dd_cell_sizes_dlb_root_enforce_limits(gmx_domdec_t *dd,
 static void set_dd_cell_sizes_dlb_root(gmx_domdec_t *dd,
                                        int d, int dim, gmx_domdec_root_t *root,
                                        gmx_ddbox_t *ddbox, gmx_bool bDynamicBox,
-                                       gmx_bool bUniform, gmx_large_int_t step)
+                                       gmx_bool bUniform, gmx_int64_t step)
 {
     gmx_domdec_comm_t *comm;
     int                ncd, d1, i, j, pos;
@@ -3677,7 +3677,7 @@ static void distribute_dd_cell_sizes_dlb(gmx_domdec_t *dd,
 
 static void set_dd_cell_sizes_dlb_change(gmx_domdec_t *dd,
                                          gmx_ddbox_t *ddbox, gmx_bool bDynamicBox,
-                                         gmx_bool bUniform, gmx_large_int_t step)
+                                         gmx_bool bUniform, gmx_int64_t step)
 {
     gmx_domdec_comm_t *comm;
     int                d, dim, d1;
@@ -3737,7 +3737,7 @@ static void set_dd_cell_sizes_dlb_nochange(gmx_domdec_t *dd, gmx_ddbox_t *ddbox)
 
 static void set_dd_cell_sizes_dlb(gmx_domdec_t *dd,
                                   gmx_ddbox_t *ddbox, gmx_bool bDynamicBox,
-                                  gmx_bool bUniform, gmx_bool bDoDLB, gmx_large_int_t step,
+                                  gmx_bool bUniform, gmx_bool bDoDLB, gmx_int64_t step,
                                   gmx_wallcycle_t wcycle)
 {
     gmx_domdec_comm_t *comm;
@@ -3807,7 +3807,7 @@ static void realloc_comm_ind(gmx_domdec_t *dd, ivec npulse)
 
 static void set_dd_cell_sizes(gmx_domdec_t *dd,
                               gmx_ddbox_t *ddbox, gmx_bool bDynamicBox,
-                              gmx_bool bUniform, gmx_bool bDoDLB, gmx_large_int_t step,
+                              gmx_bool bUniform, gmx_bool bDoDLB, gmx_int64_t step,
                               gmx_wallcycle_t wcycle)
 {
     gmx_domdec_comm_t *comm;
@@ -3847,7 +3847,7 @@ static void set_dd_cell_sizes(gmx_domdec_t *dd,
 static void comm_dd_ns_cell_sizes(gmx_domdec_t *dd,
                                   gmx_ddbox_t *ddbox,
                                   rvec cell_ns_x0, rvec cell_ns_x1,
-                                  gmx_large_int_t step)
+                                  gmx_int64_t step)
 {
     gmx_domdec_comm_t *comm;
     int                dim_ind, dim;
@@ -3923,7 +3923,7 @@ static void check_screw_box(matrix box)
     }
 }
 
-static void distribute_cg(FILE *fplog, gmx_large_int_t step,
+static void distribute_cg(FILE *fplog, gmx_int64_t step,
                           matrix box, ivec tric_dir, t_block *cgs, rvec pos[],
                           gmx_domdec_t *dd)
 {
@@ -4088,7 +4088,7 @@ static void distribute_cg(FILE *fplog, gmx_large_int_t step,
     }
 }
 
-static void get_cg_distribution(FILE *fplog, gmx_large_int_t step, gmx_domdec_t *dd,
+static void get_cg_distribution(FILE *fplog, gmx_int64_t step, gmx_domdec_t *dd,
                                 t_block *cgs, matrix box, gmx_ddbox_t *ddbox,
                                 rvec pos[])
 {
@@ -4356,7 +4356,7 @@ static void clear_and_mark_ind(int ncg, int *move,
 
 static void print_cg_move(FILE *fplog,
                           gmx_domdec_t *dd,
-                          gmx_large_int_t step, int cg, int dim, int dir,
+                          gmx_int64_t step, int cg, int dim, int dir,
                           gmx_bool bHaveLimitdAndCMOld, real limitd,
                           rvec cm_old, rvec cm_new, real pos_d)
 {
@@ -4395,7 +4395,7 @@ static void print_cg_move(FILE *fplog,
 
 static void cg_move_error(FILE *fplog,
                           gmx_domdec_t *dd,
-                          gmx_large_int_t step, int cg, int dim, int dir,
+                          gmx_int64_t step, int cg, int dim, int dir,
                           gmx_bool bHaveLimitdAndCMOld, real limitd,
                           rvec cm_old, rvec cm_new, real pos_d)
 {
@@ -4463,7 +4463,7 @@ static int *get_moved(gmx_domdec_comm_t *comm, int natoms)
     return comm->moved;
 }
 
-static void calc_cg_move(FILE *fplog, gmx_large_int_t step,
+static void calc_cg_move(FILE *fplog, gmx_int64_t step,
                          gmx_domdec_t *dd,
                          t_state *state,
                          ivec tric_dir, matrix tcm,
@@ -4638,7 +4638,7 @@ static void calc_cg_move(FILE *fplog, gmx_large_int_t step,
     }
 }
 
-static void dd_redistribute_cg(FILE *fplog, gmx_large_int_t step,
+static void dd_redistribute_cg(FILE *fplog, gmx_int64_t step,
                                gmx_domdec_t *dd, ivec tric_dir,
                                t_state *state, rvec **f,
                                t_forcerec *fr,
@@ -5567,7 +5567,7 @@ float dd_pme_f_ratio(gmx_domdec_t *dd)
     }
 }
 
-static void dd_print_load(FILE *fplog, gmx_domdec_t *dd, gmx_large_int_t step)
+static void dd_print_load(FILE *fplog, gmx_domdec_t *dd, gmx_int64_t step)
 {
     int  flags, d;
     char buf[22];
@@ -7080,7 +7080,7 @@ static void set_dlb_limits(gmx_domdec_t *dd)
 }
 
 
-static void turn_on_dlb(FILE *fplog, t_commrec *cr, gmx_large_int_t step)
+static void turn_on_dlb(FILE *fplog, t_commrec *cr, gmx_int64_t step)
 {
     gmx_domdec_t      *dd;
     gmx_domdec_comm_t *comm;
@@ -9274,7 +9274,7 @@ void print_dd_statistics(t_commrec *cr, t_inputrec *ir, FILE *fplog)
 }
 
 void dd_partition_system(FILE                *fplog,
-                         gmx_large_int_t      step,
+                         gmx_int64_t          step,
                          t_commrec           *cr,
                          gmx_bool             bMasterState,
                          int                  nstglobalcomm,
@@ -9297,7 +9297,7 @@ void dd_partition_system(FILE                *fplog,
     gmx_domdec_comm_t *comm;
     gmx_ddbox_t        ddbox = {0};
     t_block           *cgs_gl;
-    gmx_large_int_t    step_pcoupl;
+    gmx_int64_t        step_pcoupl;
     rvec               cell_ns_x0, cell_ns_x1;
     int                i, j, n, ncgindex_set, ncg_home_old = -1, ncg_moved, nat_f_novirsum;
     gmx_bool           bBoxChanged, bNStGlobalComm, bDoDLB, bCheckDLB, bTurnOnDLB, bLogLoad;
index 10b45e5a81004710136925de3767132da4ece6f6..76023e73ff3acdfb5518ecba9d02ab5fac2235a0 100644 (file)
@@ -663,7 +663,7 @@ real dd_choose_grid(FILE *fplog,
                     real cellsize_limit, real cutoff_dd,
                     gmx_bool bInterCGBondeds)
 {
-    gmx_large_int_t nnodes_div, ldiv;
+    gmx_int64_t     nnodes_div, ldiv;
     real            limit;
 
     if (MASTER(cr))
index e27b2bdc3d58c45f3a2bc29d961b83694685d0d7..d0bccbc811d4a9f84271e336d29e9df6b24b24f8 100644 (file)
@@ -792,7 +792,7 @@ static void write_edo_flood(t_edpar *edi, FILE *fp, real rmsd)
 
 
 /* From flood.xproj compute the Vfl(x) at this point */
-static real flood_energy(t_edpar *edi, gmx_large_int_t step)
+static real flood_energy(t_edpar *edi, gmx_int64_t step)
 {
     /* compute flooding energy Vfl
        Vfl = Efl * exp( - \frac {kT} {2Efl alpha^2} * sum_i { \lambda_i c_i^2 } )
@@ -940,7 +940,7 @@ static void do_single_flood(
         rvec            x[],
         rvec            force[],
         t_edpar        *edi,
-        gmx_large_int_t step,
+        gmx_int64_t     step,
         matrix          box,
         t_commrec      *cr,
         gmx_bool        bNS) /* Are we in a neighbor searching step? */
@@ -1047,7 +1047,7 @@ extern void do_flood(
         rvec             force[], /* forcefield forces, to these the flooding forces are added */
         gmx_edsam_t      ed,      /* ed data structure contains all ED and flooding groups */
         matrix           box,     /* the box */
-        gmx_large_int_t  step,    /* The relative time step since ir->init_step is already subtracted */
+        gmx_int64_t      step,    /* The relative time step since ir->init_step is already subtracted */
         gmx_bool         bNS)     /* Are we in a neighbor searching step? */
 {
     t_edpar *edi;
@@ -1940,7 +1940,7 @@ static inline void ed_unshift_single_coord(matrix box, const rvec x, const ivec
 }
 
 
-static void do_linfix(rvec *xcoll, t_edpar *edi, gmx_large_int_t step)
+static void do_linfix(rvec *xcoll, t_edpar *edi, gmx_int64_t step)
 {
     int  i, j;
     real proj, add;
@@ -2190,7 +2190,7 @@ static void do_radcon(rvec *xcoll, t_edpar *edi)
 }
 
 
-static void ed_apply_constraints(rvec *xcoll, t_edpar *edi, gmx_large_int_t step)
+static void ed_apply_constraints(rvec *xcoll, t_edpar *edi, gmx_int64_t step)
 {
     int i;
 
@@ -2985,7 +2985,7 @@ void init_edsam(gmx_mtop_t   *mtop,  /* global topology                    */
 
 
 void do_edsam(t_inputrec     *ir,
-              gmx_large_int_t step,
+              gmx_int64_t     step,
               t_commrec      *cr,
               rvec            xs[], /* The local current positions on this processor */
               rvec            v[],  /* The velocities */
index 4a8f1ba91bfe20c015a2452b068ae68c3415c70f..d9511ae6acad2be6a2d45e7260341b841deb1820 100644 (file)
@@ -93,7 +93,7 @@ extern void init_expanded_ensemble(gmx_bool bStateFromCP, t_inputrec *ir, gmx_rn
     *mcrng = gmx_rng_init(ir->expandedvals->lmc_seed);
     if (!bStateFromCP)
     {
-        init_df_history_weights(dfhist,ir->expandedvals,ir->fepvals->n_lambda);
+        init_df_history_weights(dfhist, ir->expandedvals, ir->fepvals->n_lambda);
     }
 }
 
@@ -261,7 +261,7 @@ static gmx_bool CheckHistogramRatios(int nhisto, real *histo, real ratio)
     return bIfFlat;
 }
 
-static gmx_bool CheckIfDoneEquilibrating(int nlim, t_expanded *expand, df_history_t *dfhist, gmx_large_int_t step)
+static gmx_bool CheckIfDoneEquilibrating(int nlim, t_expanded *expand, df_history_t *dfhist, gmx_int64_t step)
 {
 
     int      i, totalsamples;
@@ -363,7 +363,7 @@ static gmx_bool CheckIfDoneEquilibrating(int nlim, t_expanded *expand, df_histor
 }
 
 static gmx_bool UpdateWeights(int nlim, t_expanded *expand, df_history_t *dfhist,
-                              int fep_state, real *scaled_lamee, real *weighted_lamee, gmx_large_int_t step)
+                              int fep_state, real *scaled_lamee, real *weighted_lamee, gmx_int64_t step)
 {
     real     maxdiff = 0.000000001;
     gmx_bool bSufficientSamples;
@@ -376,7 +376,7 @@ static gmx_bool UpdateWeights(int nlim, t_expanded *expand, df_history_t *dfhist
     real     clam_varm, clam_varp, clam_weightsm, clam_weightsp, clam_minvar;
     real    *lam_weights, *lam_minvar_corr, *lam_variance, *lam_dg;
     double  *p_k;
-    double  pks = 0;
+    double   pks = 0;
     real    *numweighted_lamee, *logfrac;
     int     *nonzero;
     real     chi_m1_0, chi_p1_0, chi_m2_0, chi_p2_0, chi_p1_m1, chi_p2_m1, chi_m1_p1, chi_m2_p1;
@@ -922,7 +922,7 @@ static int ChooseNewLambda(int nlim, t_expanded *expand, df_history_t *dfhist, i
             if (lamnew > maxfep)
             {
                 /* it's possible some rounding is failing */
-                if (gmx_within_tol(remainder[fep_state],0,50*GMX_DOUBLE_EPS))
+                if (gmx_within_tol(remainder[fep_state], 0, 50*GMX_DOUBLE_EPS))
                 {
                     /* numerical rounding error -- no state other than the original has weight */
                     lamnew = fep_state;
@@ -1027,7 +1027,7 @@ static int ChooseNewLambda(int nlim, t_expanded *expand, df_history_t *dfhist, i
 
 /* print out the weights to the log, along with current state */
 extern void PrintFreeEnergyInfoToFile(FILE *outfile, t_lambda *fep, t_expanded *expand, t_simtemp *simtemp, df_history_t *dfhist,
-                                      int fep_state, int frequency, gmx_large_int_t step)
+                                      int fep_state, int frequency, gmx_int64_t step)
 {
     int         nlim, i, ifep, jfep;
     real        dw, dg, dv, dm, Tprint;
@@ -1209,7 +1209,7 @@ extern void set_mc_state(gmx_rng_t rng, t_state *state)
 
 extern int ExpandedEnsembleDynamics(FILE *log, t_inputrec *ir, gmx_enerdata_t *enerd,
                                     t_state *state, t_extmass *MassQ, int fep_state, df_history_t *dfhist,
-                                    gmx_large_int_t step, gmx_rng_t mcrng,
+                                    gmx_int64_t step, gmx_rng_t mcrng,
                                     rvec *v, t_mdatoms *mdatoms)
 /* Note that the state variable is only needed for simulated tempering, not
    Hamiltonian expanded ensemble.  May be able to remove it after integrator refactoring. */
index e4173975edd66fb36b4bd6ebe32d1ea5280a689c..c328a7eddb81a0a3beceb61b48895704758e517a 100644 (file)
@@ -143,7 +143,7 @@ void gmx_print_sepdvdl(FILE *fplog, const char *s, real v, real dvdlambda)
     fprintf(fplog, "  %-30s V %12.5e  dVdl %12.5e\n", s, v, dvdlambda);
 }
 
-void do_force_lowlevel(FILE       *fplog,   gmx_large_int_t step,
+void do_force_lowlevel(FILE       *fplog,   gmx_int64_t step,
                        t_forcerec *fr,      t_inputrec *ir,
                        t_idef     *idef,    t_commrec  *cr,
                        t_nrnb     *nrnb,    gmx_wallcycle_t wcycle,
index 1a3e7dd36e42bb5cc1dc8d3fcacf4be35b45a1b6..d60e052d9f775856531be3b4265937df8d737240 100644 (file)
@@ -56,14 +56,14 @@ gmx_bool gs_simlocal[eglsNR] = { TRUE, FALSE, FALSE, TRUE };
 
 /* check which of the multisim simulations has the shortest number of
    steps and return that number of nsteps */
-gmx_large_int_t get_multisim_nsteps(const t_commrec *cr,
-                                    gmx_large_int_t  nsteps)
+gmx_int64_t get_multisim_nsteps(const t_commrec *cr,
+                                gmx_int64_t      nsteps)
 {
-    gmx_large_int_t steps_out;
+    gmx_int64_t steps_out;
 
-    if MASTER(cr)
+    if (MASTER(cr))
     {
-        gmx_large_int_t *buf;
+        gmx_int64_t     *buf;
         int              s;
 
         snew(buf, cr->ms->nsim);
@@ -86,12 +86,12 @@ gmx_large_int_t get_multisim_nsteps(const t_commrec *cr,
         if (steps_out >= 0 && steps_out < nsteps)
         {
             char strbuf[255];
-            snprintf(strbuf, 255, "Will stop simulation %%d after %s steps (another simulation will end then).\n", gmx_large_int_pfmt);
+            snprintf(strbuf, 255, "Will stop simulation %%d after %s steps (another simulation will end then).\n", "%"GMX_PRId64);
             fprintf(stderr, strbuf, cr->ms->sim, steps_out);
         }
     }
     /* broadcast to non-masters */
-    gmx_bcast(sizeof(gmx_large_int_t), &steps_out, cr);
+    gmx_bcast(sizeof(gmx_int64_t), &steps_out, cr);
     return steps_out;
 }
 
@@ -507,7 +507,7 @@ void check_nst_param(FILE *fplog, t_commrec *cr,
     }
 }
 
-void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bRerunMD,
+void set_current_lambdas(gmx_int64_t step, t_lambda *fepvals, gmx_bool bRerunMD,
                          t_trxframe *rerun_fr, t_state *state_global, t_state *state, double lam0[])
 /* find the current lambdas.  If rerunning, we either read in a state, or a lambda value,
    requiring different logic. */
@@ -518,7 +518,7 @@ void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bReru
     {
         if (rerun_fr->bLambda)
         {
-            if (fepvals->delta_lambda==0)
+            if (fepvals->delta_lambda == 0)
             {
                 state_global->lambda[efptFEP] = rerun_fr->lambda;
                 for (i = 0; i < efptNR; i++)
@@ -581,7 +581,8 @@ void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bReru
         }
         else
         {
-            if (state->fep_state > 0) {
+            if (state->fep_state > 0)
+            {
                 state_global->fep_state = state->fep_state; /* state->fep is the one updated by bExpanded */
                 for (i = 0; i < efptNR; i++)
                 {
index 51e22f3c00440d5993a34dd3d4d84ddcdc3f27fa..e93537b9862a0a3c4b55ad05690d83ce65b6374d 100644 (file)
@@ -1302,7 +1302,7 @@ static void pprint(FILE *log, const char *s, t_mdebin *md)
     fprintf(log, "\n");
 }
 
-void print_ebin_header(FILE *log, gmx_large_int_t steps, double time, real lambda)
+void print_ebin_header(FILE *log, gmx_int64_t steps, double time, real lambda)
 {
     char buf[22];
 
@@ -1313,7 +1313,7 @@ void print_ebin_header(FILE *log, gmx_large_int_t steps, double time, real lambd
 
 void print_ebin(ener_file_t fp_ene, gmx_bool bEne, gmx_bool bDR, gmx_bool bOR,
                 FILE *log,
-                gmx_large_int_t step, double time,
+                gmx_int64_t step, double time,
                 int mode, gmx_bool bCompact,
                 t_mdebin *md, t_fcdata *fcd,
                 gmx_groups_t *groups, t_grpopts *opts)
index a1803f7af22fdaa43cce5401962c11d95df2edef..e4a722be311d8144e17505d70d2ad46ccb84946d 100644 (file)
@@ -159,7 +159,7 @@ static void mde_delta_h_make_hist(t_mde_delta_h *dh, int hi, gmx_bool invert)
        Get this start value in number of histogram dxs from zero,
        as an integer.*/
 
-    dh->x0[hi] = (gmx_large_int_t)floor(min_dh/dx);
+    dh->x0[hi] = (gmx_int64_t)floor(min_dh/dx);
 
     min_dh_hist = (dh->x0[hi])*dx;
     max_dh_hist = (dh->x0[hi] + dh->nbins + 1)*dx;
index 85435ba1861eec3d5b5d06167cdb4d290f77bfa8..90c85b58e414cd7c6033de7456bbccfbdc108699 100644 (file)
@@ -63,8 +63,8 @@ typedef struct
     double          dx;                 /* the histogram spacing in kJ/mol. This is the
                                            same for the two histograms? */
     unsigned int    nbins;              /* the number of bins in the histograms*/
-    gmx_large_int_t x0[2];              /* the starting point in units of spacing
-                                           of the histogram */
+    gmx_int64_t     x0[2];              /* the starting point in units of spacing
+                                               of the histogram */
     unsigned int    maxbin[2];          /* highest bin number with data */
 
     int             type;               /* the block type according to dhbtDH, etc. */
@@ -74,8 +74,8 @@ typedef struct
     int             nlambda;            /* length of the lambda vector */
     gmx_bool        written;            /* whether this data has already been written out */
 
-    gmx_large_int_t subblock_meta_l[5]; /* metadata for an mdebin subblock for
-                                           I/O: for histogram counts, etc.*/
+    gmx_int64_t     subblock_meta_l[5]; /* metadata for an mdebin subblock for
+                                               I/O: for histogram counts, etc.*/
     double         *subblock_meta_d;    /* metadata subblock for I/O, used for
                                            communicating doubles (i.e. the lambda
                                            vector) */
index 20f82a340744aea04e739d00d31298b8941f1f26..09083dc69370f0a92216d6849dec672134a2b58a 100644 (file)
@@ -169,7 +169,7 @@ static void warn_step(FILE *fp, real ftol, gmx_bool bLastStep, gmx_bool bConstra
 
 
 static void print_converged(FILE *fp, const char *alg, real ftol,
-                            gmx_large_int_t count, gmx_bool bDone, gmx_large_int_t nsteps,
+                            gmx_int64_t count, gmx_bool bDone, gmx_int64_t nsteps,
                             real epot, real fmax, int nfmax, real fnorm)
 {
     char buf[STEPSTRSIZE];
@@ -500,7 +500,7 @@ static void write_em_traj(FILE *fplog, t_commrec *cr,
                           gmx_mdoutf_t *outf,
                           gmx_bool bX, gmx_bool bF, const char *confout,
                           gmx_mtop_t *top_global,
-                          t_inputrec *ir, gmx_large_int_t step,
+                          t_inputrec *ir, gmx_int64_t step,
                           em_state_t *state,
                           t_state *state_global, rvec *f_global)
 {
@@ -545,7 +545,7 @@ static void do_em_step(t_commrec *cr, t_inputrec *ir, t_mdatoms *md,
                        em_state_t *ems1, real a, rvec *f, em_state_t *ems2,
                        gmx_constr_t constr, gmx_localtop_t *top,
                        t_nrnb *nrnb, gmx_wallcycle_t wcycle,
-                       gmx_large_int_t count)
+                       gmx_int64_t count)
 
 {
     t_state *s1, *s2;
@@ -689,7 +689,7 @@ static void evaluate_energy(FILE *fplog, t_commrec *cr,
                             t_graph *graph, t_mdatoms *mdatoms,
                             t_forcerec *fr, rvec mu_tot,
                             gmx_enerdata_t *enerd, tensor vir, tensor pres,
-                            gmx_large_int_t count, gmx_bool bFirst)
+                            gmx_int64_t count, gmx_bool bFirst)
 {
     real     t;
     gmx_bool bNS;
@@ -2609,7 +2609,7 @@ double do_nm(FILE *fplog, t_commrec *cr,
     rvec                 mu_tot;
     rvec                *fneg, *dfdx;
     gmx_bool             bSparse; /* use sparse matrix storage format */
-    size_t               sz=0;
+    size_t               sz = 0;
     gmx_sparsematrix_t * sparse_matrix           = NULL;
     real           *     full_matrix             = NULL;
     em_state_t       *   state_work;
index ea662d4da10dc953e464bc43a96a94b62eb5623c..57e95efeffd1507cbd717193144cf93b6f84f879 100644 (file)
@@ -42,7 +42,7 @@
 #include "gmx_fatal.h"
 #include "vec.h"
 
-void reset_nlistheuristics(gmx_nlheur_t *nlh, gmx_large_int_t step)
+void reset_nlistheuristics(gmx_nlheur_t *nlh, gmx_int64_t step)
 {
     nlh->lt_runav     = 0;
     nlh->lt_runav2    = 0;
@@ -50,7 +50,7 @@ void reset_nlistheuristics(gmx_nlheur_t *nlh, gmx_large_int_t step)
 }
 
 void init_nlistheuristics(gmx_nlheur_t *nlh,
-                          gmx_bool bGStatEveryStep, gmx_large_int_t step)
+                          gmx_bool bGStatEveryStep, gmx_int64_t step)
 {
     nlh->bGStatEveryStep = bGStatEveryStep;
     nlh->nns             = 0;
@@ -62,9 +62,9 @@ void init_nlistheuristics(gmx_nlheur_t *nlh,
     reset_nlistheuristics(nlh, step);
 }
 
-void update_nliststatistics(gmx_nlheur_t *nlh, gmx_large_int_t step)
+void update_nliststatistics(gmx_nlheur_t *nlh, gmx_int64_t step)
 {
-    gmx_large_int_t nl_lt;
+    gmx_int64_t     nl_lt;
     char            sbuf[STEPSTRSIZE], sbuf2[STEPSTRSIZE];
 
     /* Determine the neighbor list life time */
@@ -112,7 +112,7 @@ void update_nliststatistics(gmx_nlheur_t *nlh, gmx_large_int_t step)
     }
 }
 
-void set_nlistheuristics(gmx_nlheur_t *nlh, gmx_bool bReset, gmx_large_int_t step)
+void set_nlistheuristics(gmx_nlheur_t *nlh, gmx_bool bReset, gmx_int64_t step)
 {
     int d;
 
index e9e976d7480dcb2a5e9b2e8b701bfc0d64b2e173..acce761510b6b0ad87a834f82a505aeef876bb3f 100644 (file)
@@ -4546,7 +4546,7 @@ void gmx_pme_calc_energy(gmx_pme_t pme, int n, rvec *x, real *q, real *V)
 static void reset_pmeonly_counters(gmx_wallcycle_t wcycle,
                                    gmx_walltime_accounting_t walltime_accounting,
                                    t_nrnb *nrnb, t_inputrec *ir,
-                                   gmx_large_int_t step)
+                                   gmx_int64_t step)
 {
     /* Reset all the counters related to performance over the run */
     wallcycle_stop(wcycle, ewcRUN);
@@ -4622,7 +4622,7 @@ int gmx_pmeonly(gmx_pme_t pme,
     int  count;
     gmx_bool bEnerVir;
     int pme_flags;
-    gmx_large_int_t step, step_rel;
+    gmx_int64_t step, step_rel;
     ivec grid_switch;
 
     /* This data will only use with PME tuning, i.e. switching PME grids */
index 65b64ca26e6338ec0ad5e56ac8ea11a73c1b4285..c9cf63deaa23636f7ab1d3f397d4e6371eb41f75 100644 (file)
@@ -116,7 +116,7 @@ typedef struct gmx_pme_comm_n_box {
     real            lambda_q;
     real            lambda_lj;
     int             flags;
-    gmx_large_int_t step;
+    gmx_int64_t     step;
     ivec            grid_size;    /* For PME grid tuning */
     real            ewaldcoeff_q; /* For PME grid tuning */
     real            ewaldcoeff_lj;
@@ -178,7 +178,7 @@ static void gmx_pme_send_params_coords(t_commrec *cr, int flags,
                                        matrix box, rvec gmx_unused *x,
                                        real lambda_q, real lambda_lj,
                                        int maxshift_x, int maxshift_y,
-                                       gmx_large_int_t step)
+                                       gmx_int64_t step)
 {
     gmx_domdec_t         *dd;
     gmx_pme_comm_n_box_t *cnb;
@@ -317,7 +317,7 @@ void gmx_pme_send_coordinates(t_commrec *cr, matrix box, rvec *x,
                               gmx_bool bFreeEnergy_q, gmx_bool bFreeEnergy_lj,
                               real lambda_q, real lambda_lj,
                               gmx_bool bEnerVir, int pme_flags,
-                              gmx_large_int_t step)
+                              gmx_int64_t step)
 {
     int flags;
 
@@ -370,7 +370,7 @@ void gmx_pme_send_switchgrid(t_commrec gmx_unused *cr,
 #endif
 }
 
-void gmx_pme_send_resetcounters(t_commrec gmx_unused *cr, gmx_large_int_t gmx_unused step)
+void gmx_pme_send_resetcounters(t_commrec gmx_unused *cr, gmx_int64_t gmx_unused step)
 {
 #ifdef GMX_MPI
     gmx_pme_comm_n_box_t cnb;
@@ -407,7 +407,7 @@ int gmx_pme_recv_params_coords(struct gmx_pme_pp          *pme_pp,
                                real gmx_unused            *lambda_lj,
                                gmx_bool gmx_unused        *bEnerVir,
                                int                        *pme_flags,
-                               gmx_large_int_t gmx_unused *step,
+                               gmx_int64_t gmx_unused     *step,
                                ivec gmx_unused             grid_size,
                                real gmx_unused            *ewaldcoeff_q,
                                real gmx_unused            *ewaldcoeff_lj)
index 25a7024cdc1731886dc88a63acd80b7fda4a311e..9e39e5f80e1a5ee0e11525ec64a1e84e702ad365 100644 (file)
@@ -106,7 +106,7 @@ static void pull_print_x(FILE *out, t_pull *pull, double t)
             }
             else
             {
-                pull_print_group_x(out, pull->dim, &pull->group[pcrd->group[0]]);  
+                pull_print_group_x(out, pull->dim, &pull->group[pcrd->group[0]]);
             }
         }
         pull_print_coord_dr(out, pull->dim, pcrd);
@@ -127,7 +127,7 @@ static void pull_print_f(FILE *out, t_pull *pull, double t)
     fprintf(out, "\n");
 }
 
-void pull_print_output(t_pull *pull, gmx_large_int_t step, double time)
+void pull_print_output(t_pull *pull, gmx_int64_t step, double time)
 {
     if ((pull->nstxout != 0) && (step % pull->nstxout == 0))
     {
@@ -373,8 +373,8 @@ void get_pull_coord_distance(const t_pull *pull,
                              const t_pbc *pbc, double t,
                              dvec dr, double *dev)
 {
-    static gmx_bool bWarned = FALSE; /* TODO: this should be fixed for thread-safety,
-                                        but is fairly benign */
+    static gmx_bool     bWarned = FALSE; /* TODO: this should be fixed for thread-safety,
+                                            but is fairly benign */
     const t_pull_coord *pcrd;
     int                 m;
     double              ref, drs, inpr;
@@ -444,19 +444,19 @@ static void do_constraint(t_pull *pull, t_pbc *pbc,
                           double dt, double t)
 {
 
-    dvec      *r_ij;   /* x[i] com of i in prev. step. Obeys constr. -> r_ij[i] */
-    dvec       unc_ij; /* xp[i] com of i this step, before constr.   -> unc_ij  */
-    dvec      *rnew;  /* current 'new' positions of the groups */
-    double    *dr_tot; /* the total update of the coords */
-    double     ref;
-    dvec       vec;
-    double     d0, inpr;
-    double     lambda, rm, mass, invdt = 0;
-    gmx_bool   bConverged_all, bConverged = FALSE;
-    int        niter = 0, g, c, ii, j, m, max_iter = 100;
-    double     a;
-    dvec       f;          /* the pull force */
-    dvec       tmp, tmp3;
+    dvec         *r_ij;   /* x[i] com of i in prev. step. Obeys constr. -> r_ij[i] */
+    dvec          unc_ij; /* xp[i] com of i this step, before constr.   -> unc_ij  */
+    dvec         *rnew;   /* current 'new' positions of the groups */
+    double       *dr_tot; /* the total update of the coords */
+    double        ref;
+    dvec          vec;
+    double        d0, inpr;
+    double        lambda, rm, mass, invdt = 0;
+    gmx_bool      bConverged_all, bConverged = FALSE;
+    int           niter = 0, g, c, ii, j, m, max_iter = 100;
+    double        a;
+    dvec          f;       /* the pull force */
+    dvec          tmp, tmp3;
     t_pull_group *pdyna, *pgrp0, *pgrp1;
     t_pull_coord *pcrd;
 
@@ -1141,7 +1141,7 @@ void init_pull(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
                 bAbs = TRUE;
             }
         }
-        
+
         fprintf(fplog, "\nWill apply %s COM pulling in geometry '%s'\n",
                 EPULLTYPE(ir->ePull), EPULLGEOM(pull->eGeom));
         fprintf(fplog, "with %d pull coordinate%s and %d group%s\n",
index bb026b80c2ce12f0f653c4e2d8606ad571cbb86e..00dc82c0c5b652b43f58420ba9bba0ce1b038a70 100644 (file)
@@ -309,19 +309,19 @@ static real get_fitangle(t_rotgrp *rotg, gmx_enfrotgrp_t erg)
 
 
 /* Reduce potential angle fit data for this group at this time step? */
-static gmx_inline gmx_bool bPotAngle(t_rot *rot, t_rotgrp *rotg, gmx_large_int_t step)
+static gmx_inline gmx_bool bPotAngle(t_rot *rot, t_rotgrp *rotg, gmx_int64_t step)
 {
     return ( (erotgFitPOT == rotg->eFittype) && (do_per_step(step, rot->nstsout) || do_per_step(step, rot->nstrout)) );
 }
 
 /* Reduce slab torqe data for this group at this time step? */
-static gmx_inline gmx_bool bSlabTau(t_rot *rot, t_rotgrp *rotg, gmx_large_int_t step)
+static gmx_inline gmx_bool bSlabTau(t_rot *rot, t_rotgrp *rotg, gmx_int64_t step)
 {
     return ( (ISFLEX(rotg)) && do_per_step(step, rot->nstsout) );
 }
 
 /* Output rotation energy, torques, etc. for each rotation group */
-static void reduce_output(t_commrec *cr, t_rot *rot, real t, gmx_large_int_t step)
+static void reduce_output(t_commrec *cr, t_rot *rot, real t, gmx_int64_t step)
 {
     int             g, i, islab, nslabs = 0;
     int             count; /* MPI element counter                               */
@@ -480,7 +480,7 @@ static void reduce_output(t_commrec *cr, t_rot *rot, real t, gmx_large_int_t ste
 
 /* Add the forces from enforced rotation potential to the local forces.
  * Should be called after the SR forces have been evaluated */
-extern real add_rot_forces(t_rot *rot, rvec f[], t_commrec *cr, gmx_large_int_t step, real t)
+extern real add_rot_forces(t_rot *rot, rvec f[], t_commrec *cr, gmx_int64_t step, real t)
 {
     int             g, l, ii;
     t_rotgrp       *rotg;
@@ -1963,13 +1963,13 @@ static real do_flex2_lowlevel(
 
             /* Subtract the slab center from xj */
             rvec_sub(xj, xcn, tmpvec2);           /* tmpvec2 = xj - xcn       */
-            
+
             /* In rare cases, when an atom position coincides with a slab center
-             * (tmpvec2 == 0) we cannot compute the vector product for sjn. 
-             * However, since the atom is located directly on the pivot, this 
-             * slab's contribution to the force on that atom will be zero 
+             * (tmpvec2 == 0) we cannot compute the vector product for sjn.
+             * However, since the atom is located directly on the pivot, this
+             * slab's contribution to the force on that atom will be zero
              * anyway. Therefore, we directly move on to the next slab.       */
-            if ( 0 == norm(tmpvec2) )
+            if (0 == norm(tmpvec2) )
             {
                 continue;
             }
@@ -2204,11 +2204,11 @@ static real do_flex_lowlevel(
             rvec_sub(xj, xcn, xj_xcn);           /* xj_xcn = xj - xcn         */
 
             /* In rare cases, when an atom position coincides with a slab center
-             * (xj_xcn == 0) we cannot compute the vector product for qjn. 
-             * However, since the atom is located directly on the pivot, this 
-             * slab's contribution to the force on that atom will be zero 
+             * (xj_xcn == 0) we cannot compute the vector product for qjn.
+             * However, since the atom is located directly on the pivot, this
+             * slab's contribution to the force on that atom will be zero
              * anyway. Therefore, we directly move on to the next slab.       */
-            if ( 0 == norm(xj_xcn) )
+            if (0 == norm(xj_xcn) )
             {
                 continue;
             }
@@ -3531,10 +3531,10 @@ static void init_rot_group(FILE *fplog, t_commrec *cr, int g, t_rotgrp *rotg,
         }
 #endif
     }
-    
+
     if (bColl)
     {
-        /* Save the original (whole) set of positions in xc_old such that at later 
+        /* Save the original (whole) set of positions in xc_old such that at later
          * steps the rotation group can always be made whole again. If the simulation is
          * restarted, we compute the starting reference positions (given the time)
          * and assume that the correct PBC image of each position is the one nearest
@@ -3550,7 +3550,7 @@ static void init_rot_group(FILE *fplog, t_commrec *cr, int g, t_rotgrp *rotg,
             {
                 ii = rotg->ind[i];
 
-                /* Subtract pivot, rotate, and add pivot again. This will yield the 
+                /* Subtract pivot, rotate, and add pivot again. This will yield the
                  * reference position for time t */
                 rvec_sub(rotg->x_ref[i], erg->xc_ref_center, coord);
                 mvmul(erg->rotmat, coord, xref);
@@ -3906,7 +3906,7 @@ extern void do_rotation(
         matrix          box,
         rvec            x[],
         real            t,
-        gmx_large_int_t step,
+        gmx_int64_t     step,
         gmx_wallcycle_t wcycle,
         gmx_bool        bNS)
 {
index 7c558e65268abdca5b9ff93949fe174cf0a28804..6a735da82b1301b8d200d389bb62a568985799d3 100644 (file)
@@ -748,7 +748,7 @@ static void decrease_step_size(int nshell, t_shell s[])
     }
 }
 
-static void print_epot(FILE *fp, gmx_large_int_t mdstep, int count, real epot, real df,
+static void print_epot(FILE *fp, gmx_int64_t mdstep, int count, real epot, real df,
                        int ndir, real sf_dir)
 {
     char buf[22];
@@ -833,7 +833,7 @@ static void dump_shells(FILE *fp, rvec x[], rvec f[], real ftol, int ns, t_shell
 static void init_adir(FILE *log, gmx_shellfc_t shfc,
                       gmx_constr_t constr, t_idef *idef, t_inputrec *ir,
                       t_commrec *cr, int dd_ac1,
-                      gmx_large_int_t step, t_mdatoms *md, int start, int end,
+                      gmx_int64_t step, t_mdatoms *md, int start, int end,
                       rvec *x_old, rvec *x_init, rvec *x,
                       rvec *f, rvec *acc_dir,
                       gmx_bool bMolPBC, matrix box,
@@ -915,7 +915,7 @@ static void init_adir(FILE *log, gmx_shellfc_t shfc,
 }
 
 int relax_shell_flexcon(FILE *fplog, t_commrec *cr, gmx_bool bVerbose,
-                        gmx_large_int_t mdstep, t_inputrec *inputrec,
+                        gmx_int64_t mdstep, t_inputrec *inputrec,
                         gmx_bool bDoNS, int force_flags,
                         gmx_localtop_t *top,
                         gmx_constr_t constr,
index 3148dc3f07a8a98d1f6956eccde505426bef7b30..86243251c7afe67a1e44df91ea2ac598e22a535f 100644 (file)
@@ -94,7 +94,7 @@
 
 void print_time(FILE                     *out,
                 gmx_walltime_accounting_t walltime_accounting,
-                gmx_large_int_t           step,
+                gmx_int64_t               step,
                 t_inputrec               *ir,
                 t_commrec gmx_unused     *cr)
 {
@@ -423,7 +423,7 @@ static void pme_receive_force_ener(FILE           *fplog,
 }
 
 static void print_large_forces(FILE *fp, t_mdatoms *md, t_commrec *cr,
-                               gmx_large_int_t step, real pforce, rvec *x, rvec *f)
+                               gmx_int64_t step, real pforce, rvec *x, rvec *f)
 {
     int  i;
     real pf2, fn2;
@@ -444,7 +444,7 @@ static void print_large_forces(FILE *fp, t_mdatoms *md, t_commrec *cr,
 }
 
 static void post_process_forces(t_commrec *cr,
-                                gmx_large_int_t step,
+                                gmx_int64_t step,
                                 t_nrnb *nrnb, gmx_wallcycle_t wcycle,
                                 gmx_localtop_t *top,
                                 matrix box, rvec x[],
@@ -638,7 +638,7 @@ static void do_nb_verlet(t_forcerec *fr,
 
 void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
                          t_inputrec *inputrec,
-                         gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+                         gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
                          gmx_localtop_t *top,
                          gmx_groups_t gmx_unused *groups,
                          matrix box, rvec x[], history_t *hist,
@@ -1382,7 +1382,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
 
 void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
                         t_inputrec *inputrec,
-                        gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+                        gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
                         gmx_localtop_t *top,
                         gmx_groups_t *groups,
                         matrix box, rvec x[], history_t *hist,
@@ -1903,7 +1903,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
 
 void do_force(FILE *fplog, t_commrec *cr,
               t_inputrec *inputrec,
-              gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+              gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
               gmx_localtop_t *top,
               gmx_groups_t *groups,
               matrix box, rvec x[], history_t *hist,
@@ -1969,7 +1969,7 @@ void do_constrain_first(FILE *fplog, gmx_constr_t constr,
                         t_forcerec *fr, gmx_localtop_t *top)
 {
     int             i, m, start, end;
-    gmx_large_int_t step;
+    gmx_int64_t     step;
     real            dt = ir->delta_t;
     real            dvdl_dum;
     rvec           *savex;
@@ -2279,7 +2279,7 @@ void calc_enervirdiff(FILE *fplog, int eDispCorr, t_forcerec *fr)
 }
 
 void calc_dispcorr(FILE *fplog, t_inputrec *ir, t_forcerec *fr,
-                   gmx_large_int_t step, int natoms,
+                   gmx_int64_t step, int natoms,
                    matrix box, real lambda, tensor pres, tensor virial,
                    real *prescorr, real *enercorr, real *dvdlcorr)
 {
index 4a086ee806dc9beeb44c1adf6451a8f1359ef80e..23a09035a125aecac358ee376aca863a1bc91d17 100644 (file)
@@ -416,7 +416,7 @@ void global_stat(FILE *fplog, gmx_global_stat_t gs,
     where();
 }
 
-int do_per_step(gmx_large_int_t step, gmx_large_int_t nstep)
+int do_per_step(gmx_int64_t step, gmx_int64_t nstep)
 {
     if (nstep != 0)
     {
@@ -427,4 +427,3 @@ int do_per_step(gmx_large_int_t step, gmx_large_int_t nstep)
         return 0;
     }
 }
-
index c28bcfe2d6ac3923878fe9514322f9a973b88c17..52fed76017b1e35643c27f72a3e9a667c1d9d705 100644 (file)
@@ -122,7 +122,7 @@ typedef struct gmx_update
     gmx_bool  randatom_list_init;
 
     /* Variables for the deform algorithm */
-    gmx_large_int_t deformref_step;
+    gmx_int64_t     deformref_step;
     matrix          deformref_box;
 } t_gmx_update;
 
@@ -1265,7 +1265,7 @@ void restore_ekinstate_from_state(t_commrec *cr,
     }
 }
 
-void set_deform_reference_box(gmx_update_t upd, gmx_large_int_t step, matrix box)
+void set_deform_reference_box(gmx_update_t upd, gmx_int64_t step, matrix box)
 {
     upd->deformref_step = step;
     copy_mat(box, upd->deformref_box);
@@ -1273,7 +1273,7 @@ void set_deform_reference_box(gmx_update_t upd, gmx_large_int_t step, matrix box
 
 static void deform(gmx_update_t upd,
                    int start, int homenr, rvec x[], matrix box, matrix *scale_tot,
-                   const t_inputrec *ir, gmx_large_int_t step)
+                   const t_inputrec *ir, gmx_int64_t step)
 {
     matrix bnew, invbox, mu;
     real   elapsed_time;
@@ -1333,7 +1333,7 @@ static void combine_forces(int nstcalclr,
                            gmx_constr_t constr,
                            t_inputrec *ir, t_mdatoms *md, t_idef *idef,
                            t_commrec *cr,
-                           gmx_large_int_t step,
+                           gmx_int64_t step,
                            t_state *state, gmx_bool bMolPBC,
                            int start, int nrend,
                            rvec f[], rvec f_lr[],
@@ -1372,7 +1372,7 @@ static void combine_forces(int nstcalclr,
     }
 }
 
-void update_tcouple(gmx_large_int_t   step,
+void update_tcouple(gmx_int64_t       step,
                     t_inputrec       *inputrec,
                     t_state          *state,
                     gmx_ekindata_t   *ekind,
@@ -1442,7 +1442,7 @@ void update_tcouple(gmx_large_int_t   step,
 }
 
 void update_pcouple(FILE             *fplog,
-                    gmx_large_int_t   step,
+                    gmx_int64_t       step,
                     t_inputrec       *inputrec,
                     t_state          *state,
                     matrix            pcoupl_mu,
@@ -1512,7 +1512,7 @@ static rvec *get_xprime(const t_state *state, gmx_update_t upd)
 }
 
 void update_constraints(FILE             *fplog,
-                        gmx_large_int_t   step,
+                        gmx_int64_t       step,
                         real             *dvdlambda, /* the contribution to be added to the bonded interactions */
                         t_inputrec       *inputrec,  /* input record and box stuff     */
                         gmx_ekindata_t   *ekind,
@@ -1710,7 +1710,7 @@ void update_constraints(FILE             *fplog,
 }
 
 void update_box(FILE             *fplog,
-                gmx_large_int_t   step,
+                gmx_int64_t       step,
                 t_inputrec       *inputrec,  /* input record and box stuff     */
                 t_mdatoms        *md,
                 t_state          *state,
@@ -1815,7 +1815,7 @@ void update_box(FILE             *fplog,
 }
 
 void update_coords(FILE             *fplog,
-                   gmx_large_int_t   step,
+                   gmx_int64_t       step,
                    t_inputrec       *inputrec,  /* input record and box stuff  */
                    t_mdatoms        *md,
                    t_state          *state,
@@ -2066,7 +2066,7 @@ void correct_ekin(FILE *log, int start, int end, rvec v[], rvec vcm, real mass[]
             mv[XX], mv[YY], mv[ZZ]);
 }
 
-extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_large_int_t step, t_mdatoms *md, t_state *state, gmx_update_t upd, t_idef *idef, gmx_constr_t constr)
+extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_int64_t step, t_mdatoms *md, t_state *state, gmx_update_t upd, t_idef *idef, gmx_constr_t constr)
 {
 
     int  i;
index 0d025c9878de062344fa7ce7a1830186bcab0983..bd42f4c9f6469dfc74ffd809d9c1bde9a172e408 100644 (file)
@@ -1,6 +1,13 @@
 #line 2 "scanner.cpp"
+#line 50 "scanner.l"
+// Required before flex definitions, since it includes <stdint.h>.
+// Otherwise, compilers not strictly C99 get macro redefinition errors,
+// since flex defines INT64_MAX etc. in such cases.
+#include "gromacs/legacyheaders/types/simple.h"
+
 
-#line 4 "scanner.cpp"
+
+#line 11 "scanner.cpp"
 
 #define  YY_INT_ALIGNED short int
 
@@ -499,7 +506,7 @@ static yyconst flex_int16_t yy_chk[191] =
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013, 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.
@@ -544,15 +551,16 @@ static yyconst flex_int16_t yy_chk[191] =
  *
  * \ingroup module_selection
  */
-#line 50 "scanner.l"
+
+#line 56 "scanner.l"
 #include "gromacs/legacyheaders/string2.h"
 
 #include "parser.h"
 #include "scanner.h"
 #include "scanner_internal.h"
 
-/* This macro is here to make the actions a bit shorter, since nearly every
- * action needs this call. */
+// This macro makes the actions a bit shorter, since nearly every action needs
+// this call.
 #define ADD_TOKEN _gmx_sel_lexer_add_token(yytext, yyleng, state)
 
 #define YY_NO_UNISTD_H 1
@@ -560,7 +568,7 @@ static yyconst flex_int16_t yy_chk[191] =
 
 
 
-#line 564 "scanner.cpp"
+#line 572 "scanner.cpp"
 
 #define INITIAL 0
 #define matchof 1
@@ -789,7 +797,7 @@ YY_DECL
        register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 85 "scanner.l"
+#line 91 "scanner.l"
 
 
 
@@ -823,7 +831,7 @@ YY_DECL
     }
 
 
-#line 827 "scanner.cpp"
+#line 835 "scanner.cpp"
 
        if ( !yyg->yy_init )
                {
@@ -904,34 +912,34 @@ do_action:        /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 118 "scanner.l"
+#line 124 "scanner.l"
 
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 119 "scanner.l"
+#line 125 "scanner.l"
 { yylval->i   = strtol(yytext, NULL, 10);    ADD_TOKEN; return TOK_INT; }
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 120 "scanner.l"
+#line 126 "scanner.l"
 { yylval->r   = strtod(yytext, NULL);        ADD_TOKEN; return TOK_REAL; }
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 121 "scanner.l"
+#line 127 "scanner.l"
 { yylval->str = gmx_strndup(yytext+1, yyleng-2); ADD_TOKEN; return STR;  }
        YY_BREAK
 case 5:
 /* rule 5 can match eol */
 YY_RULE_SETUP
-#line 123 "scanner.l"
+#line 129 "scanner.l"
 { _gmx_sel_lexer_add_token(" ", 1, state); }
        YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 124 "scanner.l"
+#line 130 "scanner.l"
 {
                     if (yytext[0] == ';' || state->bInteractive)
                     {
@@ -946,122 +954,122 @@ YY_RULE_SETUP
                 }
        YY_BREAK
 case YY_STATE_EOF(cmdstart):
-#line 137 "scanner.l"
+#line 143 "scanner.l"
 { state->bCmdStart = true; yyterminate(); }
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(matchof):
 case YY_STATE_EOF(matchbool):
 case YY_STATE_EOF(help):
-#line 138 "scanner.l"
+#line 144 "scanner.l"
 { state->bCmdStart = true; return CMD_SEP; }
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 140 "scanner.l"
+#line 146 "scanner.l"
 { if (YYSTATE == cmdstart) { BEGIN(help); } return HELP; }
        YY_BREAK
 
 case 8:
 YY_RULE_SETUP
-#line 142 "scanner.l"
+#line 148 "scanner.l"
 
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 143 "scanner.l"
+#line 149 "scanner.l"
 { yylval->str = gmx_strndup(yytext, yyleng); return HELP_TOPIC; }
        YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 144 "scanner.l"
+#line 150 "scanner.l"
 { state->bCmdStart = true; return CMD_SEP; }
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 145 "scanner.l"
+#line 151 "scanner.l"
 { return INVALID; }
        YY_BREAK
 
 
 case 12:
 YY_RULE_SETUP
-#line 149 "scanner.l"
+#line 155 "scanner.l"
 { ADD_TOKEN; yylval->i = 1; return TOK_INT; }
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 150 "scanner.l"
+#line 156 "scanner.l"
 { ADD_TOKEN; yylval->i = 0; return TOK_INT; }
        YY_BREAK
 
 case 14:
 YY_RULE_SETUP
-#line 152 "scanner.l"
+#line 158 "scanner.l"
 { ADD_TOKEN; return GROUP; }
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 153 "scanner.l"
+#line 159 "scanner.l"
 { ADD_TOKEN; return TO; }
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 154 "scanner.l"
+#line 160 "scanner.l"
 { ADD_TOKEN; BEGIN(0); return OF; }
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 155 "scanner.l"
+#line 161 "scanner.l"
 { ADD_TOKEN; return AND; }
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 156 "scanner.l"
+#line 162 "scanner.l"
 { ADD_TOKEN; return OR; }
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 157 "scanner.l"
+#line 163 "scanner.l"
 { ADD_TOKEN; return XOR; }
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 158 "scanner.l"
+#line 164 "scanner.l"
 { ADD_TOKEN; return NOT; }
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 159 "scanner.l"
+#line 165 "scanner.l"
 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return CMP_OP; }
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 161 "scanner.l"
+#line 167 "scanner.l"
 { return _gmx_sel_lexer_process_identifier(yylval, yytext, yyleng, state); }
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 163 "scanner.l"
+#line 169 "scanner.l"
 { _gmx_sel_lexer_add_token(" ", 1, state); }
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 164 "scanner.l"
+#line 170 "scanner.l"
 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return STR; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 165 "scanner.l"
+#line 171 "scanner.l"
 { ADD_TOKEN; return yytext[0]; }
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 166 "scanner.l"
+#line 172 "scanner.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
        YY_BREAK
-#line 1065 "scanner.cpp"
+#line 1073 "scanner.cpp"
 
        case YY_END_OF_BUFFER:
                {
@@ -2212,4 +2220,4 @@ void _gmx_sel_yyfree (void * ptr , yyscan_t yyscanner)
 
 #define YYTABLES_NAME "yytables"
 
-#line 166 "scanner.l"
+#line 172 "scanner.l"
index 617df5fc044b16adf79cfb6e2050295ec57a877d..f200acd045208155a97c30e1b6717afb157cd434 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013, 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.
  *
  * \ingroup module_selection
  */
+%top{
+// Required before flex definitions, since it includes <stdint.h>.
+// Otherwise, compilers not strictly C99 get macro redefinition errors,
+// since flex defines INT32_MAX etc. in such cases.
+#include "gromacs/legacyheaders/types/simple.h"
+}
 %{
 #include "gromacs/legacyheaders/string2.h"
 
@@ -53,8 +59,8 @@
 #include "scanner.h"
 #include "scanner_internal.h"
 
-/* This macro is here to make the actions a bit shorter, since nearly every
- * action needs this call. */
+// This macro makes the actions a bit shorter, since nearly every action needs
+// this call.
 #define ADD_TOKEN _gmx_sel_lexer_add_token(yytext, yyleng, state)
 
 %}
index e3e1e291dc66db0a8c3130a0ce133188bf1e1beb..b2c9e5c6638aec18188504727f501932ce08a3c1 100644 (file)
@@ -3,8 +3,15 @@
 #define _gmx_sel_yyIN_HEADER 1
 
 #line 6 "scanner_flex.h"
+#line 50 "scanner.l"
+// Required before flex definitions, since it includes <stdint.h>.
+// Otherwise, compilers not strictly C99 get macro redefinition errors,
+// since flex defines INT64_MAX etc. in such cases.
+#include "gromacs/legacyheaders/types/simple.h"
 
-#line 8 "scanner_flex.h"
+
+
+#line 15 "scanner_flex.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -334,8 +341,8 @@ extern int _gmx_sel_yylex (yyscan_t yyscanner);
 #undef YY_DECL
 #endif
 
-#line 166 "scanner.l"
+#line 172 "scanner.l"
 
-#line 340 "scanner_flex.h"
+#line 347 "scanner_flex.h"
 #undef _gmx_sel_yyIN_HEADER
 #endif /* _gmx_sel_yyHEADER_H */
index 7a591540b922ee154349a6dc718b10c162f77ac6..04220d096587be527291f2238b7f4cfdafb500d9 100644 (file)
@@ -78,7 +78,7 @@ typedef struct gmx_wallcycle
 #endif
     int               ewc_prev;
     gmx_cycles_t      cycle_prev;
-    gmx_large_int_t   reset_counters;
+    gmx_int64_t       reset_counters;
 #ifdef GMX_MPI
     MPI_Comm          mpi_comm_mygroup;
 #endif
@@ -822,7 +822,7 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
     }
 }
 
-extern gmx_large_int_t wcycle_get_reset_counters(gmx_wallcycle_t wc)
+extern gmx_int64_t wcycle_get_reset_counters(gmx_wallcycle_t wc)
 {
     if (wc == NULL)
     {
@@ -832,7 +832,7 @@ extern gmx_large_int_t wcycle_get_reset_counters(gmx_wallcycle_t wc)
     return wc->reset_counters;
 }
 
-extern void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_large_int_t reset_counters)
+extern void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_int64_t reset_counters)
 {
     if (wc == NULL)
     {
index 6ede8f370fc0c2ffb4d3326004c48a45398168ae..c83bc88279886935a766c4e928533b1ba496416f 100644 (file)
@@ -93,10 +93,10 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
                      gmx_wallcycle_t wc, wallclock_gpu_t *gpu_t);
 /* Print the cycle and time accounting */
 
-gmx_large_int_t wcycle_get_reset_counters(gmx_wallcycle_t wc);
+gmx_int64_t wcycle_get_reset_counters(gmx_wallcycle_t wc);
 /* Return reset_counters from wc struct */
 
-void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_large_int_t reset_counters);
+void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_int64_t reset_counters);
 /* Set reset_counters */
 
 void wallcycle_sub_start(gmx_wallcycle_t wc, int ewcs);
index f7ccc4f18decc177e0d756e32d25a6b0d44907dc..b52d3e979a396ebf9d4382e33a1fcedbe2b33b09 100644 (file)
@@ -82,7 +82,7 @@ typedef struct gmx_walltime_accounting {
      * with respect to parallelism implementation. */
     int             numOpenMPThreads;
     //! Set by integrators to report the amount of work they did
-    gmx_large_int_t nsteps_done;
+    gmx_int64_t     nsteps_done;
 } t_gmx_walltime_accounting;
 
 /*! \brief Calls system timing routines (e.g. clock_gettime) to get
@@ -184,7 +184,7 @@ walltime_accounting_get_nsteps_done(gmx_walltime_accounting_t walltime_accountin
 
 void
 walltime_accounting_set_nsteps_done(gmx_walltime_accounting_t   walltime_accounting,
-                                    gmx_large_int_t             nsteps_done)
+                                    gmx_int64_t                 nsteps_done)
 {
     walltime_accounting->nsteps_done = nsteps_done;
 }
index 1a75b2726793a57202d0dd413e518bcb9ea8ff6c..641393a0ddac227f50650cace0f90b9ef1c54e17 100644 (file)
@@ -96,7 +96,7 @@ walltime_accounting_get_nsteps_done(gmx_walltime_accounting_t walltime_accountin
  * TODO consider whether this should get done in walltime_accounting_end */
 void
 walltime_accounting_set_nsteps_done(gmx_walltime_accounting_t   walltime_accounting,
-                                    gmx_large_int_t             nsteps_done);
+                                    gmx_int64_t                 nsteps_done);
 
 /*! \brief Calls system timing routines (e.g. clock_gettime) to get the
  * (fractional) number of seconds elapsed since the epoch.
index 62ead989b2db862478ba732c729144d7b5ef6244..ede4e5836ae548aac6867a34f6437bb620ef4727 100644 (file)
@@ -71,14 +71,14 @@ static void cmp_int(FILE *fp, const char *s, int index, int i1, int i2)
     }
 }
 
-static void cmp_gmx_large_int(FILE *fp, const char *s, gmx_large_int_t i1, gmx_large_int_t i2)
+static void cmp_gmx_large_int(FILE *fp, const char *s, gmx_int64_t i1, gmx_int64_t i2)
 {
     if (i1 != i2)
     {
         fprintf(fp, "%s (", s);
-        fprintf(fp, gmx_large_int_pfmt, i1);
+        fprintf(fp, "%"GMX_PRId64, i1);
         fprintf(fp, " - ");
-        fprintf(fp, gmx_large_int_pfmt, i2);
+        fprintf(fp, "%"GMX_PRId64, i2);
         fprintf(fp, ")\n");
     }
 }
index 21600282e14dedd16101c2f935be9ba698b7a064..880efc205454135426a2b64124009a7666d58310 100644 (file)
@@ -353,7 +353,7 @@ int gmx_tpbconv(int argc, char *argv[])
     ener_file_t       fp_ener = NULL;
     t_trnheader       head;
     int               i;
-    gmx_large_int_t   nsteps_req, run_step, frame;
+    gmx_int64_t       nsteps_req, run_step, frame;
     double            run_t, state_t;
     gmx_bool          bOK, bNsteps, bExtend, bUntil, bTime, bTraj;
     gmx_bool          bFrame, bUse, bSel, bNeedEner, bReadEner, bScanEner, bFepState;
@@ -413,7 +413,7 @@ int gmx_tpbconv(int argc, char *argv[])
         return 0;
     }
 
-    /* Convert int to gmx_large_int_t */
+    /* Convert int to gmx_int64_t */
     nsteps_req = nsteps_req_int;
     bNsteps    = opt2parg_bSet("-nsteps", asize(pa), pa);
     bExtend    = opt2parg_bSet("-extend", asize(pa), pa);
@@ -556,7 +556,7 @@ int gmx_tpbconv(int argc, char *argv[])
                 if (bFrame || !bOK)
                 {
                     sprintf(buf, "\r%s %s frame %s%s: step %s%s time %s",
-                            "%s", "%s", "%6", gmx_large_int_fmt, "%6", gmx_large_int_fmt, " %8.3f");
+                            "%s", "%s", "%6", GMX_PRId64, "%6", GMX_PRId64, " %8.3f");
                     fprintf(stderr, buf,
                             bUse ? "Read   " : "Skipped", ftp2ext(fn2ftp(frame_fn)),
                             frame, head.step, head.t);
@@ -616,7 +616,7 @@ int gmx_tpbconv(int argc, char *argv[])
         /* Determine total number of steps remaining */
         if (bExtend)
         {
-            ir->nsteps = ir->nsteps - (run_step - ir->init_step) + (gmx_large_int_t)(extend_t/ir->delta_t + 0.5);
+            ir->nsteps = ir->nsteps - (run_step - ir->init_step) + (gmx_int64_t)(extend_t/ir->delta_t + 0.5);
             printf("Extending remaining runtime of by %g ps (now %s steps)\n",
                    extend_t, gmx_step_str(ir->nsteps, buf));
         }
@@ -626,7 +626,7 @@ int gmx_tpbconv(int argc, char *argv[])
                    gmx_step_str(ir->nsteps, buf),
                    gmx_step_str(run_step, buf2),
                    run_t, until_t);
-            ir->nsteps = (gmx_large_int_t)((until_t - run_t)/ir->delta_t + 0.5);
+            ir->nsteps = (gmx_int64_t)((until_t - run_t)/ir->delta_t + 0.5);
             printf("Extending remaining runtime until %g ps (now %s steps)\n",
                    until_t, gmx_step_str(ir->nsteps, buf));
         }
@@ -680,7 +680,7 @@ int gmx_tpbconv(int argc, char *argv[])
         }
 
         state_t = ir->init_t + ir->init_step*ir->delta_t;
-        sprintf(buf,   "Writing statusfile with starting step %s%s and length %s%s steps...\n", "%10", gmx_large_int_fmt, "%10", gmx_large_int_fmt);
+        sprintf(buf,   "Writing statusfile with starting step %s%s and length %s%s steps...\n", "%10", GMX_PRId64, "%10", GMX_PRId64);
         fprintf(stderr, buf, ir->init_step, ir->nsteps);
         fprintf(stderr, "                                 time %10.3f and length %10.3f ps\n",
                 state_t, ir->nsteps*ir->delta_t);
index eeda69ca859e17b0d74ebe0013216dd6924ff3ae..1adeb20d7c43784e8fecfd87274e2c031274033b 100644 (file)
 #endif
 
 static void reset_all_counters(FILE *fplog, t_commrec *cr,
-                               gmx_large_int_t step,
-                               gmx_large_int_t *step_rel, t_inputrec *ir,
+                               gmx_int64_t step,
+                               gmx_int64_t *step_rel, t_inputrec *ir,
                                gmx_wallcycle_t wcycle, t_nrnb *nrnb,
                                gmx_walltime_accounting_t walltime_accounting,
                                nbnxn_cuda_ptr_t cu_nbv)
@@ -150,7 +150,7 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
              gmx_walltime_accounting_t walltime_accounting)
 {
     gmx_mdoutf_t   *outf;
-    gmx_large_int_t step, step_rel;
+    gmx_int64_t     step, step_rel;
     double          elapsed_time;
     double          t, t0, lam0[efptNR];
     gmx_bool        bGStatEveryStep, bGStat, bCalcVir, bCalcEner;
@@ -213,9 +213,9 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
     char              sbuf[STEPSTRSIZE], sbuf2[STEPSTRSIZE];
     int               handled_stop_condition = gmx_stop_cond_none; /* compare to get_stop_condition*/
     gmx_iterate_t     iterate;
-    gmx_large_int_t   multisim_nsteps = -1;                        /* number of steps to do  before first multisim
-                                                                      simulation stops. If equal to zero, don't
-                                                                      communicate any more between multisims.*/
+    gmx_int64_t       multisim_nsteps = -1;                        /* number of steps to do  before first multisim
+                                                                          simulation stops. If equal to zero, don't
+                                                                          communicate any more between multisims.*/
     /* PME load balancing data for GPU kernels */
     pme_load_balancing_t pme_loadbal = NULL;
     double               cycles_pmes;
index 67d7a13f2a39586676f3ce9ad344133e30f1b702..b2d3421ea1be235da75418e95ce30e295640ebdc 100644 (file)
@@ -438,7 +438,7 @@ int gmx_mdrun(int argc, char *argv[])
     int             repl_ex_nex   = 0;
     int             nstepout      = 100;
     int             resetstep     = -1;
-    gmx_large_int_t nsteps        = -2; /* the value -2 means that the mdp option will be used */
+    gmx_int64_t     nsteps        = -2; /* the value -2 means that the mdp option will be used */
 
     rvec            realddxyz          = {0, 0, 0};
     const char     *ddno_opt[ddnoNR+1] =
index 876c7881429e1983da00aabacba2b99c40f0d4c8..c900adf90c884a4fba7a544ebf3280c6346b7b1c 100644 (file)
@@ -373,7 +373,7 @@ static int pme_loadbal_end(pme_load_balancing_t pme_lb)
 }
 
 static void print_loadbal_limited(FILE *fp_err, FILE *fp_log,
-                                  gmx_large_int_t step,
+                                  gmx_int64_t step,
                                   pme_load_balancing_t pme_lb)
 {
     char buf[STRLEN], sbuf[22];
@@ -433,7 +433,7 @@ gmx_bool pme_load_balance(pme_load_balancing_t pme_lb,
                           interaction_const_t *ic,
                           nonbonded_verlet_t  *nbv,
                           gmx_pme_t           *pmedata,
-                          gmx_large_int_t      step)
+                          gmx_int64_t          step)
 {
     gmx_bool     OK;
     pme_setup_t *set;
index 35b80c96867b17795b9570ccc8540261e952225e..f2b9f0152b8b01879869bad34afb0ca717a387dd 100644 (file)
@@ -66,7 +66,7 @@ gmx_bool pme_load_balance(pme_load_balancing_t pme_lb,
                           interaction_const_t *ic,
                           nonbonded_verlet_t  *nbv,
                           gmx_pme_t           *pmedata,
-                          gmx_large_int_t      step);
+                          gmx_int64_t          step);
 
 /* Restart the PME load balancing discarding all timings gathered up till now */
 void restart_pme_loadbal(pme_load_balancing_t pme_lb, int n);
index f124697d0578a7001c125b83686126f26e3a9c65..0b954a8b5de494372c411eb09ee138151146b772 100644 (file)
@@ -889,7 +889,7 @@ test_for_replica_exchange(FILE                 *fplog,
                           struct gmx_repl_ex   *re,
                           gmx_enerdata_t       *enerd,
                           real                  vol,
-                          gmx_large_int_t       step,
+                          gmx_int64_t           step,
                           real                  time)
 {
     int       m, i, j, a, b, ap, bp, i0, i1, tmp;
@@ -903,7 +903,7 @@ test_for_replica_exchange(FILE                 *fplog,
     gmx_bool  bVol     = FALSE;
 
     bMultiEx = (re->nex > 1);  /* multiple exchanges at each state */
-    fprintf(fplog, "Replica exchange at step " gmx_large_int_pfmt " time %g\n", step, time);
+    fprintf(fplog, "Replica exchange at step " "%"GMX_PRId64 " time %g\n", step, time);
 
     if (re->bNPT)
     {
@@ -1294,7 +1294,7 @@ prepare_to_do_exchange(FILE      *fplog,
 
 gmx_bool replica_exchange(FILE *fplog, const t_commrec *cr, struct gmx_repl_ex *re,
                           t_state *state, gmx_enerdata_t *enerd,
-                          t_state *state_local, gmx_large_int_t step, real time)
+                          t_state *state_local, gmx_int64_t step, real time)
 {
     int i, j;
     int replica_id = 0;
index 20cad21c8e7cc3119323e13973b403c1de79cb70..e8d718dfbe1321c035d93695ac61143c4b04ab0d 100644 (file)
@@ -56,7 +56,7 @@ extern gmx_bool replica_exchange(FILE *fplog,
                                  gmx_repl_ex_t re,
                                  t_state *state, gmx_enerdata_t *enerd,
                                  t_state *state_local,
-                                 gmx_large_int_t step, real time);
+                                 gmx_int64_t step, real time);
 /* Attempts replica exchange, should be called on all nodes.
  * Returns TRUE if this state has been exchanged.
  * When running each replica in parallel,
index cb094bb6925be3ead340a65a082194695f690cee..45754b4f4316e7482063a77f6aa0bd12bdfe30ae 100644 (file)
@@ -102,7 +102,7 @@ typedef struct {
 /* The array should match the eI array in include/types/enums.h */
 const gmx_intp_t    integrator[eiNR] = { {do_md}, {do_steep}, {do_cg}, {do_md}, {do_md}, {do_nm}, {do_lbfgs}, {do_tpi}, {do_tpi}, {do_md}, {do_md}, {do_md}};
 
-gmx_large_int_t     deform_init_init_step_tpx;
+gmx_int64_t         deform_init_init_step_tpx;
 matrix              deform_init_box_tpx;
 tMPI_Thread_mutex_t deform_init_box_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
 
@@ -130,7 +130,7 @@ struct mdrunner_arglist
     const char     *ddcsz;
     const char     *nbpu_opt;
     int             nstlist_cmdline;
-    gmx_large_int_t nsteps_cmdline;
+    gmx_int64_t     nsteps_cmdline;
     int             nstepout;
     int             resetstep;
     int             nmultisim;
@@ -192,7 +192,7 @@ static t_commrec *mdrunner_start_threads(gmx_hw_opt_t *hw_opt,
                                          const char *dddlb_opt, real dlb_scale,
                                          const char *ddcsx, const char *ddcsy, const char *ddcsz,
                                          const char *nbpu_opt, int nstlist_cmdline,
-                                         gmx_large_int_t nsteps_cmdline,
+                                         gmx_int64_t nsteps_cmdline,
                                          int nstepout, int resetstep,
                                          int nmultisim, int repl_ex_nst, int repl_ex_nex, int repl_ex_seed,
                                          real pforce, real cpt_period, real max_hours,
@@ -215,40 +215,40 @@ static t_commrec *mdrunner_start_threads(gmx_hw_opt_t *hw_opt,
 
     /* fill the data structure to pass as void pointer to thread start fn */
     /* hw_opt contains pointers, which should all be NULL at this stage */
-    mda->hw_opt         = *hw_opt;
-    mda->fplog          = fplog;
-    mda->cr             = cr;
-    mda->nfile          = nfile;
-    mda->fnm            = fnmn;
-    mda->oenv           = oenv;
-    mda->bVerbose       = bVerbose;
-    mda->bCompact       = bCompact;
-    mda->nstglobalcomm  = nstglobalcomm;
-    mda->ddxyz[XX]      = ddxyz[XX];
-    mda->ddxyz[YY]      = ddxyz[YY];
-    mda->ddxyz[ZZ]      = ddxyz[ZZ];
-    mda->dd_node_order  = dd_node_order;
-    mda->rdd            = rdd;
-    mda->rconstr        = rconstr;
-    mda->dddlb_opt      = dddlb_opt;
-    mda->dlb_scale      = dlb_scale;
-    mda->ddcsx          = ddcsx;
-    mda->ddcsy          = ddcsy;
-    mda->ddcsz          = ddcsz;
-    mda->nbpu_opt       = nbpu_opt;
-    mda->nstlist_cmdline= nstlist_cmdline;
-    mda->nsteps_cmdline = nsteps_cmdline;
-    mda->nstepout       = nstepout;
-    mda->resetstep      = resetstep;
-    mda->nmultisim      = nmultisim;
-    mda->repl_ex_nst    = repl_ex_nst;
-    mda->repl_ex_nex    = repl_ex_nex;
-    mda->repl_ex_seed   = repl_ex_seed;
-    mda->pforce         = pforce;
-    mda->cpt_period     = cpt_period;
-    mda->max_hours      = max_hours;
-    mda->deviceOptions  = deviceOptions;
-    mda->Flags          = Flags;
+    mda->hw_opt          = *hw_opt;
+    mda->fplog           = fplog;
+    mda->cr              = cr;
+    mda->nfile           = nfile;
+    mda->fnm             = fnmn;
+    mda->oenv            = oenv;
+    mda->bVerbose        = bVerbose;
+    mda->bCompact        = bCompact;
+    mda->nstglobalcomm   = nstglobalcomm;
+    mda->ddxyz[XX]       = ddxyz[XX];
+    mda->ddxyz[YY]       = ddxyz[YY];
+    mda->ddxyz[ZZ]       = ddxyz[ZZ];
+    mda->dd_node_order   = dd_node_order;
+    mda->rdd             = rdd;
+    mda->rconstr         = rconstr;
+    mda->dddlb_opt       = dddlb_opt;
+    mda->dlb_scale       = dlb_scale;
+    mda->ddcsx           = ddcsx;
+    mda->ddcsy           = ddcsy;
+    mda->ddcsz           = ddcsz;
+    mda->nbpu_opt        = nbpu_opt;
+    mda->nstlist_cmdline = nstlist_cmdline;
+    mda->nsteps_cmdline  = nsteps_cmdline;
+    mda->nstepout        = nstepout;
+    mda->resetstep       = resetstep;
+    mda->nmultisim       = nmultisim;
+    mda->repl_ex_nst     = repl_ex_nst;
+    mda->repl_ex_nex     = repl_ex_nex;
+    mda->repl_ex_seed    = repl_ex_seed;
+    mda->pforce          = pforce;
+    mda->cpt_period      = cpt_period;
+    mda->max_hours       = max_hours;
+    mda->deviceOptions   = deviceOptions;
+    mda->Flags           = Flags;
 
     /* now spawn new threads that start mdrunner_start_fn(), while
        the main thread returns, we set thread affinity later */
@@ -474,7 +474,7 @@ static int get_nthreads_mpi(const gmx_hw_info_t *hwinfo,
  */
 static const int    nbnxn_reference_nstlist = 10;
 /* The values to try when switching  */
-const int nstlist_try[] = { 20, 25, 40 };
+const int           nstlist_try[] = { 20, 25, 40 };
 #define NNSTL  sizeof(nstlist_try)/sizeof(nstlist_try[0])
 /* Increase nstlist until the non-bonded cost increases more than listfac_ok,
  * but never more than listfac_max.
@@ -793,7 +793,7 @@ static void convert_to_verlet_scheme(FILE *fplog,
     }
     else
     {
-        ir->verletbuf_tol = -1;
+        ir->verletbuf_tol   = -1;
         ir->rlist           = 1.05*max(ir->rvdw, ir->rcoulomb);
     }
 
@@ -957,7 +957,7 @@ static void check_and_update_hw_opt_2(gmx_hw_opt_t *hw_opt,
 
 /* Override the value in inputrec with value passed on the command line (if any) */
 static void override_nsteps_cmdline(FILE            *fplog,
-                                    gmx_large_int_t  nsteps_cmdline,
+                                    gmx_int64_t      nsteps_cmdline,
                                     t_inputrec      *ir,
                                     const t_commrec *cr)
 {
@@ -1038,7 +1038,7 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
              const char *dddlb_opt, real dlb_scale,
              const char *ddcsx, const char *ddcsy, const char *ddcsz,
              const char *nbpu_opt, int nstlist_cmdline,
-             gmx_large_int_t nsteps_cmdline, int nstepout, int resetstep,
+             gmx_int64_t nsteps_cmdline, int nstepout, int resetstep,
              int gmx_unused nmultisim, int repl_ex_nst, int repl_ex_nex,
              int repl_ex_seed, real pforce, real cpt_period, real max_hours,
              const char *deviceOptions, unsigned long Flags)
@@ -1068,7 +1068,7 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
     int                       list;
     gmx_walltime_accounting_t walltime_accounting = NULL;
     int                       rc;
-    gmx_large_int_t           reset_counters;
+    gmx_int64_t               reset_counters;
     gmx_edsam_t               ed           = NULL;
     t_commrec                *cr_old       = cr;
     int                       nthreads_pme = 1;