[gmx-developers] output_env_t questions and extensions

Sander Pronk pronk at cbr.su.se
Mon Jan 25 11:55:25 CET 2010


Hi David,

I introduced that data structure as one of the first thread-safety fixes, and those names are indeed a bit obscure - I've committed a fix with the names prefixed by the class name. I like the idea of putting verbosity and debug level in there - I've added some more support for it.

I'm not so sure about privatizing the initializer (there may be legitimate uses outside of statutil.c) but that may be a C++ bias of mine.

I originally didn't put the program_name and cmd_line variables in the data structure (but suggested it with those commented lines) because these are inherently global pieces of information, and the current gromacs tools use these in many places where the oenv variable is not propagated. I've now added the possibility to get that information through the oenv structure. 

Sander



On Jan 20, 2010, at 08:56 , David van der Spoel wrote:

> Hi,
> 
> I wonder
> 
> whether the init_output_env and set_output_env routines could not be made static, and furthermore whether we should not make the exported routine names more specific,e.g.
> 
> output_env_get_view(oenv) instead of get_view
> output_env_get_print_xvgr_codes(oenv) instead of get_print_xvgr_codes
> 
> Or is this all going to be wrapped up when we transition to C++?
> 
> Furthermore I would like to add a generic verbosity level (integer) to all programs that is stored in the oenv and accessed with a routine
> output_env_verbosity(oenv). The debug level could also be stored here in the same manner.
> 
> Furthermore I wonder why this stuff is outcommented? It would allow to get rid of some more global variables, right?
> #if 0
>    const char *program; /* the program name */
>    char *cmdline; /* the re-assembled command line */
> #endif
> 
> Cheers,
> -- 
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205. Fax: +4618511755.
> spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se
> -- 
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-developers-request at gromacs.org.




More information about the gromacs.org_gmx-developers mailing list