On Tue, 4 Nov, 2014 at 11:40 AM, Jan Blechta
<[email protected]> wrote:
On Tue, 4 Nov 2014 12:06:43 +0100
Johan Hake <[email protected]> wrote:
On Tue, Nov 4, 2014 at 12:02 PM, Garth N. Wells <[email protected]>
wrote:
>
> On Tue, 4 Nov, 2014 at 10:49 AM, Johan Hake <[email protected]>
> wrote:
>
>> Hello!
>>
>> With the exposure of the MPI_COMM we no longer have MPI aware
>> logging system. It would be nice to get that back again. We
>> probably have had this discussion previously but it would be nice
>> to reiterate it here.
>>
>
> I made a start on this a while back, but got stuck in the ellipses
> syntax that caused me some problems when overloading the logging
> functions.
>
>
>> I suggest that we make it possible to set an MPI_COMM to the main
>> Logger, so that we keep the interface to all log functions as is.
>>
>> void set_log_mpi_comm(MPI_COMM comm);
>>
>
> We should pass the communicator to the log functions.
Because attaching a communicator to the Logger is evil or just
bad/sub-optimal design?
Agree with Garth. I don't think that it is correct for process not
belonging to communicator to use this communicator and moreover that
there is any function in MPI for testing whether process belongs to
comm. Maybe I'm wrong - how would you do this?
What makes sense to me is to look at rank for given comm (which must
make sense and therefore must be passed by any object with a
particular
comm; otherwise COMM_WORLD is used) and compare that rank to a
logging behaviour required.
Exactly - there can be more than one communicator in a program.
Jan
Then we use the MPI_COMM of the Logger to determine what process the
log
>> message should be visible on. By default it is set by
>> MPI_COMM_WORLD.
>>
>> I am also not happy with the parameter name:
>>
>> "std_out_all_processes"
>>
>> I think it is more useful to explicitly use:
>>
>> "std_out_rank_0" : False/True
>>
>> or
>>
>> "std_out_rank" : -1/0/...
>>
>> Where the latter means that one can define what rank std out
>> should be active on, and the former means that if True, we only
>> display std out on rank 0.
>>
>> What ya think?
>>
>
> Agree that the present name is not great.
>
But no other suggestions?
I like both your suggested names.
There is a problem however going through the parameter system - we
don't want to do a parameter look up every time a logging function is
called.
Maybe dolfin::Variable should have a logging function?
Garth
Johan
> Garth
>
>
>> Johan
>>
>
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics