Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1446 commits
Select commit Hold shift + click to select a range
0ef0eb5
nearly parallel row presolve and postsolve working - fixed severe bug…
NCKempke Apr 24, 2020
05bcb58
fix error when extending sparse storage dynamic
NCKempke Apr 24, 2020
e033d36
add nearly parallel eq row example with no coeff in row1 - fix minor …
NCKempke Apr 24, 2020
c10a459
fix some asserts - swap bounds correctly for parallel rows - add exam…
NCKempke Apr 24, 2020
b586a89
fix parallel row detection
NCKempke Apr 27, 2020
54ec1ef
pre and postsolve parallel inequality rows working on example
NCKempke Apr 27, 2020
8d14416
activate all presolvers except boundthightening and rmove print
NCKempke Apr 27, 2020
11d963e
relax postsolve tol by 1e2
NCKempke Apr 27, 2020
77da69d
fix wrong assert
NCKempke Apr 27, 2020
dc07071
remove fixed column in parallel rows already
NCKempke Apr 27, 2020
b5bf4b0
some boundtightening changes
NCKempke Apr 28, 2020
b369794
fix assert
dRehfeldt Apr 28, 2020
f964df5
wrap free getOption methods in namespace
NCKempke Apr 28, 2020
62171c1
add MPI_COMM_WORLD as default communicator to PIPS_MPI.. functions
NCKempke Apr 29, 2020
2c25ff8
bound tightening for linking vars pre and postsolve - disable all oth…
NCKempke Apr 29, 2020
0ae0e3c
set up everything for implementing local linking row bound tightening
NCKempke Apr 29, 2020
e3c2f0e
speed up postsolve of bound tightening by extending functionality of …
NCKempke Apr 30, 2020
b05af6a
add presolve parameters to StochOptions default settings and call the…
NCKempke May 4, 2020
244b1fa
make presolvers return bool - add exhaustive runs to presolve - turn …
NCKempke May 4, 2020
2ccc6ec
remove last global variables in stoch presolve
NCKempke May 4, 2020
f7fbaf6
fix typo
NCKempke May 4, 2020
2e48e1c
Merge branch 'linking-zib-pardiso' into nils-presolve
NCKempke May 4, 2020
8fb5ce6
Merge branch 'linking-zib-pardiso-cleanup' into nils-presolve
NCKempke May 4, 2020
a5af3c5
reoder functions in pipsdef - add default argument for MPI_Comm = MPI…
NCKempke May 4, 2020
5e64e0c
remove warnings
NCKempke May 4, 2020
c1028ad
add options file to gamssmall example - fix bug in postsolve
NCKempke May 5, 2020
f44d310
remove output
NCKempke May 6, 2020
fe3d865
remove debug output
NCKempke May 6, 2020
1f01064
comments on the 2-link-data structures
NCKempke May 7, 2020
feee194
remove some params from makefile
dRehfeldt May 12, 2020
efeb97f
add minloc and maxloc to PIPS_MPI defs
NCKempke May 14, 2020
bd35112
add linking row bound tightening
NCKempke May 14, 2020
f0c57e2
add debug output to singleton row presolver
NCKempke May 15, 2020
8d08147
add more debug output to singleton row
NCKempke May 15, 2020
be1cadc
add const int for #linking rows and columns (ineq and eq) to presolvers
NCKempke May 18, 2020
a63660b
fix communication of bounds in bound tightening
NCKempke May 19, 2020
b9740a6
add write to MPS option to presolve
NCKempke May 19, 2020
8814671
change singleton rows to use minloc and maxloc and reduce mpi communi…
NCKempke May 19, 2020
3805e78
add gondzio correctors for small complementarity pairs
NCKempke May 20, 2020
2e70f54
add max number additional correctors and refactor a bit
NCKempke May 20, 2020
e7cc5ce
add param for first iteration at which to start with small correctors…
NCKempke May 22, 2020
eb270f2
add verbosity to presolve
NCKempke May 25, 2020
25fc5bc
postsolve of linking rows that tightened bounds locally ready for tes…
NCKempke May 25, 2020
c39401e
adjust output of presolve due to verbosity setting
NCKempke May 27, 2020
756ccec
refactoring in presolve
NCKempke May 27, 2020
247d54b
some refactoring
NCKempke May 27, 2020
71dcf09
remove output
NCKempke Jun 19, 2020
608d698
add count methods for nonzeros, rows and cols before and after presolve
NCKempke Jun 19, 2020
a89bf14
correct nnzsCol asserts
NCKempke Jun 22, 2020
0734d13
fix error in bound tightening
NCKempke Jun 22, 2020
d5bce73
fix setting bounds of empy cols in singleton col presolve
NCKempke Jun 22, 2020
a03d249
add debug output to bound tightening
NCKempke Jun 23, 2020
d505b84
fix wrong assert
NCKempke Jun 23, 2020
e73d15e
fix postsolve issues in bound tightening that got revealed after fixi…
NCKempke Jun 23, 2020
27562aa
remove false asserts
NCKempke Jun 24, 2020
175e7c5
remove faulty assert
NCKempke Jun 24, 2020
2ae1504
Merge branch 'linking-zib-pardiso' into nils-presolve
NCKempke Jun 29, 2020
1e38db3
fix faulty assert
NCKempke Jun 30, 2020
6312e08
fix another assert
NCKempke Jun 30, 2020
010b05e
add debug output
NCKempke Jun 30, 2020
b45662e
add debug output
NCKempke Jun 30, 2020
3e27658
fix another assert
NCKempke Jun 30, 2020
58e4300
reset assert
NCKempke Jun 30, 2020
1933ab1
fix error in bound strengthening
NCKempke Jun 30, 2020
a381f0c
debug output
NCKempke Jun 30, 2020
51be493
remove faulty debug section
NCKempke Jun 30, 2020
4779f8d
corrected debug section
NCKempke Jun 30, 2020
4322163
remove some output
NCKempke Jun 30, 2020
4be047a
correct removal of buffered rows
NCKempke Jun 30, 2020
1292fa6
remove another wrong assert
NCKempke Jun 30, 2020
989da38
add assert
NCKempke Jun 30, 2020
dc3a366
adjust communication of singleton row removal for linking rows
NCKempke Jun 30, 2020
f967557
adjust assertsions when constructing empty index
NCKempke Jun 30, 2020
fc5405d
two-link detection fails when either A or C has no linking conss at all
NCKempke Jun 30, 2020
8bef49b
more changes in linking structure detection
NCKempke Jun 30, 2020
6530855
fix faulty assert in postsolve
NCKempke Jun 30, 2020
749e4ce
add first draft of observer pattern
NCKempke Jun 30, 2020
9f2a8ab
remove more compile flags
dRehfeldt Jun 30, 2020
33bb506
Merge branch 'linking-zib-pardiso-cleanup' of ssh://gitlab.version.fz…
dRehfeldt Jun 30, 2020
a1cb6e6
replace env variables by parameters
dRehfeldt Jun 30, 2020
9eda896
Change Observer - integrate into makefile and add subject pattern to …
NCKempke Jul 1, 2020
36c470c
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 1, 2020
5f55490
two-link detection fails when either A or C has no linking conss at all
NCKempke Jun 30, 2020
921ae96
more changes in linking structure detection
NCKempke Jun 30, 2020
691a8ad
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Jul 1, 2020
7c4fe25
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 1, 2020
4d7080f
change integration of subject pattern into qpgenlinsys a bit - integr…
NCKempke Jul 1, 2020
7e87769
remove debug section
NCKempke Jul 1, 2020
94d8478
add missing observer.c
NCKempke Jul 1, 2020
4fe32ed
add missing observer.c
NCKempke Jul 1, 2020
0b8e9a8
add missing observer.c and adapt names
NCKempke Jul 1, 2020
a2d43ac
remove old bicgstab
NCKempke Jul 1, 2020
14aad1b
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 1, 2020
ca055ad
add qpgenoptions layer for controlling bicgstab in qpgenlinsys
NCKempke Jul 2, 2020
901cd5f
implement rollback in bicgstab
NCKempke Jul 2, 2020
a343139
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 2, 2020
3275a96
discard affine step when not converged - stop correctors when not con…
NCKempke Jul 2, 2020
fc9421f
only try small centering step when affine step failed
NCKempke Jul 2, 2020
68605f0
add residual criterion to step acceptance
NCKempke Jul 2, 2020
ead37f9
aesthetics
NCKempke Jul 3, 2020
7e164a7
dont try to exploit linking structure when there is no linking constr…
NCKempke Jul 3, 2020
10546fd
add output to exploit linking strucutre when there is no linking cons…
NCKempke Jul 6, 2020
20c479e
add LUSOL and METIS directories to .gitignore
NCKempke Jul 6, 2020
151da26
implement refactorization logic whenever bicgstab fails in affine or …
NCKempke Jul 6, 2020
e533d45
adjust failed step criterion
NCKempke Jul 6, 2020
7e5f694
proper default presolve parameters
NCKempke Jul 6, 2020
a604882
add options inheritance hirarchie and qpgen options
NCKempke Jul 6, 2020
4267e03
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 6, 2020
515c9ba
move gOuterSolve to stochOptions - add set methods for stoch options …
NCKempke Jul 6, 2020
26a151a
move gInnerSCsolve from solver to qpgenlinsys and QpGenOptions.C
NCKempke Jul 6, 2020
2fdbd67
comment unused param
NCKempke Jul 6, 2020
a409aed
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 6, 2020
42ae4f3
remove unnecessary include
NCKempke Jul 6, 2020
4ec7c7f
remove empty todo in stochoptions
NCKempke Jul 6, 2020
fd60573
remove gms debug section
NCKempke Jul 6, 2020
c7a9115
remove rollback todo since already implemented
NCKempke Jul 6, 2020
88413b0
remove rollback todo in bicgstab since already implemented
NCKempke Jul 6, 2020
e84eda4
extend options another level and move read of base options from gondz…
NCKempke Jul 6, 2020
b9f9c61
extend options another level and move read of base options from gondz…
NCKempke Jul 6, 2020
3a60737
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 6, 2020
d5fe1a6
add increase/decrease sparsify for SC preconditioner
dRehfeldt Jul 8, 2020
785c8bf
...correction
dRehfeldt Jul 8, 2020
a78e764
deactivate singleton columsn presolver per defualt
NCKempke Jul 9, 2020
5bb93a4
change max pres rounds
NCKempke Jul 9, 2020
5303408
reset to 2 presolve rounds
NCKempke Jul 10, 2020
b23ef4d
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 10, 2020
ee66632
add decrease of sparsify to gondzio stoch solvers
NCKempke Jul 10, 2020
1e4a061
update the sparsify parameter earlier
dRehfeldt Jul 10, 2020
b630ff6
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Jul 10, 2020
17ab13a
typo
NCKempke Jul 17, 2020
fe9e331
add files for dual fixing and integrate empty presolver
NCKempke Jul 17, 2020
c94770d
implement dual fixing for non-linking blocks
NCKempke Jul 17, 2020
7bebbfa
Revert "implement dual fixing for non-linking blocks"
NCKempke Jul 17, 2020
e507e19
Revert "add files for dual fixing and integrate empty presolver"
NCKempke Jul 17, 2020
7a82711
Merge branch 'nils-presolve' into 'linking-zib-pardiso'
dRehfeldt Jul 20, 2020
12c81bd
make blockwise sc computation a cmakelists define again
NCKempke Jul 22, 2020
123ee14
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 22, 2020
cbbfad0
fix construction of augmented system for local schur complement when …
NCKempke Jul 3, 2020
897c4f3
adjust aug system once more
NCKempke Jul 3, 2020
86c4fbb
adjust aug system once more
NCKempke Jul 3, 2020
7c1967b
revert some weird changes happened when cherry-picking the last two c…
NCKempke Jul 23, 2020
c4c1a8e
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Jul 23, 2020
d3cfabe
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 23, 2020
2346dc5
Merge branch 'linking-zib-pardiso-cleanup-additional-corrector-step' …
NCKempke Jul 23, 2020
17be69e
add todos and adjust sparsifier properly
NCKempke Jul 23, 2020
192e92c
refactor and initalize all members in constructor same as pardisoinde…
NCKempke Jul 23, 2020
fe955c4
move getNumberOfNonZeros from PardisoSolver to DenseSymMatrix
NCKempke Jul 23, 2020
c9023b8
change iparm unchanged to only variables that we actually set earlier
NCKempke Jul 23, 2020
5197fc2
add max blocksize of blockwiseSC computation to stoch options - clean…
NCKempke Jul 27, 2020
6d4810e
change indentation
NCKempke Jul 27, 2020
be2952a
fix wrong assert in sparse storage dynamic
NCKempke Jul 27, 2020
76aaa33
remove sparse rhs option from all pardiso solvers since that requires…
NCKempke Jul 27, 2020
e0c4f3f
deactivate sparse rhs on default for multiple rhs in pardiso solver -…
NCKempke Jul 27, 2020
7de45e0
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Jul 28, 2020
e04f91c
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 28, 2020
2906c4d
control bicgstab tol from the outside
NCKempke Jul 28, 2020
7972b95
make adaptive linesearch user parameters
NCKempke Jul 28, 2020
99e3e1d
add print residuals param to postsolve
NCKempke Jul 28, 2020
1f44f77
remove if0 sections and add ifdef guards around scalar stuff since el…
NCKempke Jul 28, 2020
0d07e23
remove todo
NCKempke Jul 28, 2020
3cb8fbb
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Jul 28, 2020
f7eccb0
make some stuff const
NCKempke Jul 29, 2020
3ecd390
when switching to small corrs count them as normal gondzio corrs
NCKempke Jul 29, 2020
6a4f70e
dont allow residuals higher than feastol if once converged lower
NCKempke Jul 29, 2020
cb88381
adjust primal dual gondzio too
NCKempke Jul 29, 2020
d1d8ce8
make # comment in options file
NCKempke Jul 29, 2020
36057df
rename options with IP_GONDZIO to GONDZIO
NCKempke Jul 30, 2020
7021878
change name of gondzio stoch params to GONDZIO_STOCH...
NCKempke Jul 30, 2020
63f6035
move some params and implement dynamic corrector schedule if requested
NCKempke Jul 30, 2020
1487c22
debug - add dump of global kkt and add ouput of resids in indefsolver…
NCKempke Jul 31, 2020
54d3d63
more debug - revert
NCKempke Jul 31, 2020
6872f10
check stepleng computation
NCKempke Jul 31, 2020
6c6d1fe
remove some
NCKempke Jul 31, 2020
45f95a9
revert some
NCKempke Jul 31, 2020
3a0663f
Revert "remove some"
NCKempke Jul 31, 2020
c1dbcc9
Merge branch 'linking-zib-pardiso-cleanup' of ssh://gitlab.version.fz…
NCKempke Jul 31, 2020
be71bf5
add norm output of step and iteraate
NCKempke Jul 31, 2020
49a2774
Merge branch 'linking-zib-pardiso-cleanup' of ssh://gitlab.version.fz…
NCKempke Jul 31, 2020
b938d32
more output
NCKempke Jul 31, 2020
ca6a85b
more output
NCKempke Jul 31, 2020
da19396
more output
NCKempke Jul 31, 2020
eefe9e6
change output
NCKempke Jul 31, 2020
bfba594
change output
NCKempke Jul 31, 2020
505099a
output
NCKempke Jul 31, 2020
fa3636a
more output
NCKempke Jul 31, 2020
46ad2b2
Revert "more output"
NCKempke Jul 31, 2020
d88a5df
Revert "output"
NCKempke Jul 31, 2020
4eceed8
Revert "change output"
NCKempke Jul 31, 2020
0cf7fc4
Revert "change output"
NCKempke Jul 31, 2020
d35b163
Revert "more output"
NCKempke Jul 31, 2020
68015f9
Revert "more output"
NCKempke Jul 31, 2020
0852e45
Revert "more output"
NCKempke Jul 31, 2020
9a4e551
revert to 0d07e235b4ae6125f26207f54fbb312225e54cf1
NCKempke Jul 31, 2020
ab55679
fix large steps computed from mehrotras heuristic
NCKempke Aug 3, 2020
37e417e
make everything const
NCKempke Aug 4, 2020
ecef73e
some refactoring and removal of duplicate code
NCKempke Aug 4, 2020
ecc1c08
add safguard in normal(non primal-dual) steplength heuristic by mehro…
NCKempke Aug 4, 2020
60b0edb
change from max to min ..
NCKempke Aug 4, 2020
b1e793a
fix position of min
NCKempke Aug 4, 2020
27d30f8
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Aug 4, 2020
6460da5
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Aug 4, 2020
db1c7da
refactor some minor stuff
NCKempke Aug 4, 2020
71c2dfe
remove double space
NCKempke Aug 5, 2020
32919ae
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Aug 5, 2020
91d0f94
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Aug 5, 2020
c9006a5
Merge branch 'linking-zib-pardiso-cleanup-additional-corrector-step' …
NCKempke Aug 5, 2020
e13bb8c
Merge branch 'linking-zib-pardiso-cleanup' of ssh://gitlab.version.fz…
NCKempke Aug 5, 2020
f088374
set additional correctors to aggressive by default
NCKempke Aug 5, 2020
1d4f8af
remove uninit var
NCKempke Aug 5, 2020
27b8788
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Aug 5, 2020
f21185e
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Aug 5, 2020
106a870
make dynamic correctors more conservative
NCKempke Aug 10, 2020
d256452
correct gondzio scheduling
NCKempke Aug 11, 2020
6952a09
add warning to stochoptions when option does not exist
NCKempke Aug 11, 2020
cfa09b0
move problem scaling before solver creation so that solver uses corre…
NCKempke Aug 14, 2020
6d3d3ed
make all divisions mults when checking for convergence@
NCKempke Aug 14, 2020
5a9b84d
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Aug 17, 2020
0a52d3d
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Aug 17, 2020
35fa7a2
remove compiler warnings for release
NCKempke Aug 18, 2020
82448f5
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Aug 18, 2020
1188c94
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Aug 18, 2020
921add5
add unscaling of residuals when checking convergence - communicate sc…
NCKempke Aug 19, 2020
d6903ef
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Aug 20, 2020
3e470a2
Merge branch 'linking-zib-pardiso-cleanup-additional-corrector-step' …
dRehfeldt Aug 21, 2020
bcca814
bugfix in parallel row presolver - closes #125
NCKempke Aug 24, 2020
016fd5b
Merge branch 'linking-zib-pardiso' into linking-zib-pardiso-cleanup
NCKempke Aug 24, 2020
12277b6
change >> to > >
NCKempke Sep 3, 2020
34951e8
refactor mpi type dedution..
NCKempke Sep 3, 2020
e98f51a
makeeverything inline
NCKempke Sep 3, 2020
1b50ef3
change open signature from string to c_str()
NCKempke Sep 3, 2020
a9014dd
to be reverted once activating c++11 - templated typedef not possible…
NCKempke Sep 3, 2020
cae7fa0
>> to > >
NCKempke Sep 3, 2020
cac312a
const in structs does not seem to allow assignment operator to be ded…
NCKempke Sep 3, 2020
7c86c0a
more >> to > >
NCKempke Sep 3, 2020
a345afc
remove delegatin constructors and simply do code duplication - to be …
NCKempke Sep 3, 2020
d4cf27a
remove extended initalizer lists
NCKempke Sep 3, 2020
050f12d
Merge branch 'linking-zib-pardiso-cleanup' into linking-zib-pardiso-c…
NCKempke Sep 3, 2020
a9c8935
remove c++03 issues in observer - iterator for list and do not class …
NCKempke Sep 3, 2020
f244fbb
include pipsport for override keyword
NCKempke Sep 3, 2020
8f942c2
Merge branch 'linking-zib-pardiso-cpp03' into 'linking-zib-pardiso-cl…
dRehfeldt Sep 5, 2020
739d075
fix node <-> process assignment
NCKempke Sep 14, 2020
5f431b5
remove warning for ierr when compiling in release
NCKempke Sep 14, 2020
ff0f08e
add statistics print out option/hack to sparsifier
dRehfeldt Sep 17, 2020
1f6ac5e
more output
dRehfeldt Sep 17, 2020
b029637
small change of sparsifier
dRehfeldt Sep 17, 2020
9bf97a0
slight change to bicg output
dRehfeldt Sep 19, 2020
190cda4
change sparsifier
dRehfeldt Sep 22, 2020
3ce2678
slight clean-up
dRehfeldt Sep 24, 2020
6d43419
Add files via upload
dRehfeldt Apr 26, 2021
24d3ea8
Update README_PIPSipmpp.md
dRehfeldt Apr 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### .gitignore file
#### .gitignore file
## C++ files, from
## https://raw.githubusercontent.com/github/gitignore/master/C++.gitignore
# Compiled Object files
Expand Down Expand Up @@ -50,11 +50,23 @@ slurm*
build
SharedLibraries
build_pips
# no additional .gitignore file for that
ThirdPartyLibs/PARDISO
ThirdPartyLibs/MUMPS
ThirdPartyLibs/METIS
ThirdPartyLibs/LUSOL
pipstmp
GAMSsmall
PIPS-IPM/Drivers/simple/simple_data_12.gdx

