gmx_fatal(FARGS,"Checkpoint file corrupted/truncated, or maybe you are out of quota?");
}
-static void do_cpt_string_err(XDR *xd,bool bRead,const char *desc,char **s,FILE *list)
+static void do_cpt_string_err(XDR *xd,gmx_bool bRead,const char *desc,char **s,FILE *list)
{
#define CPTSTRLEN 1024
bool_t res=0;
return ret;
}
-static void do_cpt_header(XDR *xd,bool bRead,int *file_version,
+static void do_cpt_header(XDR *xd,gmx_bool bRead,int *file_version,
char **version,char **btime,char **buser,char **bmach,
char **fprog,char **ftime,
int *eIntegrator,int *simulation_part,
}
}
-static int do_cpt_footer(XDR *xd,bool bRead,int file_version)
+static int do_cpt_footer(XDR *xd,gmx_bool bRead,int file_version)
{
bool_t res=0;
int magic;
return 0;
}
-static int do_cpt_state(XDR *xd,bool bRead,
+static int do_cpt_state(XDR *xd,gmx_bool bRead,
int fflags,t_state *state,
- bool bReadRNG,FILE *list)
+ gmx_bool bReadRNG,FILE *list)
{
int sflags;
int **rng_p,**rngi_p;
return ret;
}
-static int do_cpt_ekinstate(XDR *xd,bool bRead,
+static int do_cpt_ekinstate(XDR *xd,gmx_bool bRead,
int fflags,ekinstate_t *ekins,
FILE *list)
{
}
-static int do_cpt_enerhist(XDR *xd,bool bRead,
+static int do_cpt_enerhist(XDR *xd,gmx_bool bRead,
int fflags,energyhistory_t *enerhist,
FILE *list)
{
return ret;
}
-static int do_cpt_files(XDR *xd, bool bRead,
+static int do_cpt_files(XDR *xd, gmx_bool bRead,
gmx_file_position_t **p_outputfiles, int *nfiles,
FILE *list, int file_version)
{
}
-void write_checkpoint(const char *fn,bool bNumberAndKeep,
+void write_checkpoint(const char *fn,gmx_bool bNumberAndKeep,
FILE *fplog,t_commrec *cr,
int eIntegrator,int simulation_part,
gmx_large_int_t step,double t,t_state *state)
}
}
-static void check_int(FILE *fplog,const char *type,int p,int f,bool *mm)
+static void check_int(FILE *fplog,const char *type,int p,int f,gmx_bool *mm)
{
FILE *fp = fplog ? fplog : stderr;
}
static void check_string(FILE *fplog,const char *type,const char *p,
- const char *f,bool *mm)
+ const char *f,gmx_bool *mm)
{
FILE *fp = fplog ? fplog : stderr;
static void check_match(FILE *fplog,
char *version,
char *btime,char *buser,char *bmach,char *fprog,
- t_commrec *cr,bool bPartDecomp,int npp_f,int npme_f,
+ t_commrec *cr,gmx_bool bPartDecomp,int npp_f,int npme_f,
ivec dd_nc,ivec dd_nc_f)
{
int npp;
- bool mm;
+ gmx_bool mm;
mm = FALSE;
}
static void read_checkpoint(const char *fn,FILE **pfplog,
- t_commrec *cr,bool bPartDecomp,ivec dd_nc,
+ t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc,
int eIntegrator,gmx_large_int_t *step,double *t,
- t_state *state,bool *bReadRNG,bool *bReadEkin,
- int *simulation_part,bool bAppendOutputFiles)
+ t_state *state,gmx_bool *bReadRNG,gmx_bool *bReadEkin,
+ int *simulation_part,gmx_bool bAppendOutputFiles)
{
t_fileio *fp;
int i,j,rc;
void load_checkpoint(const char *fn,FILE **fplog,
- t_commrec *cr,bool bPartDecomp,ivec dd_nc,
+ t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc,
t_inputrec *ir,t_state *state,
- bool *bReadRNG,bool *bReadEkin,bool bAppend)
+ gmx_bool *bReadRNG,gmx_bool *bReadEkin,gmx_bool bAppend)
{
gmx_large_int_t step;
double t;
static void read_checkpoint_data(t_fileio *fp,int *simulation_part,
gmx_large_int_t *step,double *t,t_state *state,
- bool bReadRNG,
+ gmx_bool bReadRNG,
int *nfiles,gmx_file_position_t **outputfiles)
{
int file_version;
fr->x = state.x;
state.x = NULL;
}
- fr->bV = (state.flags & (1<<estV));
+/* FIX ME after 4.5 */
+/* temporary hack because we are using gmx_bool (unsigned char) */
+ fr->bV = (state.flags & (1<<estV)) != 0;
if (fr->bV)
{
fr->v = state.v;
}
-static bool exist_output_file(const char *fnm_cp,int nfile,const t_filenm fnm[])
+static gmx_bool exist_output_file(const char *fnm_cp,int nfile,const t_filenm fnm[])
{
int i;
}
/* This routine cannot print tons of data, since it is called before the log file is opened. */
-bool read_checkpoint_simulation_part(const char *filename, int *simulation_part,
+gmx_bool read_checkpoint_simulation_part(const char *filename, int *simulation_part,
gmx_large_int_t *cpt_step,t_commrec *cr,
- bool bAppendReq,
+ gmx_bool bAppendReq,
int nfile,const t_filenm fnm[],
- const char *part_suffix,bool *bAddPart)
+ const char *part_suffix,gmx_bool *bAddPart)
{
t_fileio *fp;
gmx_large_int_t step=0;
int nfiles;
gmx_file_position_t *outputfiles;
int nexist,f;
- bool bAppend;
+ gmx_bool bAppend;
char *fn,suf_up[STRLEN];
bAppend = FALSE;