commit/enzo-dev: 3 new changesets

1 view
Skip to first unread message

commits...@bitbucket.org

unread,
Feb 19, 2019, 11:27:16 AM2/19/19
to enzo...@googlegroups.com
3 new commits in enzo-dev:

https://bitbucket.org/enzo/enzo-dev/commits/ce524c17d76c/
Changeset: ce524c17d76c
Branch: pterjan/include-phys_constantsh-last-to-avoid-in-1539806802429
User: pterjan
Date: 2018-10-17 20:07:00+00:00
Summary: Include phys_constants.h last to avoid interfering with system headers on aarch64.

phys_constants.h defines "pc" which is the name of a field of the struct sigcontext from /usr/include/asm/sigcontext.h and struct user_regs_struct in /usr/include/sys/user.h among others.
Affected #: 1 file

diff -r bc76c0b9ebf0 -r ce524c17d76c src/enzo/Grid_FlagCellsToBeRefinedByTotalJeansLength.C
--- a/src/enzo/Grid_FlagCellsToBeRefinedByTotalJeansLength.C
+++ b/src/enzo/Grid_FlagCellsToBeRefinedByTotalJeansLength.C
@@ -16,7 +16,6 @@

#include <stdio.h>
#include <math.h>
-#include "phys_constants.h"
#include "ErrorExceptions.h"
#include "macros_and_parameters.h"
#include "typedefs.h"
@@ -26,7 +25,8 @@
#include "ExternalBoundary.h"
#include "Grid.h"
#include "hydro_rk/EOS.h"
-
+#include "phys_constants.h"
+
/* function prototypes */