# Ignore the OS X DS_Store
.DS_Store

# Ignore Eclipse files
.metadata*
.project

RemoteSystemsTempFiles*
.cproject
.settings
/Debug/
170 changes: 143 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Mo
# For optimized build, set CMAKE_BUILD_TYPE to RELEASE
# For optimized build with debug info, set CMAKE_BUILD_TYPE to RELWITHDEBINFO
# CMAKE_BUILD_TYPE should be set at the command line or in a toolchain file
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wnon-virtual-dtor -Woverloaded-virtual")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# set(CMAKE_BUILD_TYPE RELEASE)
if(CMAKE_BUILD_TYPE)
message("CMake build type is ${CMAKE_BUILD_TYPE}")
message("Build type default flags are: ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
else()
message("CMAKE_BUILD_TYPE not set!")
endif(CMAKE_BUILD_TYPE)

option(BUILD_ALL "Build all of PIPS (PIPS-S, PIPS-IPM, PIPS-NLP)" ON)
option(BUILD_PIPS_S "Build PIPS-S" OFF)
option(BUILD_PIPS_IPM "Build PIPS-IPM" OFF)
Expand All @@ -38,10 +43,29 @@ if(DUMP)
add_definitions(-DDUMP)
endif()


#with testing of (selected) executables
option(WITH_MAKETEST "Enable 'make test'" ON)

#use mkl_pardiso solver instead of schenk solver
option(WITH_MKL_PARDISO "Use mkl_pardiso from Intel for PIPS-IPM" OFF)
message(STATUS "WITH_MKL_PARDISO=${WITH_MKL_PARDISO}")

#use (sparse) MUMPS solver for local Schur complement
option(WITH_MUMPS_LEAF "Use MUMPS (if available) for (local) Schur complement at each leaf" OFF)
message(STATUS "WITH_MUMPS_LEAF=${WITH_MUMPS_LEAF}")

#use (sparse) MUMPS solver for global Schur complement
option(WITH_MUMPS_ROOT "Use MUMPS (if available) for (global) Schur complement at root" OFF)
message(STATUS "WITH_MUMPS_ROOT=${WITH_MUMPS_ROOT}")

#compute local schur complement blockwise with pardiso
option(WITH_PARDISO_BLOCKSC "Use Pardiso (if available) for comuting the Schur complement in blocks" OFF)
message(STATUS "WITH_PARDISO_BLOCKSC=${WITH_PARDISO_BLOCKSC}")

option(BUILD_GDX_SOURCE "Build GDX Source" OFF)
message(STATUS "BUILD_GDX_SOURCE=${BUILD_GDX_SOURCE}")


#with timing for PIPS-IPM

#with PIPS IPM AND NLP profile metric
Expand Down Expand Up @@ -177,9 +201,11 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "BlueGeneP-static")
if(MATH_LIBS)
message(STATUS "Using user-defined MATH_LIBS=${MATH_LIBS}")
elseif(IS_DIRECTORY $ENV{MKLROOT})
#set(MATH_LIBS "-Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lgfortran -ldl")
set(MATH_LIBS "-Wl,--start-group -L$ENV{MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_avx -lmkl_def -liomp5 -lgfortran -lpthread -lm -ldl")
# set(MATH_LIBS "-mkl=parallel")
#set(MATH_LIBS "-Wl,--start-group -Wl,--no-as-needed -L$ENV{MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_lapack95_lp64 -lmkl_sequential -lmkl_core -lgfortran -fopenmp -lpthread -lm -Wl,--end-group -std=c++11 -Wall -O3")

