Skip to content

Commit f1a5045

Browse files
author
kpsc59
committed
Changes for Hellbender
1 parent bd23cc9 commit f1a5045

23 files changed

+64
-33
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
.nfs*

Makefile

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ LIBFORMAT = static_pic
88
#
99
#---------------------------------------------------------------------------------------------------
1010

11-
CPLEXDIR = /opt/ibm/ILOG/CPLEX_Studio221/cplex
12-
CONCERTDIR = /opt/ibm/ILOG/CPLEX_Studio221/concert
13-
#CPLEXDIR = /cluster/software/cplex-studio/cplex-studio-12.7.0/cplex
14-
#CONCERTDIR = /cluster/software/cplex-studio/cplex-studio-12.7.0/concert
15-
# CPLEXDIR = /Applications/CPLEX_Studio128/cplex
16-
# CONCERTDIR = /Applications/CPLEX_Studio128/concert
11+
#CPLEXDIR = /opt/ibm/ILOG/CPLEX_Studio221/cplex
12+
#CONCERTDIR = /opt/ibm/ILOG/CPLEX_Studio221/concert
13+
CPLEXDIR = /cluster/software/cplex_studio/v2211/cplex
14+
CONCERTDIR = /cluster/software/cplex_studio/v2211/concert
1715

1816
#---------------------------------------------------------------------------------------------------
1917
# Compiler selection
@@ -57,9 +55,9 @@ CXXFLAGS = -O3 -Wall -fPIC -fexceptions -DIL_STD -std=c++11 -fno-strict-aliasing
5755

5856
CPLEXLIBDIR = $(CPLEXDIR)/lib/$(SYSTEM)/$(LIBFORMAT)
5957
CONCERTLIBDIR = $(CONCERTDIR)/lib/$(SYSTEM)/$(LIBFORMAT)
60-
OPENMPIT = /usr/lib/lam/lib
58+
#OPENMPIT = /usr/lib/lam/lib
6159

62-
CXXLNDIRS = -L$(CPLEXLIBDIR) -L$(CONCERTLIBDIR) -L$(OPENMPIT)
60+
CXXLNDIRS = -L$(CPLEXLIBDIR) -L$(CONCERTLIBDIR)
6361
CXXLNFLAGS = -lconcert -lilocplex -lcplex -lm -lpthread -ldl
6462

6563
#---------------------------------------------------------------------------------------------------
@@ -88,10 +86,10 @@ $(OBJDIR)/main.o: $(addprefix $(SRCDIR)/, main.cpp main.h) \
8886

8987
$(OBJDIR)/ConfigParser.o: $(addprefix $(SRCDIR)/, ConfigParser.cpp ConfigParser.h) \
9088
$(addprefix $(OBJDIR)/, CSFS_Utils.o)
91-
$(CXX) $(CXXFLAGS) -c -o $@ $<
89+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
9290

9391
$(OBJDIR)/Cut.o: $(addprefix $(SRCDIR)/, Cut.cpp Cut.h)
94-
$(CXX) $(CXXFLAGS) -c -o $@ $<
92+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
9593