int GetUnits(float *DensityUnits, float *LengthUnits,


https://bitbucket.org/enzo/enzo-dev/commits/b303733df8c5/
Changeset: b303733df8c5
Branch: pterjan/include-phys_constantsh-last-to-avoid-in-1539806802429
User: pterjan
Date: 2018-10-17 21:24:28+00:00
Summary: Also fix Grid_FlagCellsToBeRefinedByJeansLength.C on aarch64
Affected #: 1 file

diff -r ce524c17d76c -r b303733df8c5 src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C
--- a/src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C
+++ b/src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C
@@ -15,7 +15,6 @@

#include <stdio.h>
#include <math.h>
-#include "phys_constants.h"
#include "ErrorExceptions.h"
#include "macros_and_parameters.h"
#include "typedefs.h"
@@ -25,6 +24,7 @@
#include "ExternalBoundary.h"
#include "Grid.h"
#include "hydro_rk/EOS.h"
+#include "phys_constants.h"

/* function prototypes */



https://bitbucket.org/enzo/enzo-dev/commits/8a9e85f4229b/
Changeset: 8a9e85f4229b
Branch: week-of-code
User: jwise77
Date: 2019-02-19 16:27:08+00:00
Summary: Merged in pterjan/enzo-dev-1/pterjan/include-phys_constantsh-last-to-avoid-in-1539806802429 (pull request #428)

Include phys_constants.h last to avoid interfering with system headers on aarch64.

Approved-by: John Regan <johnanth...@gmail.com>
Approved-by: John Wise <jw...@physics.gatech.edu>
Approved-by: Nathan Goldbaum <ngol...@illinois.edu>
Affected #: 2 files

diff -r 86525df8b782 -r 8a9e85f4229b src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C
--- a/src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C
+++ b/src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C
@@ -15,7 +15,6 @@

#include <stdio.h>
#include <math.h>
-#include "phys_constants.h"
#include "ErrorExceptions.h"
#include "macros_and_parameters.h"
#include "typedefs.h"
@@ -25,6 +24,7 @@
#include "ExternalBoundary.h"
#include "Grid.h"
#include "hydro_rk/EOS.h"
+#include "phys_constants.h"

/* function prototypes */


diff -r 86525df8b782 -r 8a9e85f4229b src/enzo/Grid_FlagCellsToBeRefinedByTotalJeansLength.C
--- a/src/enzo/Grid_FlagCellsToBeRefinedByTotalJeansLength.C
+++ b/src/enzo/Grid_FlagCellsToBeRefinedByTotalJeansLength.C
@@ -16,7 +16,6 @@

#include <stdio.h>
#include <math.h>
-#include "phys_constants.h"
#include "ErrorExceptions.h"
#include "macros_and_parameters.h"
#include "typedefs.h"
@@ -26,7 +25,8 @@
#include "ExternalBoundary.h"
#include "Grid.h"
#include "hydro_rk/EOS.h"
-
+#include "phys_constants.h"
+
/* function prototypes */

int GetUnits(float *DensityUnits, float *LengthUnits,

Repository URL: https://bitbucket.org/enzo/enzo-dev/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

commits...@bitbucket.org

unread,
Feb 19, 2019, 1:12:43 PM2/19/19
to enzo...@googlegroups.com
3 new commits in enzo-dev:

https://bitbucket.org/enzo/enzo-dev/commits/e26fd36c8638/
Changeset: e26fd36c8638
Branch: week-of-code
User: brittonsmith
Date: 2019-02-17 21:21:37+00:00
Summary: Raise ENZO_FAIL when use_grackle = 1 but enzo not built with grackle.
Affected #: 4 files

diff -r 86525df8b782 -r e26fd36c8638 src/enzo/ReadParameterFile.C
--- a/src/enzo/ReadParameterFile.C
+++ b/src/enzo/ReadParameterFile.C
@@ -523,9 +523,9 @@
ret += sscanf(line, "DrivenFlowAutoCorrl = %"FSYM"%"FSYM"%"FSYM,
DrivenFlowAutoCorrl, DrivenFlowAutoCorrl+1, DrivenFlowAutoCorrl+2);

+ ret += sscanf(line, "use_grackle = %"ISYM, &use_grackle);
#ifdef USE_GRACKLE
/* Grackle chemistry parameters */
- ret += sscanf(line, "use_grackle = %d", &grackle_data->use_grackle);
ret += sscanf(line, "with_radiative_cooling = %d",
&grackle_data->with_radiative_cooling);
ret += sscanf(line, "use_volumetric_heating_rate = %d",
@@ -1598,7 +1598,7 @@
#ifdef USE_GRACKLE
/* If using Grackle chemistry and cooling library, override all other
cooling machinery and do a translation of some of the parameters. */
- if (grackle_data->use_grackle == TRUE) {
+ if (use_grackle == TRUE) {
// grackle_data->use_grackle already set
// grackle_data->with_radiative_cooling already set
// grackle_data->grackle_data_file already set
@@ -1606,6 +1606,7 @@
// grackle_data->Compton_xray_heating already set
// grackle_data->LWbackground_intensity already set
// grackle_data->LWbackground_sawtooth_suppression already set
+ grackle_data->use_grackle = (Eint32) use_grackle;
grackle_data->Gamma = (double) Gamma;
grackle_data->primordial_chemistry = (Eint32) MultiSpecies;
grackle_data->metal_cooling = (Eint32) MetalCooling;
@@ -1668,6 +1669,10 @@
} // if (grackle_data->use_grackle == TRUE)

else {
+#else
+ if (use_grackle == TRUE) {
+ ENZO_FAIL("Error: Enzo must be compiled with 'make grackle-yes' to run with use_grackle = 1.\n");
+ }
#endif // USE_GRACKLE

/* If GadgetEquilibriumCooling == TRUE, we don't want MultiSpecies

diff -r 86525df8b782 -r e26fd36c8638 src/enzo/SetDefaultGlobalValues.C
--- a/src/enzo/SetDefaultGlobalValues.C
+++ b/src/enzo/SetDefaultGlobalValues.C
@@ -481,6 +481,7 @@
CloudyCoolingData.CMBTemperatureFloor = 1; // use CMB floor.
CloudyCoolingData.CloudyElectronFractionFactor = 9.153959e-3; // calculated using Cloudy 07.02 abundances

+ use_grackle = FALSE;
#ifdef USE_GRACKLE
// Grackle chemistry data structure.
chemistry_data *my_chemistry;

diff -r 86525df8b782 -r e26fd36c8638 src/enzo/WriteParameterFile.C
--- a/src/enzo/WriteParameterFile.C
+++ b/src/enzo/WriteParameterFile.C
@@ -483,9 +483,9 @@
fprintf(fptr, "DrivenFlowProfile = %"ISYM"\n", DrivenFlowProfile);
if (DrivenFlowProfile)
Forcing.WriteParameters(fptr);
+ fprintf(fptr, "use_grackle = %"ISYM"\n", use_grackle);
#ifdef USE_GRACKLE
/* Grackle chemistry parameters */
- fprintf(fptr, "use_grackle = %d\n", grackle_data->use_grackle);
fprintf(fptr, "with_radiative_cooling = %d\n", grackle_data->with_radiative_cooling);
fprintf(fptr, "use_volumetric_heating_rate = %d\n", grackle_data->use_volumetric_heating_rate);
fprintf(fptr, "use_specific_heating_rate = %d\n", grackle_data->use_specific_heating_rate);

diff -r 86525df8b782 -r e26fd36c8638 src/enzo/global_data.h
--- a/src/enzo/global_data.h
+++ b/src/enzo/global_data.h
@@ -349,6 +349,7 @@
EXTERN int RadiativeCooling;
EXTERN CoolDataType CoolData;
EXTERN int RadiativeCoolingModel;
+EXTERN int use_grackle;

/* Cloudy cooling parameters and data. */



https://bitbucket.org/enzo/enzo-dev/commits/be3f2e388eec/
Changeset: be3f2e388eec
Branch: week-of-code
User: brittonsmith
Date: 2019-02-19 17:48:00+00:00
Summary: Remove comment.
Affected #: 1 file

diff -r e26fd36c8638 -r be3f2e388eec src/enzo/ReadParameterFile.C
--- a/src/enzo/ReadParameterFile.C
+++ b/src/enzo/ReadParameterFile.C
@@ -1599,7 +1599,6 @@
/* If using Grackle chemistry and cooling library, override all other
cooling machinery and do a translation of some of the parameters. */
if (use_grackle == TRUE) {
- // grackle_data->use_grackle already set
// grackle_data->with_radiative_cooling already set
// grackle_data->grackle_data_file already set
// grackle_data->UVbackground already set


https://bitbucket.org/enzo/enzo-dev/commits/34ea7319c8c2/
Changeset: 34ea7319c8c2
Branch: week-of-code
User: gbryan
Date: 2019-02-19 18:12:37+00:00
Summary: Merged in brittonsmith/enzo-dev (pull request #432)

[bugfix] exit cleanly when use_grackle = 1 but enzo not built with grackle

Approved-by: Brian O'Shea <os...@msu.edu>
Approved-by: Greg Bryan <gbr...@astro.columbia.edu>
Approved-by: John Wise <jw...@physics.gatech.edu>
Affected #: 4 files

diff -r 8a9e85f4229b -r 34ea7319c8c2 src/enzo/ReadParameterFile.C
--- a/src/enzo/ReadParameterFile.C
+++ b/src/enzo/ReadParameterFile.C
@@ -523,9 +523,9 @@
ret += sscanf(line, "DrivenFlowAutoCorrl = %"FSYM"%"FSYM"%"FSYM,
DrivenFlowAutoCorrl, DrivenFlowAutoCorrl+1, DrivenFlowAutoCorrl+2);

+ ret += sscanf(line, "use_grackle = %"ISYM, &use_grackle);
#ifdef USE_GRACKLE
/* Grackle chemistry parameters */
- ret += sscanf(line, "use_grackle = %d", &grackle_data->use_grackle);
ret += sscanf(line, "with_radiative_cooling = %d",
&grackle_data->with_radiative_cooling);
ret += sscanf(line, "use_volumetric_heating_rate = %d",
@@ -1598,14 +1598,14 @@
#ifdef USE_GRACKLE
/* If using Grackle chemistry and cooling library, override all other
cooling machinery and do a translation of some of the parameters. */
- if (grackle_data->use_grackle == TRUE) {
- // grackle_data->use_grackle already set
+ if (use_grackle == TRUE) {
// grackle_data->with_radiative_cooling already set
// grackle_data->grackle_data_file already set
// grackle_data->UVbackground already set
// grackle_data->Compton_xray_heating already set
// grackle_data->LWbackground_intensity already set
// grackle_data->LWbackground_sawtooth_suppression already set
+ grackle_data->use_grackle = (Eint32) use_grackle;
grackle_data->Gamma = (double) Gamma;
grackle_data->primordial_chemistry = (Eint32) MultiSpecies;
grackle_data->metal_cooling = (Eint32) MetalCooling;
@@ -1668,6 +1668,10 @@
} // if (grackle_data->use_grackle == TRUE)

else {
+#else
+ if (use_grackle == TRUE) {
+ ENZO_FAIL("Error: Enzo must be compiled with 'make grackle-yes' to run with use_grackle = 1.\n");
+ }
#endif // USE_GRACKLE

/* If GadgetEquilibriumCooling == TRUE, we don't want MultiSpecies

diff -r 8a9e85f4229b -r 34ea7319c8c2 src/enzo/SetDefaultGlobalValues.C
--- a/src/enzo/SetDefaultGlobalValues.C
+++ b/src/enzo/SetDefaultGlobalValues.C
@@ -481,6 +481,7 @@
CloudyCoolingData.CMBTemperatureFloor = 1; // use CMB floor.
CloudyCoolingData.CloudyElectronFractionFactor = 9.153959e-3; // calculated using Cloudy 07.02 abundances

+ use_grackle = FALSE;
#ifdef USE_GRACKLE
// Grackle chemistry data structure.
chemistry_data *my_chemistry;

diff -r 8a9e85f4229b -r 34ea7319c8c2 src/enzo/WriteParameterFile.C
--- a/src/enzo/WriteParameterFile.C
+++ b/src/enzo/WriteParameterFile.C
@@ -483,9 +483,9 @@
fprintf(fptr, "DrivenFlowProfile = %"ISYM"\n", DrivenFlowProfile);
if (DrivenFlowProfile)
Forcing.WriteParameters(fptr);
+ fprintf(fptr, "use_grackle = %"ISYM"\n", use_grackle);
#ifdef USE_GRACKLE
/* Grackle chemistry parameters */
- fprintf(fptr, "use_grackle = %d\n", grackle_data->use_grackle);
fprintf(fptr, "with_radiative_cooling = %d\n", grackle_data->with_radiative_cooling);
fprintf(fptr, "use_volumetric_heating_rate = %d\n", grackle_data->use_volumetric_heating_rate);
fprintf(fptr, "use_specific_heating_rate = %d\n", grackle_data->use_specific_heating_rate);

diff -r 8a9e85f4229b -r 34ea7319c8c2 src/enzo/global_data.h
--- a/src/enzo/global_data.h
+++ b/src/enzo/global_data.h
@@ -349,6 +349,7 @@
EXTERN int RadiativeCooling;
EXTERN CoolDataType CoolData;
EXTERN int RadiativeCoolingModel;
+EXTERN int use_grackle;

/* Cloudy cooling parameters and data. */
Reply all
Reply to author
Forward
0 new messages