xiaoyeli / superlu

Supernodal sparse direct solver. https://portal.nersc.gov/project/sparse/superlu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[CI] Add Windows runner for automated testing

gruenich opened this issue · comments

We are testing Ubuntu to build and test SuperLU for every pull request. We should add a Windows runner to detect issues that only occur on Windows.

#133 provides much of required code changes, but it does currently fail compilation without an error message.

Of course there's an error message:

D:\a\superlu\superlu\SRC\util.c(482,19): error C2057: expected constant expression [D:\a\superlu\superlu\build\SRC\superlu.vcxproj]
D:\a\superlu\superlu\SRC\util.c(482,25): error C2466: cannot allocate an array of constant size 0 [D:\a\superlu\superlu\build\SRC\superlu.vcxproj]
D:\a\superlu\superlu\SRC\util.c(482,12): error C2133: 'bucket': unknown size [D:\a\superlu\superlu\build\SRC\superlu.vcxproj]

And if you had read my comment #112 (comment) carefully, you would know. This does not work with VC compiler, so revert it: e87529f

BTW: thank you for finally addressing this.

Adding the WinGetOpt dependency to actually run the tests on Windows shouldn't be hard, too. Find inspiration here: https://github.com/wo80/vs-arpack/blob/593ae85a26fbccd9e000cc32acdf55def643ea1b/.github/workflows/build.yml#L70-L79

Of course, you'll have to replace SuperLU with the WinGetOpt repo. You might also have to play around with the install prefix.

The fact that you overlooked the error message is probably due to an abundance of warnings given by the VC compiler. So while you're at it, you might at least disable the pretty useless C4996. Just add _CRT_SECURE_NO_WARNINGS here

superlu/CMakeLists.txt

Lines 121 to 123 in 8f4f993

if(MSVC)
add_compile_definitions(NOMINMAX _COMPLEX_DEFINED)
endif()

Thanks for the hint! I will include this, but I want to investigate whether fixing some of the warnings, e.g., the ones with insecure print functions.