set(MATH_LIBS "-Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lgfortran -ldl")
#set(MATH_LIBS "-Wl,--start-group -L$ENV{MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_avx -lmkl_def -liomp5 -lgfortran -lpthread -lm -ldl")
# set(MATH_LIBS "-mkl=parallel")
message(STATUS "Using MKLROOT:$ENV{MKLROOT} MATH_LIBS=${MATH_LIBS}")
else(MATH_LIBS)
message(STATUS "Searching system path for MATH_LIBS")
Expand Down Expand Up @@ -268,11 +294,12 @@ if(BUILD_PIPS_IPM OR BUILD_PIPS_NLP)
set(HAVE_MA27 TRUE)
message(STATUS "MA27_LIBRARY = ${MA27_LIBRARY}")
endif(MA27_LIBRARY)

set(METIS_DIR ${SHARED_DIR}/METIS/src)
find_library(METIS_LIBRARY NAME libmetis.a HINTS ${METIS_DIR} PATHS ${METIS_DIR})
find_path(METIS_INCLUDE_DIR NAME metis.h HINTS ${METIS_DIR}/Lib)
set(METIS_DIR ${SHARED_DIR}/METIS)
find_library(PARMETIS_LIBRARY NAME libparmetis.a HINTS ${METIS_DIR}/lib PATHS ${METIS_DIR}/lib)
find_library(METIS_LIBRARY NAME libmetis.a HINTS ${METIS_DIR}/lib PATHS ${METIS_DIR})
find_path(METIS_INCLUDE_DIR NAME metis.h HINTS ${METIS_DIR}/include)
if(METIS_INCLUDE_DIR AND METIS_LIBRARY)
message(STATUS "METIS_INCLUDE_DIR = ${METIS_INCLUDE_DIR}")
include_directories(${METIS_INCLUDE_DIR})
set(HAVE_METIS TRUE)
else()
Expand All @@ -289,6 +316,79 @@ if(BUILD_PIPS_IPM OR BUILD_PIPS_NLP)
#MA86 is not needed at this time
#find_library(MA86_LIBRARY hsl_ma86 PATHS ${MA86_DIR}/lib)

