From: Regina Kleinhappel Date: Fri, 5 Dec 2014 01:02:07 +0000 (+0100) Subject: Added startconfig option. X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/b13049b02df74e31a311cf41eb0c61f1898ce77e Added startconfig option. --- diff --git a/o815/o815.cpp b/o815/o815.cpp index c559281..73e3497 100644 --- a/o815/o815.cpp +++ b/o815/o815.cpp @@ -27,7 +27,8 @@ o815::o815(int argc, char **argv, const string& _programid, comoption specOps[], comargs.outdir=""; comargs.idonly = false; comargs.showjobnum = false; - + comargs.startconfig = ""; + #ifndef MPI_DISABLED MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); @@ -37,16 +38,17 @@ o815::o815(int argc, char **argv, const string& _programid, comoption specOps[], rank = 0; #endif - addComOption("lsize", required_argument, NULL, 'L', "define lattice size", "xsize:tsize"); - addComOption("nmeas", required_argument, NULL, 'N', "set number of measurements", "nmeas"); - addComOption("skip", required_argument, NULL, 'S', "set number of skips between configs", "nskip"); - addComOption("nequi", required_argument, NULL, 'E', "set number of equilibrations", "nequi"); - addComOption("ocache", required_argument, NULL, 'O', "set observable cache (mode=oo|ro|wo|rw)", "dir:mode"); - addComOption("ccache", required_argument, NULL, 'C', "set config cache (mode=oo|ro|wo|rw)", "dir:mode"); - addComOption("write", required_argument, NULL, 'W', "data writeout directory", "dir"); - addComOption("idonly", no_argument, &comargs.idonly, 'I', "show output-id only", ""); - addComOption("jobnum", no_argument, &comargs.showjobnum, 'J', "show jobnumber only", ""); - + addComOption("lsize", required_argument, NULL, 'L', "define lattice size", "xsize:tsize"); + addComOption("nmeas", required_argument, NULL, 'N', "set number of measurements", "nmeas"); + addComOption("skip", required_argument, NULL, 'S', "set number of skips between configs", "nskip"); + addComOption("nequi", required_argument, NULL, 'E', "set number of equilibrations", "nequi"); + addComOption("ocache", required_argument, NULL, 'O', "set observable cache (mode=oo|ro|wo|rw)", "dir:mode"); + addComOption("ccache", required_argument, NULL, 'C', "set config cache (mode=oo|ro|wo|rw)", "dir:mode"); + addComOption("write", required_argument, NULL, 'W', "data writeout directory", "dir"); + addComOption("idonly", no_argument, &comargs.idonly, 'I', "show output-id only", ""); + addComOption("jobnum", no_argument, &comargs.showjobnum, 'J', "show jobnumber only", ""); + addComOption("startconfig", required_argument, NULL, 'X', "read start config from file", "startconfigfile"); + vector::iterator lastO815Opt = comOptions.end()-1; if (specOps != NULL) @@ -236,6 +238,9 @@ void o815::parseArgs(int argc, char **argv, comoption specOps[]) { case 'W': comargs.outdir = optarg; break; + case 'X': + comargs.startconfig = optarg; + break; default: if ( opt != 0) { comoption* thisop = getOptionByVal(opt); diff --git a/o815/o815.h b/o815/o815.h index d3e5a21..5873a14 100644 --- a/o815/o815.h +++ b/o815/o815.h @@ -64,6 +64,7 @@ class o815 { string outdir; int idonly; int showjobnum; + string startconfig; } comargs; struct comoption {