From 322963a721e60c3a166b24c61ad88778599131f2 Mon Sep 17 00:00:00 2001 From: Miren Radia Date: Fri, 20 Dec 2024 16:32:41 +0000 Subject: [PATCH 1/3] Build: Remove default TMP_BUILD_DIR I think this will help with #68. The disadvantage (and the reason I bothered to set this default in the first place) is that consecutive builds of different AMReX executables (e.g. two different examples) will be slower. To mitigate this, users should use Ccache. I will add this to the CI in a separate PR. --- Tools/GNUMake/Make.defaults | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Tools/GNUMake/Make.defaults b/Tools/GNUMake/Make.defaults index 4cfd16c5..96c9becd 100644 --- a/Tools/GNUMake/Make.defaults +++ b/Tools/GNUMake/Make.defaults @@ -23,9 +23,4 @@ DIM = 3 BL_NO_FORT = TRUE AMREX_NO_PROBINIT = TRUE -CXXSTD = c++17 - -GRTECLYN_HOME ?= $(realpath ../..) - -# Use a common temporary build directory for all GRTeclyn applications -TMP_BUILD_DIR ?= $(GRTECLYN_HOME)/tmp_build_dir \ No newline at end of file +CXXSTD = c++17 \ No newline at end of file From 9fc92c4e49397020a18eddf95f7575f47842b342 Mon Sep 17 00:00:00 2001 From: Miren Radia Date: Fri, 20 Dec 2024 16:42:54 +0000 Subject: [PATCH 2/3] README: Update for removal of default TMP_BUILD_DIR --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 864b1c9d..9c800db3 100644 --- a/README.md +++ b/README.md @@ -122,10 +122,9 @@ processes, do ```bash make -j 4 ``` -A new `tmp_build_dir` directory will be created under `~/GRTeclyn` to store the -compiled object and auxiliary files. Assuming all is well, you should have an -executable in the current directory of the form `main.ex` e.g. -`main3d.gnu.MPI.OMP.ex`. +A new `tmp_build_dir` directory will be created to store the compiled object and +auxiliary files. Assuming all is well, you should have an executable in the +current directory of the form `main.ex` e.g. `main3d.gnu.MPI.OMP.ex`. ## Running the code From 1444aa8fc349cfaa12bc7294947fa5c7ba49b1a8 Mon Sep 17 00:00:00 2001 From: Miren Radia Date: Fri, 20 Dec 2024 16:52:52 +0000 Subject: [PATCH 3/3] README: Add clean and ccache instructions --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 9c800db3..33de686f 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,25 @@ A new `tmp_build_dir` directory will be created to store the compiled object and auxiliary files. Assuming all is well, you should have an executable in the current directory of the form `main.ex` e.g. `main3d.gnu.MPI.OMP.ex`. +If you want to clean the current build configuration you can do +```bash +make cleanconfig +``` +Note that this is similar to `make clean` for GRChombo examples. + +If you want to clean all build configuration, you can do +```bash +make clean +``` +Note that this is similar to `make realclean` for GRChombo examples. + +To speed up subsequent compilations, you can install +[Ccache](https://ccache.dev/) and then add +``` +USE_CCACHE = TRUE +``` +to your `Make.local-pre` configuration file. + ## Running the code You can run the example as for GRChombo by passing the parameter file as the