Fix malformed CUDA version macro check
[alexxy/gromacs.git] / include / mpelogging.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
4  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5  * Copyright (c) 2001-2008, The GROMACS development team,
6  * check out http://www.gromacs.org for more information.
7  * Copyright (c) 2012,2013, by the GROMACS development team, led by
8  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9  * others, as listed in the AUTHORS file in the top-level source
10  * directory and at http://www.gromacs.org.
11  *
12  * GROMACS is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public License
14  * as published by the Free Software Foundation; either version 2.1
15  * of the License, or (at your option) any later version.
16  *
17  * GROMACS is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with GROMACS; if not, see
24  * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
26  *
27  * If you want to redistribute modifications to GROMACS, please
28  * consider that scientific software is very special. Version
29  * control is crucial - bugs must be traceable. We will be happy to
30  * consider code for inclusion in the official distribution, but
31  * derived work must not be called official GROMACS. Details are found
32  * in the README & COPYING files - if they are missing, get the
33  * official version at http://www.gromacs.org.
34  *
35  * To help us fund GROMACS development, we humbly ask that you cite
36  * the research papers on the package. Check out http://www.gromacs.org.
37  */
38
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 /* define USE_MPE if you want MPE logging
45  *
46  * you then need to link with the appropriate libraries
47  * that come with the mpich distribution (can be found in the
48  * mpe subdirectory */
49 /* #define USE_MPE */
50
51 /* define BARRIERS if you want to have extra MPI_Barriers
52  * in the code which might help analyzing the MPE logfiles
53  */
54 /* #define BARRIERS */
55 #ifdef BARRIERS
56 #define GMX_BARRIER(communicator) MPI_Barrier(communicator)
57 #else
58 #define GMX_BARRIER(communicator)
59 #endif
60
61 #ifdef USE_MPE
62 #define GMX_MPE_LOG(event) MPE_Log_event(event, 0, "")
63 #else
64 #define GMX_MPE_LOG(event)
65 #endif
66
67 #ifdef USE_MPE
68 #include <mpe.h>
69 /* Define MPE logging events here */
70 /* General events */
71 int ev_timestep1,               ev_timestep2;
72 int ev_ns_start,                ev_ns_finish;
73 int ev_calc_bonds_start,        ev_calc_bonds_finish;
74 int ev_send_coordinates_start,  ev_send_coordinates_finish;
75 int ev_update_fr_start,         ev_update_fr_finish;
76 int ev_clear_rvecs_start,       ev_clear_rvecs_finish;
77 int ev_output_start,            ev_output_finish;
78 int ev_update_start,            ev_update_finish;
79 int ev_force_start,             ev_force_finish;
80 int ev_do_fnbf_start,           ev_do_fnbf_finish;
81
82 /* Shift related events*/
83 int ev_shift_start,             ev_shift_finish;
84 int ev_unshift_start,           ev_unshift_finish;
85 int ev_mk_mshift_start,         ev_mk_mshift_finish;
86
87 /* PME related events */
88 int ev_pme_start,               ev_pme_finish;
89 int ev_spread_on_grid_start,    ev_spread_on_grid_finish;
90 int ev_sum_qgrid_start,         ev_sum_qgrid_finish;
91 int ev_gmxfft3d_start,          ev_gmxfft3d_finish;
92 int ev_solve_pme_start,         ev_solve_pme_finish;
93 int ev_gather_f_bsplines_start, ev_gather_f_bsplines_finish;
94 int ev_reduce_start,            ev_reduce_finish;
95 int ev_rscatter_start,          ev_rscatter_finish;
96 int ev_alltoall_start,          ev_alltoall_finish;
97 int ev_pmeredist_start,         ev_pmeredist_finish;
98 int ev_init_pme_start,          ev_init_pme_finish;
99 int ev_global_stat_start,       ev_global_stat_finish;
100 int ev_sum_lrforces_start,      ev_sum_lrforces_finish;
101 int ev_virial_start,            ev_virial_finish;
102 int ev_sort_start,              ev_sort_finish;
103 int ev_sum_qgrid_start,         ev_sum_qgrid_finish;
104
105 /* Essential dynamics related events */
106 int ev_edsam_start,             ev_edsam_finish;
107 int ev_get_group_x_start,       ev_get_group_x_finish;
108 int ev_ed_apply_cons_start,     ev_ed_apply_cons_finish;
109 int ev_fit_to_reference_start,  ev_fit_to_reference_finish;
110 #endif
111
112 #ifdef __cplusplus
113 }
114 #endif