Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code diagnostics should be atomic per thread #63

Open
alecjohnson opened this issue Mar 7, 2014 · 0 comments
Open

code diagnostics should be atomic per thread #63

alecjohnson opened this issue Mar 7, 2014 · 0 comments

Comments

@alecjohnson
Copy link
Contributor

This is about code diagnostics fixes that I want to be merged into the main code.

error, debug, and warning messages available by including

  debug.h
  errors.h
  asserts.h

were not implemented in an atomic manner. As a consequence, output from code diagnostic messages from multiple processes is often interleaved, making it difficult to determine what output is coming from what thread.

I am fixing this by first writing the message to a string and then printing the string to standard output with a single call to fprintf.

Note that I have also changed the output format so that messages indicate process and thread number when appropriate.

alecjohnson added a commit to alecjohnson/iPic3D that referenced this issue Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant