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

Create GitHub action to test CMake build system on Windows #524

Conversation

weslleyspereira
Copy link
Collaborator

@weslleyspereira weslleyspereira commented Mar 26, 2021

Solves #523.

This PR adds a Github Action with a test for Windows (latest) using the MinGW generator.
Since this new code is not in the master branch, please look at the GitHub CI running here: https://github.com/weslleyspereira/lapack/actions

TODO list:

  • Fix testing issues

@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Patch and project coverage have no change.

Comparison is base (0c44dd4) 0.00% compared to head (858c55b) 0.00%.

❗ Current head 858c55b differs from pull request most recent head 88f56ce. Consider uploading reports for the commit 88f56ce to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #524   +/-   ##
=======================================
  Coverage    0.00%    0.00%           
=======================================
  Files        1908     1908           
  Lines      186962   186962           
=======================================
  Misses     186962   186962           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@weslleyspereira weslleyspereira force-pushed the try-github-actions-for-windows branch 2 times, most recently from 58ec577 to a19341b Compare March 26, 2021 20:47
@weslleyspereira
Copy link
Collaborator Author

I had a Stack Overflow problem in CBLAS:

         Start  94: LAPACK-xlintstz_ztest_in
  1/121 Test  #94: LAPACK-xlintstz_ztest_in .........***Failed    0.10 sec
Running: D:/a/lapack/lapack/lapack-travis-bld/bin/xlintstz.exe
ARGS= OUTPUT_FILE;D:/a/lapack/lapack/lapack-travis-bld/TESTING/ztest.out;ERROR_FILE;D:/a/lapack/lapack/lapack-travis-bld/TESTING/ztest.out.err;INPUT_FILE;D:/a/lapack/lapack/TESTING/ztest.in
Test OUTPUT:

Test ERROR:

CMake Error at D:/a/lapack/lapack/TESTING/runtest.cmake:36 (message):
  Test D:/a/lapack/lapack/lapack-travis-bld/bin/xlintstz.exe returned Stack
  overflow



        Start  22: CBLAS-xzcblat1
  3/121 Test  #22: CBLAS-xzcblat1 ...................***Failed    0.02 sec
Running: D:/a/lapack/lapack/lapack-travis-bld/bin/xzcblat1.exe
ARGS= OUTPUT_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/ztest1.out;ERROR_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/ztest1.out.err;INPUT_FILE;D:/a/lapack/lapack/CBLAS/testing/
CMake Error at D:/a/lapack/lapack/TESTING/runtest.cmake:28 (file):
  file failed to open for reading (No such file or directory):

    D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/ztest1.out



        Start  16: CBLAS-xdcblat1
 16/121 Test  #16: CBLAS-xdcblat1 ...................***Failed    0.02 sec
Running: D:/a/lapack/lapack/lapack-travis-bld/bin/xdcblat1.exe
ARGS= OUTPUT_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/dtest1.out;ERROR_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/dtest1.out.err;INPUT_FILE;D:/a/lapack/lapack/CBLAS/testing/
CMake Error at D:/a/lapack/lapack/TESTING/runtest.cmake:28 (file):
  file failed to open for reading (No such file or directory):

    D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/dtest1.out



        Start  13: CBLAS-xscblat1
 64/121 Test  #13: CBLAS-xscblat1 ...................***Failed    0.02 sec
Running: D:/a/lapack/lapack/lapack-travis-bld/bin/xscblat1.exe
ARGS= OUTPUT_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/stest1.out;ERROR_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/stest1.out.err;INPUT_FILE;D:/a/lapack/lapack/CBLAS/testing/
CMake Error at D:/a/lapack/lapack/TESTING/runtest.cmake:28 (file):
  file failed to open for reading (No such file or directory):

    D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/stest1.out



        Start  19: CBLAS-xccblat1
120/121 Test  #19: CBLAS-xccblat1 ...................***Failed    0.02 sec
Running: D:/a/lapack/lapack/lapack-travis-bld/bin/xccblat1.exe
ARGS= OUTPUT_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/ctest1.out;ERROR_FILE;D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/ctest1.out.err;INPUT_FILE;D:/a/lapack/lapack/CBLAS/testing/
CMake Error at D:/a/lapack/lapack/TESTING/runtest.cmake:28 (file):
  file failed to open for reading (No such file or directory):

    D:/a/lapack/lapack/lapack-travis-bld/CBLAS/testing/ctest1.out
