Skip to content

Commit

Permalink
Merge pull request #2018 from ERGO-Code/pdlp-tests-presolve-off
Browse files Browse the repository at this point in the history
Add cuPDLP to ctest on all OS
  • Loading branch information
galabovaa authored Nov 4, 2024
2 parents 5bce0d6 + 935a885 commit a1748bc
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DFAST_BUILD=OFF -DHIGHSINT64=on -DHIGHS_NO_DEFAULT_THREADS=ON
run: cmake $GITHUB_WORKSPACE -DHIGHSINT64=on -DHIGHS_NO_DEFAULT_THREADS=ON

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down Expand Up @@ -263,7 +263,7 @@ jobs:
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DFAST_BUILD=OFF -DHIGHSINT64=on -DHIGHS_NO_DEFAULT_THREADS=ON
run: cmake $GITHUB_WORKSPACE -DHIGHSINT64=on -DHIGHS_NO_DEFAULT_THREADS=ON -DALL_TESTS=ON

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down
78 changes: 76 additions & 2 deletions check/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,57 @@ if (NOT FAST_BUILD OR ALL_TESTS)
# "--parallel=on"
)

if (UNIX AND NOT APPLE)
set(pdlpInstances
"25fv47\; 5.50184588\;"
"adlittle\; 2.254949631\;"
"afiro\;-4.64753142\;"
"avgas\;-7.749999999\;"
"blending\;-3.19999999\;"
"chip\;-9.000000001\;"
"e226\;-1.16389293\;"
"scrs8\; 9.042969511\;"
"sctest\; 5.749999936\;"
"shell\; 1.2088253460\;"
"stair\;-2.51266951\;"
"standata\; 1.257699499\;"
"standgub\; 1.25769949\;"
)
elseif(WIN32)
# on windows e226 model status is unknown, rel gap e00
set(pdlpInstances
"25fv47\; 5.50184588\;"
"adlittle\; 2.25494963\;"
"afiro\;-4.64753142\;"
"avgas\;-7.749999999\;"
"blending\;-3.19999999\;"
"chip\;-9.000000001\;"
"scrs8\; 9.0429695\;"
"sctest\; 5.749999936\;"
"shell\; 1.2088253460\;"
"stair\;-2.51266951\;"
"standata\; 1.2576995\;"
"standgub\; 1.2576995\;"
)
elseif(APPLE)
set(pdlpInstances
"25fv47\; 5.5018458\;"
"adlittle\; 2.25494963\;"
"afiro\;-4.64753142\;"
"avgas\;-7.749999999\;"
"blending\;-3.19999999\;"
"chip\;-8.9999988715\;"
"e226\;-1.163892\;"
"scrs8\; 9.04296953\;"
"sctest\; 5.749999936\;"
"shell\; 1.2088253460\;"
"stair\;-2.5126695\;"
"standata\; 1.25769950\;"
"standgub\; 1.25769950\;"
)
endif()


# define a macro to add tests
#
# add_instancetests takes an instance group and a status
Expand Down Expand Up @@ -293,7 +344,8 @@ if (NOT FAST_BUILD OR ALL_TESTS)

add_instancetests(failInstances "Fail")
add_instancetests(infeasibleInstances "Infeasible")
#add_instancetests(unboundedInstances "Unbounded")
add_instancetests(unboundedInstances "Unbounded")


foreach(instance ${mipInstances})
list(GET instance 0 name)
Expand All @@ -320,6 +372,28 @@ if (NOT FAST_BUILD OR ALL_TESTS)
"Solution status infeasible")

endforeach(setting)
endforeach()
endforeach(instance)

if(FAST_BUILD)
foreach(instance_pdlp ${pdlpInstances})
# add default tests
# treat the instance as a tuple (list) of two values
list(GET instance_pdlp 0 name_pdlp)
list(GET instance_pdlp 1 optval)

set(inst_pdlp "${HIGHS_SOURCE_DIR}/check/instances/${name_pdlp}.mps")

add_test(NAME ${name_pdlp}-pdlp-no-presolve COMMAND $<TARGET_FILE:highs-bin> "--solver=pdlp"
"--presolve=off" ${inst_pdlp})

set_tests_properties (${name_pdlp}-pdlp-no-presolve PROPERTIES
PASS_REGULAR_EXPRESSION
"Model status : Optimal")

set_tests_properties (${name_pdlp}-pdlp-no-presolve PROPERTIES
PASS_REGULAR_EXPRESSION
"Objective value : ${optval}")
endforeach(instance_pdlp)
endif()

endif()

0 comments on commit a1748bc

Please sign in to comment.