#MUMPS Solver REMARK: Identical to the one from PIPS Master, so can simply be replaced if this branch is merged into master
if(WITH_MUMPS_LEAF OR WITH_MUMPS_ROOT)
set(MUMPS_DIR ${SHARED_DIR}/MUMPS)
find_library(MUMPS_D_LIBRARY libdmumps.a PATHS ${MUMPS_DIR}/lib NO_DEFAULT_PATH)
find_library(MUMPS_COMMON_LIBRARY libmumps_common.a PATHS ${MUMPS_DIR}/lib NO_DEFAULT_PATH)
find_library(MUMPS_PORD_LIBRARY libpord.a PATHS ${MUMPS_DIR}/lib NO_DEFAULT_PATH)
find_path(MUMPS_INCLUDE_DIR NAME dmumps_c.h HINTS ${MUMPS_DIR}/include NO_DEFAULT_PATH)
if(NOT MUMPS_D_LIBRARY OR NOT MUMPS_COMMON_LIBRARY OR NOT MUMPS_PORD_LIBRARY OR NOT MUMPS_INCLUDE_DIR)
message(WARNING "even though WITH_MUMPS_LEAF/WITH_MUMPS_ROOT was specified : no MUMPS was found under ${MUMPS_DIR}/lib")
endif(NOT MUMPS_D_LIBRARY OR NOT MUMPS_COMMON_LIBRARY OR NOT MUMPS_PORD_LIBRARY OR NOT MUMPS_INCLUDE_DIR)
endif(WITH_MUMPS_LEAF OR WITH_MUMPS_ROOT)

