Skip to content

Commit 19b4425

Browse files
authored
Merge pull request #2010 from mccode-dev/add_trace0_also_without_--trace
This allows any compiled instrument to run with --trace=0
2 parents fa2375b + 5d525b1 commit 19b4425

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

common/lib/share/mccode-r.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4531,12 +4531,14 @@ mcenabletrace(int mode)
45314531
mcdotrace = mode;
45324532
#pragma acc update device ( mcdotrace )
45334533
} else {
4534-
fprintf(stderr,
4535-
"Error: trace not enabled (mcenabletrace)\n"
4536-
"Please re-run the " MCCODE_NAME " compiler "
4537-
"with the --trace option, or rerun the\n"
4538-
"C compiler with the MC_TRACE_ENABLED macro defined.\n");
4539-
exit(1);
4534+
if (mode>0) {
4535+
fprintf(stderr,
4536+
"Error: trace not enabled (mcenabletrace)\n"
4537+
"Please re-run the " MCCODE_NAME " compiler "
4538+
"with the --trace option, or rerun the\n"
4539+
"C compiler with the MC_TRACE_ENABLED macro defined.\n");
4540+
exit(1);
4541+
}
45404542
}
45414543
}
45424544

0 commit comments

Comments
 (0)