Skip to content

Commit 67523bb

Browse files
authored
Disable AMReX_FLATTEN_FOR by default (#3860)
Flattening (#3855) makes compilation too slow for some codes. For example, on my desktop, the compilation time for Castro_react.cpp increased from 3 minutes to 49 minutes.
1 parent 41df2a5 commit 67523bb

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Docs/sphinx_documentation/source/BuildingAMReX.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ The list of available options is reported in the :ref:`table <tab:cmakevar>` bel
532532
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
533533
| AMReX_PROBINIT | Enable support for probin file | Platform dependent | YES, NO |
534534
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
535-
| AMReX_FLATTEN_FOR | Enable flattening of ParallelFor and similar | YES unless for Debug | YES, NO |
536-
| | functions for host code | build | |
535+
| AMReX_FLATTEN_FOR | Enable flattening of ParallelFor and similar | NO | YES, NO |
536+
| | functions for host code | | |
537537
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
538538
.. raw:: latex
539539

Tools/CMake/AMReXOptions.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,7 @@ endif ()
377377

378378
print_option( AMReX_ASSERTIONS )
379379

380-
if ( "${CMAKE_BUILD_TYPE}" MATCHES "Debug" )
381-
option( AMReX_FLATTEN_FOR "Enable flattening of ParallelFor and other similar functions" OFF)
382-
else ()
383-
option( AMReX_FLATTEN_FOR "Enable flattening of ParallelFor and other similar functions" ON)
384-
endif ()
380+
option( AMReX_FLATTEN_FOR "Enable flattening of ParallelFor and other similar functions" OFF)
385381
print_option( AMReX_FLATTEN_FOR )
386382

387383
option(AMReX_BOUND_CHECK "Enable bound checking in Array4 class" OFF)

Tools/GNUMake/Make.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ endif
314314
ifdef USE_FLATTEN_FOR
315315
USE_FLATTEN_FOR := $(strip $(USE_FLATTEN_FOR))
316316
else
317-
USE_FLATTEN_FOR := TRUE
317+
USE_FLATTEN_FOR := FALSE
318318
endif
319319

320320
ifdef WARN_ALL

0 commit comments

Comments
 (0)