if(MUMPS_INCLUDE_DIR AND MUMPS_D_LIBRARY AND PARMETIS_LIBRARY)
# we assume the other libraries are in there
set(HAVE_MUMPS TRUE)
message(STATUS "FOUND MUMPS")
# you may need parmetis if mumps was build with parmetis (we recommend using parmetis). For more info
# see the readme file in ThirdPartyLibs/MUMPS and the sample build file in PIPS-NLP/Core/LinearSolvers/MumpsSolver
# In short: insert something like the following line to MUMPS_LIBRARY below
# -L/home/petra1/work/installs/parmetis-4.0.3/lib -lparmetis
# hack(ish) way of specifying the many mumps libraries
# - put all the mumps libraries: -ldmumps -lmumps_common -lpord
# - scalapack should be set in ${SCALAPACK_LIBRARIES} using Toolchain.cmake (or hardcoded here)
# - mpifort also needed
# - parmetis 5.0 or later required by mumps but no need to specify it here: it should be detected by the build system at this point
# NOTE: the version of METIS recieved with wgetMETIS in ThirdPartyLibs/METIS does not export all necessary symbols for parmetis and MumpsSolver
# use either the metis shipped together with permetis or download seperately and link against it
# related ERROR looks like: ... undefined reference to `metis_setdefaultoptions_'
if(NOT SCALAPACK_LIBRARIES)
MESSAGE(STATUS "SCALAPACK_LIBRARIES for MUMPS not set. Default linking for Ubuntu.")
find_library(SCALAPACK_OMPI_LIBRARY NAMES scalapack-openmpi)
find_library(BLACS_LIBRARY blacs-openmpi)
find_library(BLACSF77_LIBRARY blacsF77init-openmpi)
find_library(BLACS_CINIT_LIBRARY blacsCinit-openmpi)
set(SCALAPACK_LIBRARIES "${SCALAPACK_OMPI_LIBRARY} ${BLACS_LIBRARY} ${BLACSF77_LIBRARY} ${BLACS_CINIT_LIBRARY}")
endif(NOT SCALAPACK_LIBRARIES)
message(STATUS "SCALAPACK_LIBRARIES:=${SCALAPACK_LIBRARIES}")
find_library(BLACS_LIBRARY NAMES blacs-openmpi)
message(STATUS "BLACS_LIBRARY:=${BLACS_LIBRARY}")
# -lmpi_mpifh includes the OpenMPI Fortran MPI interface used when
# building MUMPS. MPICH requires -lmpifort
if(NOT MUMPS_FORT_LIB)
MESSAGE(STATUS "MUMPS_FORT_LIB not set for linking the Fortran MPI interface library required by MUMPS. Using OpenMPI Fortran interface -lmpi_mpifh")
find_library(MUMPS_FORT_LIB mpi_mpifh)
endif(NOT MUMPS_FORT_LIB)
set(MUMPS_LIBRARY "-Wl,--start-group ${MUMPS_D_LIBRARY} ${MUMPS_COMMON_LIBRARY} ${MUMPS_FORT_LIB} ${MUMPS_PORD_LIBRARY} ${SCALAPACK_LIBRARIES} ${METIS_LIBRARY} \
${PARMETIS_LIBRARY} -Wl,--end-group")
message(STATUS "MUMPS_LIBRARIES:=${MUMPS_LIBRARY}")
include_directories(${MUMPS_INCLUDE_DIR})
else ()
set(HAVE_MUMPS FALSE)
message(STATUS "MUMPS library and/or headers are not present. Will build PIPS without MUMPS")
set(MUMPS_LIBRARY "")
endif(MUMPS_INCLUDE_DIR AND MUMPS_D_LIBRARY AND PARMETIS_LIBRARY)


