t8code icon indicating copy to clipboard operation
t8code copied to clipboard

t8_cmesh_copy is not working on all test cases

Open holke opened this issue 1 year ago • 1 comments

I implemented a test to check whether t8_cmesh_copy is working (https://github.com/DLR-AMR/t8code/pull/921). This test does:

t8_cmesh_set_derive(new_cmesh, committed_cmesh);
t8_cmesh_commit (new_cmesh, SC_MPI_COMM_WORLD);

And fails for several cmeshes.

[----------] Global test environment tear-down
[==========] 187 tests from 1 test suite ran. (37 ms total)
[  PASSED  ] 163 tests.
[  FAILED  ] 24 tests, listed below:
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/5, where GetParam() = 5
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/7, where GetParam() = 7
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/8, where GetParam() = 8
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/9, where GetParam() = 9
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/50, where GetParam() = 50
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/51, where GetParam() = 51
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/52, where GetParam() = 52
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/53, where GetParam() = 53
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/54, where GetParam() = 54
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/55, where GetParam() = 55
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/56, where GetParam() = 56
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/57, where GetParam() = 57
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/90, where GetParam() = 90
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/91, where GetParam() = 91
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/92, where GetParam() = 92
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/93, where GetParam() = 93
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/179, where GetParam() = 179
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/180, where GetParam() = 180
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/181, where GetParam() = 181
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/182, where GetParam() = 182
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/183, where GetParam() = 183
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/184, where GetParam() = 184
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/185, where GetParam() = 185
[  FAILED  ] t8_gtest_cmesh_copy/t8_cmesh_copy.test_cmesh_copy/186, where GetParam() = 186

Related to: https://github.com/DLR-AMR/t8code/issues/96

For this issue, tests have already been implemented at https://github.com/DLR-AMR/t8code/pull/921 Remember to activate the tests by removing any GTEST_SKIP() macros when you start working on this issue.

holke avatar Feb 05 '24 08:02 holke

The test fails for 3 reasons, 2 of which I could eliminate in the branch fix_cmesh-copy: https://github.com/DLR-AMR/t8code/compare/main...fix_cmesh-copy

  1. Bad test (faulty reference counting)
  2. Not enough safeguards for empty cmesh
  3. Weird shmem error for cmesh constructed from p4est connectivity
Abort(872074797) on node 0 (rank 0 in comm 0): Fatal error in internal_Win_unlock: Invalid MPI_Win, error stack:
internal_Win_unlock(85): MPI_Win_unlock(rank=0, win=0x0) failed
internal_Win_unlock(43): Invalid MPI_Win

The last error could be related to #903

lukasdreyer avatar Jun 18 '24 15:06 lukasdreyer

This is fixed by now, t8_gtest_cmesh_copy.cxx does not have a GTEST_SKIP() anymore

lukasdreyer avatar Jan 28 '25 08:01 lukasdreyer