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

fix hanging processes when running in parallel #1075

Merged
merged 1 commit into from Jul 1, 2016

Conversation

bjs2
Copy link
Contributor

@bjs2 bjs2 commented Jul 1, 2016

  • fix a bug where processor 0 throws an exception and the other processor(s) remain stuck in a broadcast state
  • make processor 0 broadcast the error and then throw an exception
  • make the other processor(s) receive the error and throw an exception
  • if merged, resolves issue S40RTS error in parallel #984

MPI_Bcast(&filesize,1,MPI_UNSIGNED,0,comm);
AssertThrow (false,
ExcMessage (std::string("Could not open file <") + filename + ">."));
return data_string; // never reached
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this return?

@gassmoeller
Copy link
Member

Nice, thanks for fixing the bugs I introduced 😄
You need to run astyle, but after that, my minor comment, and if the tester is happy this is good to go.

@bjs2 bjs2 force-pushed the error_in_parallel branch 2 times, most recently from 1778062 to de7ad83 Compare July 1, 2016 05:02
@bjs2
Copy link
Contributor Author

bjs2 commented Jul 1, 2016

I hope I fixed what astyle was unhappy with. It is a bit confusing at times. As for the return statements, I think Timo put those as a "just in case," although they are not needed, since throwing an exception should exit the program anyway.

@gassmoeller
Copy link
Member

Ok, I am fine with either way. Just wanted to make sure somebody has thought about it 😄. Ready to merge when the tester is happy.

- fix a bug where processor 0 throws an exception and the other processor(s) remain stuck in a broadcast state
- make processor 0 broadcast the error and then throw an exception
- make the other processor(s) receive the error and throw an exception
@bjs2
Copy link
Contributor Author

bjs2 commented Jul 1, 2016

Sounds good. For some reason, gedit wasn't showing the tab spaces that were messing up the formatting. Weird...

@gassmoeller
Copy link
Member

/run-tests

@spco
Copy link
Contributor

spco commented Jul 1, 2016

@bjs2, if you're in the main directory for aspect, just call ./doc/indent and it will do all your astyle work for you!

@bjs2
Copy link
Contributor Author

bjs2 commented Jul 1, 2016

@spco "*** No astyle program found."

@gassmoeller
Copy link
Member

Then you should download and compile astyle 2.04, and create a link to the binary in a place where it is found (e.g. $HOME/bin if that is in your $PATH variable). Let one of us know if you need help with it. This PR is good to go.

@gassmoeller gassmoeller merged commit 4b557ca into geodynamics:master Jul 1, 2016
@bjs2
Copy link
Contributor Author

bjs2 commented Jul 1, 2016

Got it installed! :)

@bjs2 bjs2 deleted the error_in_parallel branch July 1, 2016 17:24
@bjs2 bjs2 mentioned this pull request Jul 1, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants