Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cuPDLP to ctest on all OS #2018

Merged
merged 21 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Loading