Skip to content

Commit

Permalink
Merge pull request #1757 from willend/main
Browse files Browse the repository at this point in the history
Strip off arguments not understood by mcdisplay-mantid
  • Loading branch information
willend authored Nov 5, 2024
2 parents df3662a + f9802e7 commit 9eca046
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions tools/Python/mcrun/mccode.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,25 @@ def runMPI(self, args, pipe=False, override_mpi=None):
if mccode_config.configuration["MCCODE"] == 'mcstas' and not self.options.info:
if self.options.format.lower() == 'nexus' and self.options.IDF:
idfargs=[]
# Strip off args not understood by the IDF generator
for arg in args:
if '--trace' in arg:
idfargs.append('--trace=1')
elif '--ncount' in arg:
idfargs.append('--ncount=0')
# do nothing
1
elif '--format' in arg:
# do nothing
1
elif '--dir' in arg:
# do nothing
1
elif '--bufsiz' in arg:
# do nothing
1
else:
idfargs.append(arg)

print("Spawning IDF generator:")
print("mccode_config.configuration['IDFGEN'] + " " + self.path + " " + " ".join(idfargs))
Process(mccode_config.configuration['IDFGEN'] + " " + self.path).run(idfargs, pipe=pipe)
# Forward --IDF request to binary
args.append('--IDF')
Expand Down

0 comments on commit 9eca046

Please sign in to comment.