9694
$(OBJDIR)/CutAndSolveController.o: $(addprefix $(SRCDIR)/, CutAndSolveController.cpp CutAndSolveController.h) \
9795
$(addprefix $(OBJDIR)/, CutCreator.o CSFS.o \
@@ -105,48 +103,48 @@ $(OBJDIR)/CutAndSolveWorker.o: $(addprefix $(SRCDIR)/, CutAndSolveWorker.cpp Cut
105103

106104
$(OBJDIR)/CutCreator.o: $(addprefix $(SRCDIR)/, CutCreator.cpp CutCreator.h) \
107105
$(addprefix $(OBJDIR)/, CutSet.o Individual.o Marker.o CSFS_Data.o)
108-
$(CXX) $(CXXFLAGS) -c -o $@ $<
106+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
109107

110108
$(OBJDIR)/CutSet.o: $(addprefix $(SRCDIR)/, CutSet.cpp CutSet.h) \
111109
$(addprefix $(OBJDIR)/, Cut.o)
112-
$(CXX) $(CXXFLAGS) -c -o $@ $<
110+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
113111

114112
$(OBJDIR)/Individual.o: $(addprefix $(SRCDIR)/, Individual.cpp Individual.h)
115-
$(CXX) $(CXXFLAGS) -c -o $@ $<
113+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
116114

117115
$(OBJDIR)/Marker.o: $(addprefix $(SRCDIR)/, Marker.cpp Marker.h)
118-
$(CXX) $(CXXFLAGS) -c -o $@ $<
116+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
119117

120118
$(OBJDIR)/CSFS.o: $(addprefix $(SRCDIR)/, CSFS.cpp CSFS.h) \
121119
$(addprefix $(OBJDIR)/, CSFS_Data.o Solution.o)
122-
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
120+
$(MPICXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
123121

124122
$(OBJDIR)/CSFS_Data.o: $(addprefix $(SRCDIR)/, CSFS_Data.cpp CSFS_Data.h) \
125123
$(addprefix $(OBJDIR)/, ConfigParser.o CSFS_Utils.o Timer.o)
126-
$(CXX) $(CXXFLAGS) -c -o $@ $<
124+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
127125

128126
$(OBJDIR)/CSFS_Utils.o: $(addprefix $(SRCDIR)/, CSFS_Utils.cpp CSFS_Utils.h)
129-
$(CXX) $(CXXFLAGS) -c -o $@ $<
127+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
130128

131129
$(OBJDIR)/Parallel.o: $(addprefix $(SRCDIR)/, Parallel.cpp Parallel.h)
132130
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
133131

134132
$(OBJDIR)/SparseSolver.o: $(addprefix $(SRCDIR)/, SparseSolver.cpp SparseSolver.h) \
135133
$(addprefix $(OBJDIR)/, CutSet.o CSFS.o Solution.o Timer.o)
136-
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
134+
$(MPICXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
137135

138136
$(OBJDIR)/RelaxationSolver.o: $(addprefix $(SRCDIR)/, RelaxationSolver.cpp RelaxationSolver.h) \
139137
$(addprefix $(OBJDIR)/, CutSet.o CSFS_Data.o Solution.o Timer.o)
140-
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
138+
$(MPICXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
141139

142140
$(OBJDIR)/Solution.o: $(addprefix $(SRCDIR)/, Solution.cpp Solution.h)
143-
$(CXX) $(CXXFLAGS) -c -o $@ $<
141+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
144142

145143
$(OBJDIR)/Timer.o: $(addprefix $(SRCDIR)/, Timer.cpp Timer.h)
146-
$(CXX) $(CXXFLAGS) -c -o $@ $<
144+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
147145

148146
$(OBJDIR)/VariableEqualities.o: $(addprefix $(SRCDIR)/, VariableEqualities.cpp VariableEqualities.h)
149-
$(CXX) $(CXXFLAGS) -c -o $@ $<
147+
$(MPICXX) $(CXXFLAGS) -c -o $@ $<
150148

151149
#---------------------------------------------------------------------------------------------------
152150
.PHONY: clean cleanest

compile.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#! /bin/bash
2+
3+
#SBATCH -p general # use the general partition
4+
#SBATCH -J compile_csfs # job name
5+
#SBATCH -o results-%j.out # output file name
6+
#SBATCH -t 0-00:10 # time limit
7+
8+
#SBATCH -N 1 # number of nodes
9+
#SBATCH -n 1 # number of cores (AKA tasks)
10+
11+
#SBATCH [email protected] # email address for notifications
12+
#SBATCH --mail-type=BEGIN,END,FAIL # which type of notifications to send
13+
14+
# load modules
15+
module load openmpi/4.1.5_gcc_12.3.0
16+
module load cplex/2211
17+
18+
module list
19+
20+
# Comple program
21+
srun make

csfs

35.7 MB
Binary file not shown.

src/CSFS.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "CSFS.h"
22
#include <iomanip>
33
#include <iostream>
4+
#include <cassert>
45

56
//------------------------------------------------------------------------------
67
// Returns the next coordinates by reference.

src/CSFS_Utils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#include "CSFS_Utils.h"
22
#include <iostream>
3-
3+
#include <sstream>
44

55
//------------------------------------------------------------------------------
66
// Binomial coefficient. "n choose k"
77
// Adapted from:
88
// https://www.geeksforgeeks.org/space-and-time-efficient-binomial-coefficient/
99
//------------------------------------------------------------------------------
10+
/*
1011
boost::multiprecision::cpp_int CSFSUtils::C(const std::size_t n, std::size_t k)
1112
{
1213
if (k > n)
@@ -25,6 +26,7 @@ boost::multiprecision::cpp_int CSFSUtils::C(const std::size_t n, std::size_t k)
2526
2627
return result;
2728
}
29+
*/
2830

2931

3032
//------------------------------------------------------------------------------

src/CSFS_Utils.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#ifndef CSFS_UTILS_H
22
#define CSFS_UTILS_H
33

4-
#include <assert.h>
5-
#include <boost/multiprecision/cpp_int.hpp>
4+
//#include <boost/multiprecision/cpp_int.hpp>
65
#include <random>
76

87
namespace CSFSUtils
98
{
10-
boost::multiprecision::cpp_int C(const std::size_t, std::size_t);
9+
//boost::multiprecision::cpp_int C(const std::size_t, std::size_t);
1110
std::mt19937 createRng();
1211
std::size_t genRand();
1312
std::string getNthWord(const std::string &, std::size_t);

src/ConfigParser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,14 @@ int ConfigParser::getInt(const std::string &parameterName) const
437437
//------------------------------------------------------------------------------
438438
// Returns the value mapped to the parameter as a boost::multiprecision::cpp_int
439439
//------------------------------------------------------------------------------
440+
/*
440441
boost::multiprecision::cpp_int ConfigParser::getMultiprecisionInt(const std::string &parameterName) const
441442
{
442443
std::string value = findValue(parameterName);
443444
boost::multiprecision::cpp_int returnValue(value);
444445
return returnValue;
445446
}
447+
*/
446448

447449

448450
//------------------------------------------------------------------------------

src/ConfigParser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef CONFIG_PARSER
22
#define CONFIG_PARSER
33

4-
#include <boost/multiprecision/cpp_int.hpp>
4+
//#include <boost/multiprecision/cpp_int.hpp>
55
#include <fstream>
66
#include <map>
77
#include <sstream>
@@ -24,7 +24,7 @@ class ConfigParser
2424
double getDouble(const std::string &) const;
2525
float getFloat(const std::string &) const;
2626
int getInt(const std::string &) const;
27-
boost::multiprecision::cpp_int getMultiprecisionInt(const std::string &) const;
27+
//boost::multiprecision::cpp_int getMultiprecisionInt(const std::string &) const;
2828
short getShort(const std::string &) const;
2929
std::size_t getSizeT(const std::string &) const;
3030
std::string getString(const std::string &) const;

src/Cut.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "Cut.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructors

src/Cut.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef CUT_H
22
#define CUT_H
33

4-
#include <assert.h>
54
#include <sstream>
65
#include <vector>
76

src/CutAndSolveController.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "CutAndSolveController.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructor

src/CutAndSolveController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef CNS_CONTROLLER_H
22
#define CNS_CONTROLLER_H
33

4-
#include <boost/multiprecision/cpp_dec_float.hpp>
4+
//#include <boost/multiprecision/cpp_dec_float.hpp>
55

66
#include "CutCreator.h"
77
#include "CSFS.h"

src/CutAndSolveWorker.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "CutAndSolveWorker.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructor

src/CutCreator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "CutCreator.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructor

src/CutSet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "CutSet.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructor

src/Individual.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "Individual.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructors

src/Individual.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef INDIVIDUAL_H
22
#define INDIVIDUAL_H
33

4-
#include <assert.h>
54
#include <vector>
65

76
class Individual

src/Marker.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "Marker.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructors

src/Marker.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#ifndef MARKER_H
1212
#define MARKER_H
1313

14-
#include <assert.h>
1514
#include <cstddef>
1615

1716
class Marker

src/PatfileReader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "PatfileReader.h"
22
#include "Cut.h"
3+
#include <cassert>
34

45
//------------------------------------------------------------------------------
56
// Constructors

src/RelaxationSolver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "RelaxationSolver.h"
2+
#include <cassert>
23

34
//------------------------------------------------------------------------------
45
// Constructor

src/SparseSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "SparseSolver.h"
22
#include "CSFS_Utils.h"
3-
3+
#include <cassert>
44
//------------------------------------------------------------------------------
55
// Constructor
66
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)