Scippy

UG

Ubiquity Generator framework

scipParaInitialStatMpi.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and software framework */
4 /* UG --- Ubquity Generator Framework */
5 /* */
6 /* Copyright Written by Yuji Shinano <shinano@zib.de>, */
7 /* Copyright (C) 2021 by Zuse Institute Berlin, */
8 /* licensed under LGPL version 3 or later. */
9 /* Commercial licenses are available through <licenses@zib.de> */
10 /* */
11 /* This code is free software; you can redistribute it and/or */
12 /* modify it under the terms of the GNU Lesser General Public License */
13 /* as published by the Free Software Foundation; either version 3 */
14 /* of the License, or (at your option) any later version. */
15 /* */
16 /* This program is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19 /* GNU Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public License */
22 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* */
24 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25 
26 /**@file scipParaInitialStatMpi.h
27  * @brief ScipParaInitialStat extension for MPI communication.
28  * @author Yuji Shinano
29  *
30  *
31  *
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 
37 #ifndef __SCIP_PARA_INITIAL_STAT_MPI_H__
38 #define __SCIP_PARA_INITIAL_STAT_MPI_H__
39 
40 #include <iostream>
41 #include "ug/paraCommMpi.h"
42 #include "scipParaTagDef.h"
43 #include "scipParaInitialStat.h"
44 #include "scip/scip.h"
45 
46 namespace ParaSCIP
47 {
48 
49 /** The initial statistic collecting data class: this is base class */
51 {
52  /** create ScipParaInitialStat datatype1*/
53  MPI_Datatype createDatatype1();
54  /** create ScipParaInitialStat datatype2 */
55  MPI_Datatype createDatatype2(bool memAllocNecessary);
56 
57 public:
58  /** default constructor */
60  )
61  {
62  }
63 
64  /** constructor for clone */
66  int inMaxDepth,
67  int inMaxTotalDepth,
68  int inNVarBranchStatsDown,
69  int inNVarBranchStatsUp,
70  int *inIdxLBranchStatsVarsDown,
71  int *inNVarBranchingDown,
72  int *inIdxLBranchStatsVarsUp,
73  int *inNVarBranchingUp,
74  SCIP_Real *inDownpscost,
75  SCIP_Real *inDownvsids,
76  SCIP_Real *inDownconflen,
77  SCIP_Real *inDowninfer,
78  SCIP_Real *inDowncutoff,
79  SCIP_Real *inUppscost,
80  SCIP_Real *inUpvsids,
81  SCIP_Real *inUpconflen,
82  SCIP_Real *inUpinfer,
83  SCIP_Real *inUpcutoff
84  )
85  {
86  maxDepth = inMaxDepth;
87  maxTotalDepth = inMaxTotalDepth;
88  nVarBranchStatsDown = inNVarBranchStatsDown;
89  nVarBranchStatsUp = inNVarBranchStatsUp;
90  idxLBranchStatsVarsDown = inIdxLBranchStatsVarsDown;
91  nVarBranchingDown = inNVarBranchingDown;
92  idxLBranchStatsVarsUp = inIdxLBranchStatsVarsUp;
93  nVarBranchingUp = inNVarBranchingUp;
94  downpscost = inDownpscost;
95  downvsids = inDownvsids;
96  downconflen = inDownconflen;
97  downinfer = inDowninfer;
98  downcutoff = inDowncutoff;
99  uppscost = inUppscost;
100  upvsids = inUpvsids;
101  upconflen = inUpconflen;
102  upinfer = inUpinfer;
103  upcutoff = inUpcutoff;
104  }
105 
106  /** constructor to create this object */
108  SCIP *scip
109  ) : ScipParaInitialStat(scip)
110  {
111  }
112 
113  /** destractor */
115  {
116  }
117 
118  /** user should implement send method */
119  void send(UG::ParaComm *comm, int dest);
120 
121  /** user should implement receive method */
122  void receive(UG::ParaComm *comm, int source);
123 };
124 
125 }
126 
127 #endif // __SCIP_PARA_INITIAL_STAT_MPI_H__
static ScipParaCommTh * comm
Definition: fscip.cpp:73
void receive(UG::ParaComm *comm, int source)
MPI_Datatype createDatatype2(bool memAllocNecessary)
ParaComm extension for MPI communication.
void send(UG::ParaComm *comm, int dest)
ScipParaInitialStatMpi(int inMaxDepth, int inMaxTotalDepth, int inNVarBranchStatsDown, int inNVarBranchStatsUp, int *inIdxLBranchStatsVarsDown, int *inNVarBranchingDown, int *inIdxLBranchStatsVarsUp, int *inNVarBranchingUp, SCIP_Real *inDownpscost, SCIP_Real *inDownvsids, SCIP_Real *inDownconflen, SCIP_Real *inDowninfer, SCIP_Real *inDowncutoff, SCIP_Real *inUppscost, SCIP_Real *inUpvsids, SCIP_Real *inUpconflen, SCIP_Real *inUpinfer, SCIP_Real *inUpcutoff)
ParaInitialStat extension for SCIP solver.
Base class of communicator object.
Definition: paraComm.h:101