96% tests passed, 5 tests failed out of 121

Total Test time (real) = 238.70 sec

The following tests FAILED:
	 13 - CBLAS-xscblat1 (Failed)
	 16 - CBLAS-xdcblat1 (Failed)
	 19 - CBLAS-xccblat1 (Failed)
	 22 - CBLAS-xzcblat1 (Failed)
	 94 - LAPACK-xlintstz_ztest_in (Failed)

The last commit tries to increase the queue manually using -DCMAKE_C_FLAGS="-Wl,--stack=1000000000.

@weslleyspereira weslleyspereira force-pushed the try-github-actions-for-windows branch 4 times, most recently from 7d97671 to 94487e0 Compare March 26, 2021 20:54
@weslleyspereira
Copy link
Collaborator Author

I haven't had success in the first attempt. I appreciate it if any Windows user can check my test output: https://github.com/weslleyspereira/lapack/actions/runs/691245251

@weslleyspereira weslleyspereira force-pushed the try-github-actions-for-windows branch 8 times, most recently from 69a28f7 to 0b03636 Compare June 16, 2021 22:19
@langou
Copy link
Contributor

langou commented Aug 30, 2021

Hi @hokb and Window users in general, we are looking for some Windows users who can help with this attempt of a PR. @weslleyspereira is trying to get CI to test also on Windows machines. (Currently we do not test on Windows machines as part of CI.) @weslleyspereira is able to get the code to compile, but the code does not pass the test suites. Any idea/contribution would be welcome. @langou

@foxtran
Copy link

foxtran commented Jan 6, 2022

Hello!

I found the problem under Win10 + Choco (CMake 3.22.1/mingw GCC 11.2.0/Makefile)
There is a patch that fixes problems with

	 13 - CBLAS-xscblat1 (Failed)
	 16 - CBLAS-xdcblat1 (Failed)
	 19 - CBLAS-xccblat1 (Failed)
	 22 - CBLAS-xzcblat1 (Failed)

tests:

diff --git a/CBLAS/testing/CMakeLists.txt b/CBLAS/testing/CMakeLists.txt
index 9b8cfaeb1..141d7339c 100644
--- a/CBLAS/testing/CMakeLists.txt
+++ b/CBLAS/testing/CMakeLists.txt
@@ -4,11 +4,13 @@
 #######################################################################

 macro(add_cblas_test output input target)
-  set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${input}")
+  if(NOT "${input}" STREQUAL "")
+    set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${input}")
+  endif()
   set(TEST_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${output}")
   set(testName "${target}")

-  if(EXISTS "${TEST_INPUT}")
+  if(DEFINED TEST_INPUT AND EXISTS "${TEST_INPUT}")
     add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}"
       -DTEST=$<TARGET_FILE:${target}>
       -DINPUT=${TEST_INPUT}

The problem was that if the input is an empty string, i.e. "", CMake INPUT_FILE (stdin) is a directory.

I do not have any problem with LAPACK-xlintstz_ztest_in.

@weslleyspereira
Copy link
Collaborator Author

Thanks for the help, @FulgurIgor. However, there still remain a couple of build issues to be solved.

@weslleyspereira weslleyspereira force-pushed the try-github-actions-for-windows branch 4 times, most recently from af3e5fd to 7254dc7 Compare May 25, 2023 15:21
@weslleyspereira weslleyspereira marked this pull request as ready for review May 25, 2023 16:33
@weslleyspereira
Copy link
Collaborator Author

I marked this as ready to review. I think we can merge this workflow for Windows even if we do not run the test suite. At least we will be able to guarantee that LAPACK builds on Windows. Moreover, I couldn't reproduce the test failures in my windows machine, so I don't really know what is happening with the Docker image windows-latest from Github.

@weslleyspereira weslleyspereira merged commit bd82aa0 into Reference-LAPACK:master May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants