1 /* 2 * Copyright (c) 2010-2011, Siberian State University of Telecommunications 3 * and Information Sciences. All rights reserved. 4 * Copyright (c) 2010-2011, A.V. Rzhanov Institute of Semiconductor Physics SB RAS. 5 * All rights reserved. 6 * 7 * mpigclock.h: MPI clock synchronization. 8 * http://mpiperf.cpct.sibsutis.ru/index.php 9 * 10 * Copyright (C) 2011 Mikhail Kurnosov <mkurnosov@gmail.com> 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions are met: 14 * Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 17 * Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. 20 * 21 * Neither the name of the the copyright holders nor the 22 * names of its contributors may be used to endorse or promote products 23 * derived from this software without specific prior written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 27 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY 29 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 32 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 * 36 * $COPYRIGHT$ 37 * 38 * Additional copyrights may follow 39 * 40 * $HEADER$ 41 */ 42 43 #ifndef MPIGCLOCK_H 44 #define MPIGCLOCK_H 45 46 #include <stdio.h> 47 #include "hpctimer.h" 48 49 #define INVALIDTIME -1.0 50 #define MPIGCLOCK_RTTMIN_NOTCHANGED_MAX 100 51 #define MPIGCLOCK_MSGTAG 128 52 53 /* mpigclock_measure_offset_adaptive: Measures clock's offset of peer. */ 54 double mpigclock_sync_linear(MPI_Comm comm, int root, double *rtt); 55 double mpigclock_sync_log(MPI_Comm comm, int root, double *rtt); 56 57 #endif