Skip to content

Commit

Permalink
- Moved LogLevelLatch from lib/app.h into lib/exception.h
Browse files Browse the repository at this point in the history
- modified mrconvert and get_DW_scheme() to prevent error messages about
  missing gradient encoding files.

- initial work on turning error reporting functions (currently declared inline)
  into macros (for performance reasons). To avoid conflicts with other
  dependencies, these functions will have to be renamed as follows:
      console => CONSOLE
      error   => ERROR
      warning => WARN
      inform  => INFO
      debug   => DEBUG

- simplified dwi2tensor 

- new Math::check_gradient() function to help debug cost functions.

- changes to build and configure to prevent lock-ups when the output of
  commands is too long to fit into buffers
  • Loading branch information
jdtournier committed Aug 2, 2012
1 parent 42c65c6 commit ad8f230
Show file tree
Hide file tree
Showing 12 changed files with 384 additions and 442 deletions.
15 changes: 7 additions & 8 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,14 @@ def execute (message, cmd):

try:
process = subprocess.Popen (cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if process.wait() != 0:
disp ('\nERROR: ' + message + '\n\n' + ' '.join(cmd) + '\n\nfailed with output\n\n' + process.stderr.read())
( stdout, stderr ) = process.communicate()
if process.returncode != 0:
disp ('\nERROR: ' + message + '\n\n' + ' '.join(cmd) + '\n\nfailed with output\n\n' + stderr)
return 1
out = process.stdout.read()
if len(out):
disp ('STDOUT: ' + message + '\n' + out)
out = process.stderr.read()
if len(out):
disp ('STDERR: ' + message + '\n' + out)
if len(stdout):
disp ('STDOUT: ' + message + '\n' + stdout)
if len(stderr):
disp ('STDERR: ' + message + '\n' + stderr)

except OSError:
disp (cmd[0] + ': command not found')
Expand Down
Loading

0 comments on commit ad8f230

Please sign in to comment.