Skip to content

Commit

Permalink
skip unity build for two files
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhei committed Jun 2, 2024
1 parent c8ee1d0 commit e6f5301
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 30 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,12 @@ set(ASPECT_MAIN_FILE "source/main.cc")
# required to not have specializations (for example helper_functions.cc)
# appear after explicit class instantiation (for example core.cc) of the same
# class that happen to be included in the same unity cxx file.
set(UNITY_LAST_FILES
set(UNITY_SEPARATE_FILES
"source/simulator/core.cc;source/volume_of_fluid/handler.cc")

foreach(_source_file ${UNITY_LAST_FILES})
foreach(_source_file ${UNITY_SEPARATE_FILES})
set(_full_name "${CMAKE_SOURCE_DIR}/${_source_file}")
list(FIND ASPECT_SOURCE_FILES ${_full_name} _index)
if(_index EQUAL -1)
message(FATAL_ERROR "could not find ${_full_name}.")
endif()

list(REMOVE_ITEM ASPECT_SOURCE_FILES ${_full_name})
list(APPEND ASPECT_SOURCE_FILES ${_full_name})
set_property(SOURCE ${_full_name} PROPERTY SKIP_UNITY_BUILD_INCLUSION TRUE)
endforeach()


Expand Down
4 changes: 3 additions & 1 deletion tests/advection_solver_fail/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Number of degrees of freedom: 2,724 (1,666+225+833)

*** Timestep 0: t=0 years, dt=0 years
Solving temperature system... retrying linear solve with different preconditioner...
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
Expand All @@ -23,7 +25,7 @@ Additional information:

The initial residual was: 6.012476e+05
The final residual is: 9.049629e-11
The required residual for convergence is: 5.533280e-14
The required residual for convergence is: 1.000000e-50
See output-advection_solver_fail/solver_history.txt for the full
convergence history.

Expand Down
18 changes: 4 additions & 14 deletions tests/nonlinear_failure_strategy_cut/screen-output
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

Loading shared library <./libnonlinear_failure_strategy_cut.debug.so>

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Number of active cells: 512 (on 5 levels)
Number of degrees of freedom: 9,141 (4,290+561+2,145+2,145)

*** Timestep 0: t=0 years, dt=0 years
Solving temperature system... 0 iterations.
Skipping porosity composition solve because RHS is zero.
Rebuilding Stokes preconditioner...
Solving Stokes system... 57+0 iterations.
Solving Stokes system... 58+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.02441e-16, 0, 1
Relative nonlinear residual (total system) after nonlinear iteration 1: 1

Solving temperature system... 0 iterations.
Skipping porosity composition solve because RHS is zero.
Solving Stokes system... 3+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.02441e-16, 0, 1.00035e-12
Relative nonlinear residual (total system) after nonlinear iteration 2: 1.00035e-12
Solving Stokes system... 1+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.02441e-16, 0, 5.21493e-13
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.21493e-13


Postprocessing:
Expand Down Expand Up @@ -129,9 +124,4 @@ Repeating the current time step based on the time stepping manager ...
Termination requested by criterion: end time


+----------------------------------------------+------------+------------+
+----------------------------------+-----------+------------+------------+
+----------------------------------+-----------+------------+------------+

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
8 changes: 4 additions & 4 deletions tests/nonlinear_failure_strategy_cut/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# 11: Iterations for Stokes solver
# 12: Velocity iterations in Stokes preconditioner
# 13: Schur complement iterations in Stokes preconditioner
0 0.000000000000e+00 0.000000000000e+00 512 4851 2145 2145 2 0 0 58 60 59
1 6.625491997652e+03 6.625491997652e+03 512 4851 2145 2145 8 83 0 338 346 346
2 1.928018171317e+04 1.265468971551e+04 512 4851 2145 2145 4 40 0 156 160 160
3 2.000000000000e+04 7.198182868337e+02 512 4851 2145 2145 2 15 0 73 75 75
0 0.000000000000e+00 0.000000000000e+00 512 4851 2145 2145 2 0 0 57 62 61
1 6.625491997652e+03 6.625491997652e+03 512 4851 2145 2145 8 83 0 338 356 356
2 1.928018171317e+04 1.265468971551e+04 512 4851 2145 2145 4 40 0 156 165 165
3 2.000000000000e+04 7.198182868339e+02 512 4851 2145 2145 2 15 0 73 77 77
3 changes: 2 additions & 1 deletion tests/stokes_solver_fail/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Number of degrees of freedom: 2,724 (1,666+225+833)
*** Timestep 0: t=0 years, dt=0 years
Solving temperature system... 0 iterations.
Rebuilding Stokes preconditioner...
Solving Stokes system... 200+---------------------------------------------------------
Solving Stokes system... 200+WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
Expand Down
2 changes: 2 additions & 0 deletions tests/stokes_solver_fail_cheap/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Number of degrees of freedom: 2,724 (1,666+225+833)
Solving temperature system... 0 iterations.
Rebuilding Stokes preconditioner...
Solving Stokes system... 200+0 iterations.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
Expand Down
3 changes: 2 additions & 1 deletion tests/stokes_solver_fail_gmg/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Number of degrees of freedom: 2,724 (1,666+225+833)

*** Timestep 0: t=0 years, dt=0 years
Solving temperature system... 0 iterations.
Solving Stokes system... 200+---------------------------------------------------------
Solving Stokes system... 200+WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
Expand Down
2 changes: 2 additions & 0 deletions tests/zero_matrix/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Number of degrees of freedom: 22,216 (8,442+1,111+4,221+4,221+4,221)
RMS, max velocity: 0.0102 m/year, 0.0103 m/year

*** Timestep 1: t=48350 years, dt=48350 years
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
Expand Down

0 comments on commit e6f5301

Please sign in to comment.