LLNL / serac

Serac is a high order nonlinear thermomechanical simulation code
BSD 3-Clause "New" or "Revised" License
189 stars 33 forks source link

tests failing on `develop` with mac #965

Open samuelpmishLLNL opened 1 year ago

samuelpmishLLNL commented 1 year ago

At the time of writing, checking out develop and building/running ctest results in 2 failures:

The following tests FAILED:
         27 - boundary_cond (Failed)
         41 - solid_shape (Failed)

the solid_shape one is just a tolerance issue, slightly loosening the tolerance fixes it. The failure in boundary_cond is more subtle:

27: Mesh::GeneratePartitioning(...): edgecut = 17
27: /Users/mish2/code/serac/src/serac/physics/boundary_conditions/tests/boundary_cond.cpp:84: Failure
27: Expected equality of these values:
27:   local_dofs[0]
27:     Which is: 5
27:   6
27: 
27: /Users/mish2/code/serac/src/serac/physics/boundary_conditions/tests/boundary_cond.cpp:85: Failure
27: Expected equality of these values:
27:   local_dofs[1]
27:     Which is: 51
27:   53

These are the relevant lines of code indicated in the error message:

  if (rank == 0) {
    EXPECT_EQ(local_dofs.Size(), 1);
    EXPECT_EQ(local_dofs[0], 1);
  } else if (rank == 1) {
    EXPECT_EQ(local_dofs.Size(), 2);
    EXPECT_EQ(local_dofs[0], 6);
    EXPECT_EQ(local_dofs[1], 53);
  }

I don't understand what this code is doing well enough to diagnose further.

jamiebramwell commented 1 year ago

I'm looking at this...

jamiebramwell commented 1 year ago

My best guess is the partitioning on Mac vs. Linux systems is slightly different due to random seed generation in ParMETIS. @white238 , do you think we should remove this test or just keep it as an expected failure on mac?

samuelpmishLLNL commented 1 year ago

Maybe the test could be modified to check something that's invariant under change of partitioning? For example, rather than just marking specific dofs, mark all the ones satisfying some geometric predicate (e.g. nodes with x coordinate less than 4), and aggregate the local dofs to one processor to check.

jamiebramwell commented 1 year ago

Maybe the test could be modified to check something that's invariant under change of partitioning? For example, rather than just marking specific dofs, mark all the ones satisfying some geometric predicate (e.g. nodes with x coordinate less than 4), and aggregate the local dofs to one processor to check.

Good idea! I'll go implement that.