From 135c5493a1972b006bc48e22b1c9e48c33b27e97 Mon Sep 17 00:00:00 2001 From: ojwg Date: Fri, 27 Oct 2023 15:02:22 -0400 Subject: [PATCH 1/2] Deprecate BLOCK macro --- builds/make.inc.template | 2 +- builds/make.type.cloudy | 1 - builds/make.type.cooling | 1 - builds/make.type.dust | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/builds/make.inc.template b/builds/make.inc.template index 22fbd663d..4c09d085f 100644 --- a/builds/make.inc.template +++ b/builds/make.inc.template @@ -7,7 +7,7 @@ DFLAGS += -DCUDA #-DCUDA_ERROR_CHECK #To use MPI, DFLAGS must include -DMPI_CHOLLA -DFLAGS += -DMPI_CHOLLA -DBLOCK +DFLAGS += -DMPI_CHOLLA #Set the MPI Processes grid [nproc_x, nproc_y, nproc_z] #DFLAGS += -DSET_MPI_GRID diff --git a/builds/make.type.cloudy b/builds/make.type.cloudy index e604ff818..86e43315b 100644 --- a/builds/make.type.cloudy +++ b/builds/make.type.cloudy @@ -8,7 +8,6 @@ MPI_GPU ?= DFLAGS += -DCUDA DFLAGS += -DMPI_CHOLLA -DFLAGS += -DBLOCK DFLAGS += -DPRECISION=2 DFLAGS += -DPPMP DFLAGS += -DHLLC diff --git a/builds/make.type.cooling b/builds/make.type.cooling index baf4ed0e9..85dedc25d 100644 --- a/builds/make.type.cooling +++ b/builds/make.type.cooling @@ -8,7 +8,6 @@ MPI_GPU ?= DFLAGS += -DCUDA DFLAGS += -DMPI_CHOLLA -DFLAGS += -DBLOCK DFLAGS += -DPRECISION=2 DFLAGS += -DPPMP DFLAGS += -DHLLC diff --git a/builds/make.type.dust b/builds/make.type.dust index 0be259763..24e27e30f 100644 --- a/builds/make.type.dust +++ b/builds/make.type.dust @@ -8,7 +8,6 @@ MPI_GPU ?= DFLAGS += -DCUDA DFLAGS += -DMPI_CHOLLA -DFLAGS += -DBLOCK DFLAGS += -DPRECISION=2 DFLAGS += -DPPMC DFLAGS += -DHLLC From c0c6f3a6cddb28c84ee852b8d1f7b3f045ea56f9 Mon Sep 17 00:00:00 2001 From: ojwg Date: Fri, 27 Oct 2023 15:34:19 -0400 Subject: [PATCH 2/2] fix broken 'cloudy' build --- src/analysis/analysis.cpp | 4 ++-- src/cooling/load_cloudy_texture.cu | 4 ++-- src/global/global.h | 2 +- src/gravity/potential_SOR_3D.cpp | 4 ++-- src/utils/timing_functions.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/analysis/analysis.cpp b/src/analysis/analysis.cpp index 9b927daaa..d9eede2f1 100644 --- a/src/analysis/analysis.cpp +++ b/src/analysis/analysis.cpp @@ -13,7 +13,7 @@ void Grid3D::Compute_Lya_Statistics() { int axis, n_skewers; Real time_start, time_end, time_elapsed; - time_start = get_time(); + time_start = Get_Time(); // Copmpute Lya Statitics chprintf("Computing Lya Absorbiton along skewers \n"); @@ -70,7 +70,7 @@ void Grid3D::Compute_Lya_Statistics() // Analysis.Computed_Flux_Power_Spectrum = 0; // } - time_end = get_time(); + time_end = Get_Time(); time_elapsed = (time_end - time_start) * 1000; chprintf("Analysis Time: %f9.1 ms \n", time_elapsed); } diff --git a/src/cooling/load_cloudy_texture.cu b/src/cooling/load_cloudy_texture.cu index e0022fbb5..e1a02dc28 100644 --- a/src/cooling/load_cloudy_texture.cu +++ b/src/cooling/load_cloudy_texture.cu @@ -273,12 +273,12 @@ void Test_Cloudy_Speed() dim3 dim1dGrid((num_n * num_T + TPB - 1) / TPB, 1, 1); dim3 dim1dBlock(TPB, 1, 1); CHECK(cudaDeviceSynchronize()); - Real time_start = get_time(); + Real time_start = Get_Time(); for (int i = 0; i < 100; i++) { hipLaunchKernelGGL(Test_Cloudy_Speed_Kernel, dim1dGrid, dim1dBlock, 0, 0, num_n, num_T, coolTexObj, heatTexObj); } CHECK(cudaDeviceSynchronize()); - Real time_end = get_time(); + Real time_end = Get_Time(); printf(" Cloudy Test Time %9.4f micro-s \n", (time_end - time_start)); printf("Exiting due to Test_Cloudy_Speed() being called \n"); exit(0); diff --git a/src/global/global.h b/src/global/global.h index 8e7c1b76a..8abe358fc 100644 --- a/src/global/global.h +++ b/src/global/global.h @@ -147,7 +147,7 @@ extern float *heating_table; * \brief Set gamma values for Riemann solver. */ extern void Set_Gammas(Real gamma_in); -/*! \fn double get_time(void) +/*! \fn double Get_Time(void) * \brief Returns the current clock time. */ extern double Get_Time(void); diff --git a/src/gravity/potential_SOR_3D.cpp b/src/gravity/potential_SOR_3D.cpp index 403b31cf6..2fdd9a91f 100644 --- a/src/gravity/potential_SOR_3D.cpp +++ b/src/gravity/potential_SOR_3D.cpp @@ -157,7 +157,7 @@ void Grid3D::Get_Potential_SOR(Real Grav_Constant, Real dens_avrg, Real current_ { #ifdef TIME_SOR Real time_start, time_end, time; - time_start = get_time(); + time_start = Get_Time(); #endif Grav.Poisson_solver.Copy_Input_And_Initialize(Grav.F.density_h, Grav.F.potential_h, Grav_Constant, dens_avrg, @@ -233,7 +233,7 @@ void Grid3D::Get_Potential_SOR(Real Grav_Constant, Real dens_avrg, Real current_ #ifdef MPI_CHOLLA MPI_Barrier(world); #endif - time_end = get_time(); + time_end = Get_Time(); time = (time_end - time_start); chprintf(" SOR: Time = %f seg\n", time); #endif diff --git a/src/utils/timing_functions.h b/src/utils/timing_functions.h index 20daf0333..96cceea15 100644 --- a/src/utils/timing_functions.h +++ b/src/utils/timing_functions.h @@ -3,7 +3,7 @@ #include -#include "../global/global.h" // Provides Real, get_time +#include "../global/global.h" // Provides Real, Get_Time // #ifdef CPU_TIME // Each instance of this class represents a single timer, timing a single