From: hackbard Date: Fri, 16 May 2008 08:44:30 +0000 (+0200) Subject: correction of fatal errors! X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=98f5c05d17d1077aaca379e755bf36f5d8f61776;p=physik%2Fposic.git correction of fatal errors! --- diff --git a/mdrun.c b/mdrun.c index d99bd7a..29d3160 100644 --- a/mdrun.c +++ b/mdrun.c @@ -879,10 +879,18 @@ int main(int argc,char **argv) { /* prepare simulation */ - moldyn_init(&moldyn,argc,argv); - - if(mdrun.continue_file) + if(mdrun.continue_file[0]) { + // read the save file moldyn_read_save_file(&moldyn,mdrun.continue_file); + // manualaadjusting some stuff + moldyn.argc=argc; + moldyn.args=argv; + rand_init(&(moldyn.random),NULL,1); + moldyn.random.status|=RAND_STAT_VERBOSE; + } + else { + moldyn_init(&moldyn,argc,argv); + } if(set_int_alg(&moldyn,mdrun.intalgo)<0) return -1; @@ -915,7 +923,7 @@ int main(int argc,char **argv) { } /* if it is a continue run, reset schedule and skip lattice init */ - if(mdrun.continue_file) { + if(mdrun.continue_file[0]) { memset(&(moldyn.schedule),0,sizeof(t_moldyn_schedule)); goto addsched; }