1 /*****************************************************************************
2  *                                                                           *
3  * Copyright (c) 2003-2006 Intel Corporation.                                *
4  * All rights reserved.                                                      *
5  *                                                                           *
6  *****************************************************************************
7 
8 This code is covered by the Community Source License (CPL), version
9 1.0 as published by IBM and reproduced in the file "license.txt" in the
10 "license" subdirectory. Redistribution in source and binary form, with
11 or without modification, is permitted ONLY within the regulations
12 contained in above mentioned license.
13 
14 Use of the name and trademark "Intel(R) MPI Benchmarks" is allowed ONLY
15 within the regulations of the "License for Use of "Intel(R) MPI
16 Benchmarks" Name and Trademark" as reproduced in the file
17 "use-of-trademark-license.txt" in the "license" subdirectory.
18 
19 THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
20 CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
21 LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
22 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
23 solely responsible for determining the appropriateness of using and
24 distributing the Program and assumes all risks associated with its
25 exercise of rights under this Agreement, including but not limited to
26 the risks and costs of program errors, compliance with applicable
27 laws, damage to or loss of data, programs or equipment, and
28 unavailability or interruption of operations.
29 
30 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
31 ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
32 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
33 WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
34 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
36 DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
37 HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
38 
39 EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
40 YOUR JURISDICTION. It is licensee's responsibility to comply with any
41 export regulations applicable in licensee's jurisdiction. Under
42 CURRENT U.S. export regulations this software is eligible for export
43 from the U.S. and can be downloaded by or otherwise exported or
44 reexported worldwide EXCEPT to U.S.  embargoed destinations which
45 include Cuba, Iraq, Libya, North Korea, Iran, Syria, Sudan,
46 Afghanistan and any other country to which the U.S. has embargoed
47 goods and services.
48 
49  ***************************************************************************
50 
51 For more documentation than found here, see
52 
53 [1] doc/ReadMe_IMB.txt
54 
55 [2] Intel (R) MPI Benchmarks
56     Users Guide and Methodology Description
57     In
58     doc/IMB_ug.pdf
59 
60  File: IMB_declare.c
61 
62  Implemented functions:
63 
64  ***************************************************************************/
65 
66 
67 
68 
69 
70 #include <mpi.h>
71 #include <math.h>
72 #include <stdio.h>
73 #include <stddef.h>
74 #include "IMB_settings.h"
75 #include "IMB_comm_info.h"
76 #include "IMB_err_check.h"
77 
78 
79 #ifdef CHECK
80 
81 #include "IMB_prototypes.h"
82 
83 long   r_check,s_check;
84 double defect;
85 double *all_defect;
86 
87 #endif
88 
89 FILE* dbg_file;
90 char* dbgf_name;
91 
92 double *all_times;
93 
94 /*  STRINGS FOR OUTPUT   */
95 char aux_string[out_fields*ow_format];
96 
97 /* FORMAT FOR OUTPUT    */
98 char format [out_fields*7];
99 
100 /* ARRAY OF CASES, EITHER DEFAULT OR ARGUMENT LIST */
101 char **cases ;
102 
103 /* Error status  */
104 
105 int err_flag;
106 
107 /* I/O unit */
108 FILE* unit;
109 
110 /* MAXIMAL MESSAGE LENGTH    */
111 int MAXMSG;
112 
113 void * AUX;
114 int AUX_LEN=0;
115 
116 int    do_nonblocking=0;
117 double tCPU = 0.;    /* CPU time for overlap benchmarks */
118 double MFlops = -1.;
119 
120 int mpi_thread_environment = MPI_THREAD_SINGLE;
121