#MKL_PARDISO Solver
set(HAVE_MKL_PARDISO FALSE)
if(WITH_MKL_PARDISO)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(IS_DIRECTORY $ENV{MKLROOT})
find_library(MKL_INTEL_LP64_LIBRARY NAME libmkl_intel_lp64.a HINTS $ENV{MKLROOT}/lib/intel64_lin)
find_library(MKL_CORE_LIBRARY NAME libmkl_core.a HINTS $ENV{MKLROOT}/lib/intel64_lin)
find_library(MKL_SEQUENTIAL_LIBRARY NAME libmkl_sequential.a HINTS $ENV{MKLROOT}/lib/intel64_lin)
set(MKL_PARDISO_LIBS "-Wl,--start-group ${MKL_INTEL_LP64_LIBRARY} ${MKL_CORE_LIBRARY} ${MKL_SEQUENTIAL_LIBRARY} -Wl,--end-group -lgfortran -lpthread -lm")
include_directories($ENV{MKLROOT}/include)
set(HAVE_MKL_PARDISO TRUE)
endif(IS_DIRECTORY $ENV{MKLROOT})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message(STATUS "MKL_pardiso libs: \n\t${MKL_INTEL_LP64_LIBRARY} \n\t${MKL_CORE_LIBRARY} \n\t${MKL_SEQUENTIAL_LIBRARY}")
message(STATUS "HAVE_MKL_PARDISO is ${HAVE_MKL_PARDISO}")
endif(WITH_MKL_PARDISO)

