This fixes some compilation bugs and one execution bug when generating
--eval-graphs without libglpk
Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
static void updateBounds(Bounds** const bounds, Event* const e1, Event* const
e2);
static void updateBounds(Bounds** const bounds, Event* const e1, Event* const
e2);
+static void finalizeAnalysisEvalLP(SyncState* const syncState);
// The next group of functions is only needed when computing synchronization
// accuracy.
#ifdef HAVE_LIBGLPK
// The next group of functions is only needed when computing synchronization
// accuracy.
#ifdef HAVE_LIBGLPK
static void calculateCompleteFactors(glp_prob* const lp, FactorsCHull*
factors);
static FactorsCHull** createAllFactors(const unsigned int traceNb);
static void calculateCompleteFactors(glp_prob* const lp, FactorsCHull*
factors);
static FactorsCHull** createAllFactors(const unsigned int traceNb);
-static inline void finalizeAnalysisEvalLP(SyncState* const syncState);
-#else
-static void finalizeAnalysisEvalLP(SyncState* const syncState);
*/
static void destroyAnalysisEval(SyncState* const syncState)
{
*/
static void destroyAnalysisEval(SyncState* const syncState)
{
AnalysisDataEval* analysisData;
analysisData= (AnalysisDataEval*) syncState->analysisData;
AnalysisDataEval* analysisData;
analysisData= (AnalysisDataEval*) syncState->analysisData;
#ifdef HAVE_LIBGLPK
for (i= 0; i < syncState->traceNb; i++)
{
#ifdef HAVE_LIBGLPK
for (i= 0; i < syncState->traceNb; i++)
{
for (j= 0; j < i; j++)
{
// There seems to be a memory leak in glpk, valgrind reports a
for (j= 0; j < i; j++)
{
// There seems to be a memory leak in glpk, valgrind reports a
g_hash_table_foreach(analysisData->stats->exchangeRtt,
&ghfPrintExchangeRtt, analysisData->rttInfo);
g_hash_table_foreach(analysisData->stats->exchangeRtt,
&ghfPrintExchangeRtt, analysisData->rttInfo);
printf("\tConvex hull factors comparisons:\n"
"\t\tTrace pair Factors type Differences (lp - chull)\n"
"\t\t a0 a1\n"
printf("\tConvex hull factors comparisons:\n"
"\t\tTrace pair Factors type Differences (lp - chull)\n"
"\t\t a0 a1\n"
* Compute synchronization factors using a linear programming approach.
* Compute the factors using analysis_chull. Compare the two.
*
* Compute synchronization factors using a linear programming approach.
* Compute the factors using analysis_chull. Compare the two.
*
- * There are two definitions of this function. The empty one is used when the
- * solver library, glpk, is not available at build time. In that case, nothing
- * is actually produced.
+ * When the solver library, glpk, is not available at build time, only compute
+ * the factors using analysis_chull. This is to make sure that module runs its
+ * finalize function so that its graph functions can be called later.
*
* Args:
* syncState: container for synchronization data
*/
*
* Args:
* syncState: container for synchronization data
*/
-#ifndef HAVE_LIBGLPK
-static inline void finalizeAnalysisEvalLP(SyncState* const syncState)
-{
-}
-#else
static void finalizeAnalysisEvalLP(SyncState* const syncState)
{
static void finalizeAnalysisEvalLP(SyncState* const syncState)
{
AnalysisDataEval* analysisData= syncState->analysisData;
AnalysisDataEval* analysisData= syncState->analysisData;
+#ifdef HAVE_LIBGLPK
+ unsigned int i, j;
AnalysisDataCHull* chAnalysisData= analysisData->chullSS->analysisData;
FactorsCHull** lpFactorsArray;
AnalysisDataCHull* chAnalysisData= analysisData->chullSS->analysisData;
FactorsCHull** lpFactorsArray;
g_array_free(analysisData->chullSS->analysisModule->finalizeAnalysis(analysisData->chullSS),
TRUE);
}
g_array_free(analysisData->chullSS->analysisModule->finalizeAnalysis(analysisData->chullSS),
TRUE);
}