From: John P. <pet...@cf...> - 2007-11-06 01:27:12
|
Roy Stogner writes: > On Mon, 5 Nov 2007, John Peterson wrote: > > > Do you just mean place a parallel_only() macro similar to what we > > have now for stop() in any function you are about to make parallel only? > > I don't think there's any sort of macro that can give us a useful > error message here, unless it's solve_the_halting_problem(). How do > you tell whether a function has been called in parallel or not? A necessary condition would be libMesh::n_processors() > 1. If you flag a function as parallel_only() and the above condition doesn't hold ... is that enough to be an error? But I guess you're worried about the case where you're in parallel, and *every* CPU must call the same function? Isn't there an MPI_Wait or something that does that? -John |