#PARDISO Solver
set(PARDISO_DIR ${SHARED_DIR}/PARDISO/src)
set(HAVE_PARDISO FALSE)
Expand All @@ -313,32 +413,31 @@ if(BUILD_PIPS_IPM OR BUILD_PIPS_NLP)
else(${CMAKE_SYSTEM_NAME} MATCHES "BlueGeneQ-static")
if(IS_XE6)
#find_library(PARDISO_LIBRARY NAMES "libpardiso495-GNU470-XE6.so" PATHS "/scratch/rosa/petra/shared_libs/")
set(PARDISO_LIBRARY "/scratch/rosa/petra/shared_libs/libpardiso495-GNU430-XE6.so")
message(STATUS "PARDISO library found, using ${PARDISO_LIBRARY}")
set(PARDISO_LIBRARY "/scratch/rosa/petra/shared_libs/libpardiso495-GNU430-XE6.so")
message(STATUS "PARDISO library found, using ${PARDISO_LIBRARY}")
else(IS_XE6)
if(IS_XK7)
set(PARDISO_LIBRARY "/scratch/todi/petra/shared_libs/libpardiso495-GNU430-XK7.so")
else(IS_XK7)
if(IS_XC30)
set(PARDISO_LIBRARY "${PARDISO_LIBS_STATIC}")
else(IS_XC30)
set(PARDISO_LIBRARY ${PARDISO_DIR}/libpardiso.so)
endif(IS_XC30)
endif(IS_XK7)
if(IS_XK7)
set(PARDISO_LIBRARY "/scratch/todi/petra/shared_libs/libpardiso495-GNU430-XK7.so")
else(IS_XK7)
if(IS_XC30)
set(PARDISO_LIBRARY "${PARDISO_LIBS_STATIC}")
else(IS_XC30)
set(PARDISO_LIBRARY ${PARDISO_DIR}/libpardiso.so)
endif(IS_XC30)
endif(IS_XK7)
endif(IS_XE6)

