Merge branch 'master' of git@git.gromacs.org:gromacs
[alexxy/gromacs.git] / src / gromacs / legacyheaders / mpelogging.h
1 /*
2  * 
3  *                This source code is part of
4  * 
5  *                 G   R   O   M   A   C   S
6  * 
7  *          GROningen MAchine for Chemical Simulations
8  * 
9  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
10  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
11  * Copyright (c) 2001-2008, The GROMACS development team,
12  * check out http://www.gromacs.org for more information.
13  
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License
16  * as published by the Free Software Foundation; either version 2
17  * of the License, or (at your option) any later version.
18  * 
19  * If you want to redistribute modifications, please consider that
20  * scientific software is very special. Version control is crucial -
21  * bugs must be traceable. We will be happy to consider code for
22  * inclusion in the official distribution, but derived work must not
23  * be called official GROMACS. Details are found in the README & COPYING
24  * files - if they are missing, get the official version at www.gromacs.org.
25  * 
26  * To help us fund GROMACS development, we humbly ask that you cite
27  * the papers on the package - you can find them in the top README file.
28  * 
29  * For more info, check our website at http://www.gromacs.org
30  * 
31  * And Hey:
32  * Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
33  */
34
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /* define USE_MPE if you want MPE logging 
41  *
42  * you then need to link with the appropriate libraries
43  * that come with the mpich distribution (can be found in the
44  * mpe subdirectory */
45 /* #define USE_MPE */
46
47 /* define BARRIERS if you want to have extra MPI_Barriers
48  * in the code which might help analyzing the MPE logfiles 
49  */
50 /* #define BARRIERS */
51 #ifdef BARRIERS
52 #define GMX_BARRIER(communicator) MPI_Barrier(communicator)
53 #else
54 #define GMX_BARRIER(communicator)
55 #endif
56
57 #ifdef USE_MPE
58 #define GMX_MPE_LOG(event) MPE_Log_event(event, 0, "")
59 #else
60 #define GMX_MPE_LOG(event)
61 #endif
62
63 #ifdef USE_MPE
64 #include <mpe.h>
65      /* Define MPE logging events here */
66      /* General events */
67      int ev_timestep1,               ev_timestep2;
68      int ev_ns_start,                ev_ns_finish;
69      int ev_calc_bonds_start,        ev_calc_bonds_finish;
70      int ev_send_coordinates_start,  ev_send_coordinates_finish;
71      int ev_update_fr_start,         ev_update_fr_finish;
72      int ev_clear_rvecs_start,       ev_clear_rvecs_finish;
73      int ev_output_start,            ev_output_finish;
74      int ev_update_start,            ev_update_finish;     
75      int ev_force_start,             ev_force_finish;
76      int ev_do_fnbf_start,           ev_do_fnbf_finish;
77      int ev_test_start,              ev_test_finish;
78      
79      /* COM and enforced rotation pulling */
80      int ev_flexll_start,            ev_flexll_finish;
81      int ev_add_rot_forces_start,    ev_add_rot_forces_finish;
82      int ev_forcecycles_start,       ev_forcecycles_finish;
83      int ev_rotcycles_start,         ev_rotcycles_finish;
84      
85      /* Shift related events*/
86      int ev_shift_start,             ev_shift_finish;     
87      int ev_unshift_start,           ev_unshift_finish;     
88      int ev_mk_mshift_start,         ev_mk_mshift_finish;
89      
90      /* PME related events */
91      int ev_pme_start,               ev_pme_finish;
92      int ev_spread_on_grid_start,    ev_spread_on_grid_finish;
93      int ev_sum_qgrid_start,         ev_sum_qgrid_finish;
94      int ev_gmxfft3d_start,          ev_gmxfft3d_finish;
95      int ev_solve_pme_start,         ev_solve_pme_finish;
96      int ev_gather_f_bsplines_start, ev_gather_f_bsplines_finish;
97      int ev_reduce_start,            ev_reduce_finish;
98      int ev_rscatter_start,          ev_rscatter_finish;
99      int ev_alltoall_start,          ev_alltoall_finish;
100      int ev_pmeredist_start,         ev_pmeredist_finish;
101      int ev_init_pme_start,          ev_init_pme_finish;
102      int ev_global_stat_start,       ev_global_stat_finish;
103      int ev_sum_lrforces_start,      ev_sum_lrforces_finish;
104      int ev_virial_start,            ev_virial_finish;
105      int ev_sort_start,              ev_sort_finish;
106      int ev_sum_qgrid_start,         ev_sum_qgrid_finish;
107      
108      /* Essential dynamics related events */
109      int ev_edsam_start,             ev_edsam_finish;
110      int ev_get_group_x_start,       ev_get_group_x_finish;
111      int ev_ed_apply_cons_start,     ev_ed_apply_cons_finish;
112      int ev_fit_to_reference_start,  ev_fit_to_reference_finish;
113 #endif
114
115 #ifdef __cplusplus
116 }
117 #endif