Fix small bug

This commit is contained in:
Cory Balaton 2023-12-07 16:34:27 +01:00
parent 5eff0b0d37
commit 77bc7a8a7a
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B

View File

@ -23,7 +23,7 @@ void usage(std::string filename)
{
std::cout << "Usage: " << filename
<< " <temperature> <lattice size> "
"<cycles> <burn-in-time> <output file>\n\n"
"<cycles> <burn-in-time> <output file> <ordered? (1|0)>\n\n"
<< "\t[ -h | --help ]\n";
exit(-1);
}
@ -57,17 +57,11 @@ int main(int argc, char **argv)
usage(argv[0]);
}
}
// Check that the number of arguments is at least 6.
if (argc < 6) {
// Check that the number of arguments is at least 7.
if (argc < 7) {
usage(argv[0]);
}
bool ordered = false;
if (argc == 7) {
ordered = true;
}
// Timing variables
double t0, t1;
t0 = omp_get_wtime();
@ -77,6 +71,8 @@ int main(int argc, char **argv)
int L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]);
std::string outfile = argv[5];
bool ordered = atoi(argv[6]) == 1 ? true : false;
if (ordered) {
DEBUG("Hello");
montecarlo::progression(temp, L, cycles, 1, outfile, burn_in_time);