@@ -20,33 +20,33 @@ module m_checker_common
2020contains
2121
2222 !> Checks compatibility of parameters in the input file. Used by all three stages
23- impure subroutine s_check_inputs_common
23+ impure subroutine s_check_inputs_common ( check_total_cells , n_global )
2424
25- #ifndef MFC_SIMULATION
26- call s_check_total_cells
27- #endif
25+ logical , intent (in ) :: check_total_cells
26+ integer (kind= 8 ), intent (in ) :: n_global
27+
28+ if (check_total_cells) call s_check_total_cells(n_global)
2829 #:if USING_AMD
2930 call s_check_amd
3031 #:endif
3132
3233 end subroutine s_check_inputs_common
3334
34- #ifndef MFC_SIMULATION
3535 !> Verify that the total number of grid cells meets the minimum required by the number of dimensions and MPI ranks.
36- impure subroutine s_check_total_cells
36+ impure subroutine s_check_total_cells ( n_global )
3737
38- character (len= 18 ) :: numStr !< for int to string conversion
39- integer (kind= 8 ) :: min_cells
38+ character (len= 18 ) :: numStr !< for int to string conversion
39+ integer (kind= 8 ) :: min_cells
40+ integer (kind= 8 ), intent (in ) :: n_global
4041
4142 min_cells = int (2 , kind= 8 )** int (min (1 , m) + min (1 , n) + min (1 , p), kind= 8 )* int (num_procs, kind= 8 )
4243 call s_int_to_str(2 ** (min (1 , m) + min (1 , n) + min (1 , p))* num_procs, numStr)
4344
44- @:PROHIBIT(nGlobal < min_cells, &
45+ @:PROHIBIT(n_global < min_cells, &
4546 & " Total number of cells must be at least (2^[number of dimensions])*num_procs, " // " which is currently " &
4647 & // trim (numStr))
4748
4849 end subroutine s_check_total_cells
49- #endif
5050
5151 !> Check that simulation parameters stay within AMD GPU compiler limits when case optimization is disabled.
5252 impure subroutine s_check_amd
@@ -59,6 +59,4 @@ contains
5959
6060 end subroutine s_check_amd
6161
62- #ifndef MFC_POST_PROCESS
63- #endif
6462end module m_checker_common
0 commit comments