jsspencer / testcode Goto Github PK
View Code? Open in Web Editor NEWtestcode is a python module for testing for regression errors in numerical (principally scientific) software.
License: Other
testcode is a python module for testing for regression errors in numerical (principally scientific) software.
License: Other
We've a situation where we'd like to customise launch_parallel, and pass an extra argument to it in some cases.
The default is
launch_parallel = 'mpirun -np tc.nprocs'
but for various configs we'd like to have e.g.
launch_parallel='mpirun -np tc.nprocs --my-other-option'
or
launch_parallel='mpirun -np tc.nprocs --my-special-option'
Would it be possible to have a variable like
launch_parallel_template='mpirun -np tc.nprocs'
(which is a thing we might customise depending on the MPI implementation)
and then in the individual configs
launch_parallel='tc.launch_parallel_template --my-other-option'
or
launch_parallel='tc.launch_parallel_template --my-special-option'
I have the weird problem that the Quantum ESPRESSO testsuite (which uses testcode2 with --verbose) does not print out anything until the main testcode2.py program has finished, at which point the whole output is flushed.
This only happens when building Debian packages with sbuild, as is done on their (and Ubuntu's I believe) autobuilder network.
A solution is to add sys.stdout.flush()
at the end of the for-loop in __init__.py:295
:
--- ./test-suite/testcode/lib/testcode2/__init__.py.orig 2016-09-23 18:59:05.099035651 +0200
+++ ./test-suite/testcode/lib/testcode2/__init__.py 2016-09-23 18:59:49.855034136 +0200
@@ -302,6 +302,7 @@
raise exceptions.RunError(err[0])
else:
self.verify_job(test_input, test_arg, verbose, rundir)
+ sys.stdout.flush()
except exceptions.RunError:
err = sys.exc_info()[1]
if verbose > 2:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.