if(EXISTS ${PARDISO_LIBRARY} OR IS_XC30)
FIND_PACKAGE( OpenMP REQUIRED )
set(HAVE_PARDISO TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
FIND_PACKAGE( OpenMP REQUIRED )
set(HAVE_PARDISO TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
else(EXISTS ${PARDISO_LIBRARY} OR IS_XC30)
set(PARDISO_LIBRARY "")
set(PARDISO_LIBRARY "")
endif(EXISTS ${PARDISO_LIBRARY} OR IS_XC30)
endif(${CMAKE_SYSTEM_NAME} MATCHES "BlueGeneQ-static")
endif(${CMAKE_SYSTEM_NAME} MATCHES "BlueGeneP-static")

message(STATUS "Pardiso lib: ${PARDISO_LIBRARY} and HAVE_PARDISO is ${HAVE_PARDISO}")
message(STATUS "Pardiso lib: ${PARDISO_LIBRARY} and HAVE_PARDISO is ${HAVE_PARDISO}")

#setting CXX_FLAGS
if(HAVE_MA27)
Expand All @@ -361,10 +460,26 @@ if(BUILD_PIPS_IPM OR BUILD_PIPS_NLP)

if(HAVE_PARDISO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_PARDISO")
if(WITH_PARDISO_BLOCKSC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARDISO_BLOCKSC")
endif(WITH_PARDISO_BLOCKSC)
else(HAVE_PARDISO)
set(PARDISO_LIBRARY "")
endif(HAVE_PARDISO)

if(HAVE_MUMPS)
if(WITH_MUMPS_LEAF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_MUMPS_LEAF")
endif(WITH_MUMPS_LEAF)
if(WITH_MUMPS_ROOT)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_MUMPS_ROOT")
endif(WITH_MUMPS_ROOT)
endif(HAVE_MUMPS)


if(HAVE_MKL_PARDISO AND WITH_MKL_PARDISO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_MKL_PARDISO")
endif(HAVE_MKL_PARDISO AND WITH_MKL_PARDISO)
endif()

if (BUILD_PIPS_S AND BUILD_PIPS_IPM)
Expand Down Expand Up @@ -492,6 +607,7 @@ enable_testing()

if(BUILD_PIPS_IPM)
add_test(NAME PIPS-IPM-multipleTests COMMAND sh ${PROJECT_SOURCE_DIR}/PIPS-IPM/Test/pipsipmMultiTests.sh $<TARGET_FILE:pipsipmFromRaw> ${PROJECT_SOURCE_DIR}/PIPS-S/Test/rawInput)
add_test(NAME PIPS-IPM-linkingConsTest COMMAND sh ${PROJECT_SOURCE_DIR}/PIPS-IPM/Test/pipsipmLinkConsTest.sh $<TARGET_FILE:pipsipmCallbackExample> )
endif(BUILD_PIPS_IPM)

if(BUILD_PIPS_S)
Expand Down
15 changes: 5 additions & 10 deletions Input/rawInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ void rawInput::parseZeroData(const std::string &zerodata, int overrideScenarioNu
string line;
getline(f1,line);
getline(f1,line);
size_t loc = line.find("Only Bounds Vary");
assert(loc == 0);
assert(line.find("Only Bounds Vary") == 0);
f1 >> nSecondStageVars_;
f1 >> nSecondStageCons_;

Expand Down Expand Up @@ -91,8 +90,7 @@ void rawInput::parseZeroData(const std::string &zerodata, int overrideScenarioNu

getline(f1,line);
getline(f1,line);
loc = line.find("A matrix");
assert(loc == 0);
assert(line.find("A matrix") == 0);

CoinBigIndex nnz;
vector<CoinBigIndex> starts;
Expand All @@ -116,8 +114,7 @@ void rawInput::parseZeroData(const std::string &zerodata, int overrideScenarioNu

getline(f1,line);
getline(f1,line);
loc = line.find("W matrix");
assert(loc == 0);
assert(line.find("W matrix") == 0);

f1 >> nnz;
starts.resize(nSecondStageVars_+1);
Expand All @@ -136,8 +133,7 @@ void rawInput::parseZeroData(const std::string &zerodata, int overrideScenarioNu

getline(f1,line);
getline(f1,line);
loc = line.find("T matrix");
assert(loc == 0);
assert(line.find("T matrix") == 0);

f1 >> nnz;
starts.resize(nFirstStageVars_+1);
Expand Down Expand Up @@ -190,8 +186,7 @@ void rawInput::loadLocalScenData(int scen) {
string line;
getline(f,line);
getline(f,line);
size_t loc = line.find("Only Bounds Vary");
assert(loc == 0);
assert(line.find("Only Bounds Vary") == 0);
double scale = 1.0;
if (nScenariosTrue != nScenarios_) {
scale = static_cast<double>(nScenariosTrue)/static_cast<double>(nScenarios_);
Expand Down
Loading