galacticusorg / galacticus

The Galacticus galaxy formation model
GNU General Public License v3.0
27 stars 17 forks source link

[Bug]: bug with massResolutionFraction parameter validation #679

Closed cgannonucm closed 2 months ago

cgannonucm commented 2 months ago

Contact Details

cgannon@ucmerced.edu

What happened?

When attempting to build trees using fractional mass resolution, ex:

<mergerTreeMassResolution value="scaled">
    <massResolutionMinimum value="1.0e+7" />
    <massResolutionFractional value="1.0E-3"/>
</mergerTreeMassResolution>

parameter validation fails with the following error: parameter [massResolution] not present and no default given This issue can be worked around by simply adding a redundant <massResolution value="1.00" /> tag.

Build information

Ideally, run ./Galacticus.exe parameters/report.xml which will provide a detailed report and paste the output here. ##

© 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024

MM: -> Begin task: report MM: This is Galacticus: revision 550ec2bb0e90ab60c75fdae7fb8962b5dc225068 (branch: master; build time: Sat Aug 24 19:50:31 UTC 2024) MM: Built with: :GSL_version[2.6]:FoX_version[4.1.0]:HDF5_version[1.8.20]:FCCOMPILER[gfortran]:PREPROCESSOR[cpp]:CCOMPILER[gcc]:CPPCOMPILER[g++]:FCFLAGS[-ffree-line-length-none -frecursive -DBUILDPATH='./work/build' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/lib/gfortran/modules -L/usr/local/lib -L/usr/local/lib64 -fuse-ld=bfd -DTHREADSAFEIO -static -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -DSTATIC -g -DPROCPS -DOFDAVAIL -DFFTW3AVAIL -DANNAVAIL -DQHULLAVAIL -DMATHEVALAVAIL]:FCFLAGS_NOOPT[-ffree-line-length-none -frecursive -DBUILDPATH='./work/build' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/lib/gfortran/modules -L/usr/local/lib -L/usr/local/lib64 -fuse-ld=bfd -DTHREADSAFEIO -static -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -g]:CFLAGS[-fopenmp -DSTATIC -DBUILDPATH='./work/build' -I./source/ -I./work/build/ -fuse-ld=bfd -g -DOFDLOCKS -DPROCPS -DOFDAVAIL -DGIT2UNAVAIL]:CPPFLAGS[-fopenmp -DSTATIC -DBUILDPATH='./work/build' -I./source/ -I./work/build/ -fuse-ld=bfd -I/usr/local/include/libqhullcpp -g -DOFDLOCKS -DPROCPS -DOFDAVAIL -DANNAVAIL -DQHULLAVAIL -DMATHEVALAVAIL -DGIT2UNAVAIL]:FCCOMPILER_VERSION[Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/gcc-12/libexec/gcc/x86_64-pc-linux-gnu/12.4.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-12-source/gcc-12-20240801/configure --enable-languages=c,c++,fortran --enable-checking=release --disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold --with-plugin-ld=gold --prefix=/usr/local/gcc-12 Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.4.1 20240801 (GCC) ]:CCOMPILER_VERSION[Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-12/libexec/gcc/x86_64-pc-linux-gnu/12.4.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-12-source/gcc-12-20240801/configure --enable-languages=c,c++,fortran --enable-checking=release --disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold --with-plugin-ld=gold --prefix=/usr/local/gcc-12 Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.4.1 20240801 (GCC) ]:CPPCOMPILER_VERSION[Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/gcc-12/libexec/gcc/x86_64-pc-linux-gnu/12.4.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-12-source/gcc-12-20240801/configure --enable-languages=c,c++,fortran --enable-checking=release --disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold --with-plugin-ld=gold --prefix=/usr/local/gcc-12 Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.4.1 20240801 (GCC) ] MM: <- Done task: report

What operating system are you running Galacticus on?

Linux

How did you obtain Galacticus?

Pre-built executable

Relevant error message output

##                                     
   ####        #                  #                  
  #   #        #             #                       
 #       ###   #  ###   ### ###  ##   ### ## ##   ## 
 #       #  #  #  #  # #  #  #    #  #  #  #  #  #   
 #   ###  ###  #   ### #     #    #  #     #  #   #  
  #   #  #  #  #  #  # #     #    #  #     #  #    # 
   ####  #### ### ####  ###   ## ###  ###   #### ##  

 © 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
   2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024
   - Andrew Benson

MM: NOTE: datasets are being read from datasets-master/
Fatal error:
parameter [massResolution] not present and no default given
 Occurred at:
   subroutine:inputParametersValueNameDouble
       module:Input_Parameters
         file:utility.input_parameters.F90   [line 1531]
  => Error occurred in master thread
  => Command line was: ./galacticus.exe galacticus-master/parameters/test-massresolutionfractional.xml
  => The following warnings were issued:
 Using default value for parameter '[errorWaitTime]'
 Using default value for parameter '[componentBlackHole/tripleInteraction]'
 Using default value for parameter '[componentDisk/toleranceAbsoluteMass]'
 Using default value for parameter '[componentSatellite/initializationTypeMassBound]'
 Using default value for parameter '[componentSpheroid/efficiencyEnergeticOutflow]'
 Using default value for parameter '[stellarPopulationSpectraPostprocessorBuilder/names]'
 Using default class for parameter '[stellarPopulationSpectraPostprocessor]'
 Using default class for parameter '[stellarPopulationSpectraPostprocessorBuilder]'
 Using default value for parameter '[task/walltimeMaximum]'
 Using default value for parameter '[mergerTreeConstructor/timeSnapTolerance]'
 Using default value for parameter '[mergerTreeBuilder/toleranceTimeEarliest]'
 Using default value for parameter '[mergerTreeBranchingProbability/precisionHypergeometric]'
 Using default value for parameter '[powerSpectrumPrimordial/runningRunning]'
 Using default value for parameter '[transferFunction/cambCountPerDecade]'
 Using default class for parameter '[powerSpectrumWindowFunction]'
 Using default value for parameter '[cosmologicalMassVariance/toleranceTopHat]'
 Using default value for parameter '[criticalOverdensity/normalization]'
 Using default value for parameter '[mergerTreeMassResolution/massResolutionMaximum]'
 Using default class for parameter '[mergerTreeBuildController]'
 Using default value for parameter '[mergerTreeBuildMassDistribution/modifier1]'
 Using default class for parameter '[haloEnvironment]'
 Using default value for parameter '[randomNumberGenerator/ompThreadOffset]'
 Using default class for parameter '[mergerTreeOperator]'
 Using default value for parameter '[virialDensityContrast/tableStore]'
 Using default class for parameter '[darkMatterHaloScale]'
 Using default value for parameter '[darkMatterProfileScaleRadius/darkMatterProfileScaleRadius/useMeanConcentration]'
 Using default value for parameter '[darkMatterProfileDMO/velocityDispersionApproximate]'
 Using default value for parameter '[darkMatterProfileDMO/darkMatterProfileDMO/velocityDispersionUseSeriesExpansion]'
 Using default value for parameter '[darkMatterProfileHeating/coefficientSecondOrder1]'
 Using default value for parameter '[darkMatterProfileConcentration/darkMatterProfileScaleRadius/darkMatterProfileScaleRadius/kappa]'
 Using default value for parameter '[nodeOperator/nodeOperator/angularMomentumVarianceSpecific]'
 Using default value for parameter '[darkMatterProfile/radiusFractionalPivot]'
 Using default class for parameter '[galacticStructure]'
 Using default value for parameter '[satelliteTidalStrippingRadius/applyPreInfall]'

Program aborted. Backtrace:
#0  0x8217c4 in __error_MOD_error_report_char
    at ./work/build/error.p.F90:193
#1  0x24ba19b in __input_parameters_MOD_inputparametersvaluenamedouble
    at ./work/build/utility.input_parameters.p.F90:2314
#2  0x24ca92c in __input_parameters_MOD_inputparametersvaluenodedouble
    at ./work/build/utility.input_parameters.p.F90:4010
#3  0x24b9a53 in __input_parameters_MOD_inputparametersvaluenamedouble
    at ./work/build/utility.input_parameters.p.F90:2291
#4  0xff65d2 in __nodes_operators_MOD_satellitedestructionmassthresholdconstructorparameters
    at ./work/build/nodes.operators.physics.satellite_destruction.mass_threshold.p.F90:70
#5  0xfbd94b in __nodes_operators_MOD_nodeoperatorcnstrctrprmtrs
    at ./work/build/nodes.operators.p.F90:8402
#6  0xf49943 in __nodes_operators_MOD_multiconstructorparameters
    at ./work/build/nodes.operators.multi.p.F90:97
#7  0xfbe2c7 in __nodes_operators_MOD_nodeoperatorcnstrctrprmtrs
    at ./work/build/nodes.operators.p.F90:8318
#8  0x21c00f5 in __tasks_MOD_evolveforestsconstructorparameters
    at ./work/build/tasks.evolve_forests.p.F90:304
#9  0x229865a in __tasks_MOD_taskcnstrctrprmtrs
    at ./work/build/tasks.p.F90:3670
#10  0x421e37 in galacticus
    at ./work/build/Galacticus.p.F90:126
#11  0x4055a6 in main
    at ./work/build/Galacticus.p.F90:34

Parameter file that causes this error

<?xml version='1.0' encoding='UTF-8'?>
<parameters>
  <lastModified>f24b6658837bbb9e810e1f71acf27311444e2220</lastModified>
  <formatVersion>2</formatVersion>
  <version>0.9.4</version>

  <!-- Set verbosity to show when background work is being performed -->
  <verbosityLevel value="working" />

  <!-- Set up the tasks to perform. -->
  <task value="evolveForests">
    <!-- Evolve merger tree forests. -->
  </task>

  <!--Use all cores to evolve single tree-->
  <treeEvolveSingleForest value="False" />

  <!--Set random number generator-->
  <randomNumberGenerator value="GSL">
    <seed value="1779" />
  </randomNumberGenerator>

  <!-- Component selection -->
  <!-- Baryonic components are set to null since we are not modeling them here. -->
  <componentBasic value="standard" />
  <componentBlackHole value="null" />
  <componentDarkMatterProfile value="scale" />
  <componentDisk value="standard" />
  <componentHotHalo value="null" />
  <componentSatellite value="orbiting" />
  <!--Charles Gannon -->
  <componentSpheroid value="standard" />
  <componentSpin value="vector" />

  <!-- Dark matter particle type -->
  <darkMatterParticle value="CDM" />

  <!-- Cosmological parameters and options -->
  <cosmologyFunctions value="matterLambda" />
  <cosmologyParameters value="simple">
    <!-- Parameter values are from the Planck Collaboration (2020; A&A, 641, 10) -->
    <!--  specifically the "TT,TE,EE+lowE+lensing" results in Table 2            -->
    <HubbleConstant value="67.36000" />
    <OmegaMatter value=" 0.31530" />
    <OmegaDarkEnergy value=" 0.68470" />
    <OmegaBaryon value=" 0.0000" />
    <temperatureCMB value=" 2.72548" />
  </cosmologyParameters>

  <!-- Power spectrum options -->
  <cosmologicalMassVariance value="filteredPower">
    <!-- Parameter value is from the Planck Collaboration (2020; A&A, 641, 10) -->
    <!--  specifically the "TT,TE,EE+lowE+lensing" results in Table 2          -->
    <sigma_8 value="0.8111" />
    <tolerance value="1.0e-3" />
  </cosmologicalMassVariance>
  <powerSpectrumPrimordial value="powerLaw">
    <!-- Parameter value is from the Planck Collaboration (2020; A&A, 641, 10) -->
    <!--  specifically the "TT,TE,EE+lowE+lensing" results in Table 2          -->
    <index value="0.9649" />
    <wavenumberReference value="1.0000" />
    <running value="0.0000" />
  </powerSpectrumPrimordial>
  <transferFunction value="CAMB">
    <!-- Use CAMB to generate the transfer function for CDM -->
    <redshift value="100.0" />
    <!-- Redefine cosmology here to include baryons -->
    <cosmologyParameters value="simple">
      <!-- Parameter values are from the Planck Collaboration (2020; A&A, 641, 10) -->
      <!--  specifically the "TT,TE,EE+lowE+lensing" results in Table 2            -->
      <HubbleConstant value="67.36000" />
      <OmegaMatter value=" 0.31530" />
      <OmegaDarkEnergy value=" 0.68470" />
      <OmegaBaryon value=" 0.04930" />
      <temperatureCMB value=" 2.72548" />
    </cosmologyParameters>
  </transferFunction>
  <powerSpectrumPrimordialTransferred value="simple" />

  <!-- Structure growth -->
  <linearGrowth value="collisionlessMatter">
    <!-- Compute the linear theory growth rate of perturbations assuming purely collisionless matter. -->
  </linearGrowth>

  <!-- Critical overdensity for halo collapse -->
  <criticalOverdensity value="sphericalCollapseClsnlssMttrCsmlgclCnstnt">
    <!-- Compute the critical overdensity for collapse of perturbations assuming purely collisionless matter. -->
  </criticalOverdensity>

  <!-- Dark matter halo virial properties -->
  <virialDensityContrast value="sphericalCollapseClsnlssMttrCsmlgclCnstnt">
    <!-- Compute the virial density contrast of dark matter halos assuming purely collisionless matter. -->
  </virialDensityContrast>

  <!-- Dark matter halo mass function -->
  <haloMassFunction value="shethTormen">
    <!-- Use the Sheth-Tormen mass function, with parameters calibrated to non-splashback halos from the MDPL simulation suite. -->
    <!-- See Benson (2017; MNRAS; 467; 3454; https://ui.adsabs.harvard.edu/abs/2017MNRAS.467.3454B),                            -->
    <!-- and https://github.com/galacticusorg/galacticus/wiki/Constraints:-Dark-matter-halo-mass-function                       -->
    <a value="0.758359488694975" />
    <normalization value="0.289897200615808" />
    <p value="0.331118219117848" />
  </haloMassFunction>

  <!-- Merger tree building options -->
  <mergerTreeConstructor value="build">
    <!-- Merger trees are built starting from z=0.5 -->
    <redshiftBase value="0.0" />
  </mergerTreeConstructor>
  <mergerTreeBuilder value="cole2000">
    <!-- The Cole et al. (2000) merger tree building algorithm is used. The "interval stepping" optimization from Appendix A -->
    <!-- of Benson, Ludlow, & Cole (2019, MNRAS, 485, 5010; https://ui.adsabs.harvard.edu/abs/2019MNRAS.485.5010B) is used   -->
    <!-- to speed up tree building.                                                                                          -->
    <accretionLimit value="  0.1" />
    <mergeProbability value="  0.1" />
    <redshiftMaximum value="0.1" />
    <branchIntervalStep value="true" />
  </mergerTreeBuilder>
  <mergerTreeBranchingProbability value="PCHPlus">
    <!-- Merger tree branching rates are computed using the PCH+ algorithm, with parameters constrained to match progenitor -->
    <!-- mass functions in the MDPL simulation suite.                                                                       -->
    <!-- See: https://github.com/galacticusorg/galacticus/wiki/Constraints:-Dark-matter-progenitor-halo-mass-functions      -->
    <!-- CDM assumptions are used here to speed up tree construction.                                                       -->
    <G0 value="+1.1425468378985500" />
    <gamma1 value="-0.3273597030267590" />
    <gamma2 value="+0.0587448775510245" />
    <gamma3 value="+0.6456170934757410" />
    <accuracyFirstOrder value="+0.1000000000000000" />
    <cdmAssumptions value="true" />
  </mergerTreeBranchingProbability>

  <mergerTreeBuildMassDistribution value="haloMassFunction">
    <!-- The distribution of tree masses is set to the halo mass function, truncated above/below the given limits. -->
    <abundanceMinimum value="1.0e-6" />
    <abundanceMaximum value="1.0e+6" />
  </mergerTreeBuildMassDistribution>

  <!-- Halo mass resolution -->
  <!--
  <mergerTreeMassResolution value="scaled">
    <massResolutionFractional value="1.00000E-03" />
  </mergerTreeMassResolution>
  -->

  <mergerTreeBuildMasses value="sampledDistributionUniform">
    <massTreeMinimum value="1.0e+10"/>
    <massTreeMaximum value="1.0e+15"/>
    <treesPerDecade value="2"/>
  </mergerTreeBuildMasses>

  <mergerTreeMassResolution value="scaled">
    <massResolutionMinimum value="1.0e+7" />
    <massResolutionFractional value="1.0E-3"/>
  </mergerTreeMassResolution>

  <!-- Dark matter only halo structure options -->
  <darkMatterProfileDMO value="heated">
    <!-- Dark matter only halo profiles are set to be heated NFW profiles. Where analytic solutions for heated halo -->
    <!-- properties are not available, numerical solutions are selected.                                            -->
    <darkMatterProfileDMO value="NFW" />
    <nonAnalyticSolver value="numerical" />
  </darkMatterProfileDMO>
  <darkMatterProfileHeating value="tidal">
    <!-- The heating source for dark matter halos is set to be tidal heating from their host halo. Parameter values are based on
         matching tidal tracks from Errani & Navarro (2021; MNRAS; 505; 18;
         https://ui.adsabs.harvard.edu/abs/2021MNRAS.505...18E), as described in
         https://hackmd.io/GAVyCqaKRoWvN_D9_B4qrg#New-Tidal-Heating-Model -->
    <!-- Charles Gannon 04.12.23 -->
    <!-- changed coefficientSecondOrder -> coefficientSecondOrder0 to work with Galacticus f24b6658837bbb9e810e1f71acf27311444e2220-->
    <!--
    <coefficientSecondOrder0 value="+0.406"/>
    -->
    <!-- Changes by Xiaolong Du, Mar 10, 2024 -->
    <!-- https://arxiv.org/abs/2403.09597     -->
    <coefficientSecondOrder0 value="+0.55396" />
    <!-- Changes by Xiaolong end -->
    <correlationVelocityRadius value="-0.333" />
  </darkMatterProfileHeating>

  <!-- Dark matter profile scale radii model -->
  <darkMatterProfileScaleRadius value="concentrationLimiter">
    <!-- Limit scale radii to keep concentrations within a reasonable range. -->
    <concentrationMinimum value="  1.0" />
    <concentrationMaximum value="100.0" />
    <!-- Changes by Xiaolong Du, Mar 10, 204 -->
    <darkMatterProfileScaleRadius value="concentration">
      <correctForConcentrationDefinition value="true" />
      <darkMatterProfileConcentration value="diemerJoyce2019">
        <!-- Use the Diemer & Joyce (2019; ApJ; 871; 168; http://adsabs.harvard.edu/abs/2019ApJ...871..168D) model for concentrations. -->
        <!-- Add a scatter of 0.16 dex -->
        <scatter value="0.16" />
      </darkMatterProfileConcentration>
    </darkMatterProfileScaleRadius>
    <!-- Changes by Xiaolong Du end -->
  </darkMatterProfileScaleRadius>

  <!-- Dark matter halo spin -->
  <haloSpinDistribution value="bett2007">
    <!-- For leaf nodes in the tree we fall back to drawing spins from the distribution function given by -->
    <!-- Benson (2017; MNRAS; 471; 2871; http://adsabs.harvard.edu/abs/2017MNRAS.471.2871B).              -->
    <!-- Best fit paramter values are taken from that paper.                                              -->
    <alpha value="1.7091800" />
    <lambda0 value="0.0420190" />
  </haloSpinDistribution>

  <!-- Substructure hierarchy options -->
  <!-- This allows for sub-subhalos etc. -->
  <mergerTreeNodeMerger value="multiLevelHierarchy" />

  <!-- Satellite orbit options -->
  <virialOrbit value="spinCorrelated">
    <!-- Model subhalo orbits at virial radius crossing using a fit to a cosmological distribution, plus some correlation with the host halo spin vector -->
    <!-- Best fit value for correlation with host spin from https://github.com/galacticusorg/galacticus/wiki/Constraints:-Halo-spins-and-concentrations. -->
    <alpha value="0.155573112534425" />
    <virialOrbit value="jiang2014">
      <!-- Use the Jiang et al. (2014; MNRAS; 448; 1674; https://ui.adsabs.harvard.edu/abs/2015MNRAS.448.1674J/abstract) model for -->
      <!-- the distribution of orbital paramrters.                                                                                 -->
      <!-- Best fit value from Benson, Behrens, & Lu (2020; MNRAS; 496; 3371; http://adsabs.harvard.edu/abs/2020MNRAS.496.3371B).  -->
      <bRatioHigh value="+2.88333 +4.06371 +3.86726" />
      <bRatioIntermediate value="+1.05361 +1.56868 +2.89027" />
      <bRatioLow value="+0.07432 +0.54554 +1.04721" />
      <gammaRatioHigh value="+0.07124 +0.04737 -0.01913" />
      <gammaRatioIntermediate value="+0.10069 +0.07821 +0.04231" />
      <gammaRatioLow value="+0.10866 +0.11260 +0.11698" />
      <muRatioHigh value="+1.10168 +1.09639 +1.09819" />
      <muRatioIntermediate value="+1.18205 +1.19573 +1.24581" />
      <muRatioLow value="+1.22053 +1.22992 +1.25528" />
      <sigmaRatioHigh value="+0.09244 +0.14335 +0.21079" />
      <sigmaRatioIntermediate value="+0.07397 +0.09590 +0.10941" />
      <sigmaRatioLow value="+0.07458 +0.09040 +0.06981" />
    </virialOrbit>
  </virialOrbit>
  <satelliteOrbitStoreOrbitalParameters value="true" />

  <!-- Orbiting model of satellites -->
  <!-- Values taken from Yang et al. (2020; MNRAS; 498; 3902; http://adsabs.harvard.edu/abs/2020MNRAS.498.3902Y) approximately
       interpolated betweeing their gamma=0.0 and 2.5 cases (using the Caterpillar simulations as calibration target) to
       approximately match our choice of gamma=1.5 using the Caterpillar simulations as calibration target.  -->
  <satelliteDynamicalFriction value="chandrasekhar1943">
    <logarithmCoulomb value="1.35" />
  </satelliteDynamicalFriction>
  <!--
  <satelliteTidalHeatingRate value="gnedin1999">
    <epsilon value="2.70"/>
    <gamma value="1.50"/>
  </satelliteTidalHeatingRate>
  <satelliteTidalStripping value="zentner2005">
    <efficiency value="2.95"/>
  </satelliteTidalStripping>
  -->
  <!-- Changes by Xiaolong Du, Mar 10, 2024 -->
  <!-- https://arxiv.org/abs/2403.09597     -->
  <satelliteTidalHeatingRate value="gnedin1999">
      <epsilon value="0.0732225" />
      <gamma value="0.0" />
    </satelliteTidalHeatingRate>
    <satelliteTidalStripping value="zentner2005">
      <useDynamicalTimeScale value="true" />
      <!-- Charles Gannon 08.20.24-->
      <efficiency value="0.912016" />
      <!--<efficiency value="1.86658" />-->
    </satelliteTidalStripping>
    <satelliteTidalStrippingRadius value="king1962">
      <efficiencyCentrifugal value="0.0" />
    </satelliteTidalStrippingRadius>
  <!-- Changes by Xiaolong Du end -->
  <!--Charles Gannon-->
  <mergerRemnantSize value="cole2000" />

  <!-- Galactic structure solver options -->
  <!-- As there is no baryonic component to the halos in this model we set the galactic structure solver to be null, and make the -->
  <!-- dark matter density profile equal to the dark matter only density profile.                                                 -->
  <galacticStructureSolver value="equilibrium">
    <includeBaryonGravity value="true" />
    <useFormationHalo value="false" />
    <solveForInactiveProperties value="true" />
    <solutionTolerance value="0.0001" />
  </galacticStructureSolver>
  <darkMatterProfile value="adiabaticGnedin2004">
   <A value="0.73" />
   <omega value="0.7" />
  </darkMatterProfile>

  <!-- Nullify any baryonic physics -->
  <hotHaloMassDistribution value="null" />

  <!-- Node evolution and physics -->
  <nodeOperator value="multi">
    <!-- Cosmological epoch -->
    <nodeOperator value="cosmicTime" />
    <!-- DMO evolution -->
    <nodeOperator value="DMOInterpolate" />
    <!-- Halo concentrations -->
    <nodeOperator value="darkMatterProfileScaleSet" />
    <nodeOperator value="darkMatterProfileScaleInterpolate" />
    <!-- Spins are computed using the angular momentum random walk model of Benson, Behrens, & Lu     -->
    <!-- (2020; MNRAS; 496; 3371; http://adsabs.harvard.edu/abs/2020MNRAS.496.3371B).                 -->
    <!-- The best fit-value for the mass exponent is taken from here                                  -->
    <!-- https://github.com/galacticusorg/galacticus/wiki/Constraints:-Halo-spins-and-concentrations. -->
    <nodeOperator value="haloAngularMomentumVitvitska2002">
      <exponentMass value="0.92527794238468" />
    </nodeOperator>
    <nodeOperator value="haloAngularMomentumInterpolate" />
    <!-- Subhalo hierarchy -->
    <!-- Allows for promotion of sub-sub-halos to become sub-halos etc. -->
    <nodeOperator value="subsubhaloPromotion" />
    <!-- Subhalo orbits -->
    <!-- Apply all orbital physics to the evolution of subhalos. -->
    <nodeOperator value="satelliteOrbit" />
    <nodeOperator value="satelliteDynamicalFriction" />
    <nodeOperator value="satelliteTidalMassLoss" />
    <!-- Changes by Xiaolong Du, Mar 10, 2024 -->
    <!-- https://arxiv.org/abs/2403.09597     -->
    <nodeOperator value="satelliteTidalHeating">
      <efficiencyDecay value="0.274859" />
    </nodeOperator>
    <!-- Changes by Xiaolong Du end -->
    <nodeOperator value="satelliteMergingRadiusTrigger">
      <!-- Subhalos will be removed if they reach 1% of the virial radius of their host halo. -->
      <radiusVirialFraction value="1.00000E-03" />
    </nodeOperator>
    <nodeOperator value="satelliteDestructionMassThreshold">
      <!-- Subhalos will be removed if they fall below the merger tree mass resolution limit. -->
      <massDestructionAbsolute value="=[mergerTreeMassResolution::massResolution]" />
      <massDestructionMassInfallFraction value="0.0" />
    </nodeOperator>

    <!--Charles Gannon-->
    <!-- Elliptical radius from effective radius - stellar mass formula in Shen et al https://ui.adsabs.harvard.edu/abs/2003MNRAS.343..978S/abstract-->
    <!-- Converted to Hernquest scale radius https://articles.adsabs.harvard.edu//full/1990ApJ...356..359H/0000361.000.html--> 
    <!-- 
    <nodeOperator value="empiricalMassiveElliptical">
      <massStellarFinal value="2.51189E+11" />
      <rateStarFormationSpecific value="0.00000E+00" />
      <radiusFinal value="1.00000E-06" />
      <rateRadiusSpecific value="0.00000E+00" />
    </nodeOperator> 
    -->
    <!--
        <nodeOperator value="empiricalGalaxyUniverseMachine">
            </nodeOperator>
    -->

    <!--New node operator-->
    <nodeOperator value="hierarchy" />
  </nodeOperator>

  <!-- Merger tree evolution -->
  <mergerTreeEvolver value="standard">
    <!-- Standard merger tree evolver with parameters chosen to (somewhat) optimize the evolution. -->
    <timestepHostAbsolute value="1.00" />
    <timestepHostRelative value="0.10" />
    <fractionTimestepSatelliteMinimum value="0.75" />
    <backtrackToSatellites value="true" />
  </mergerTreeEvolver>
  <mergerTreeNodeEvolver value="standard">
    <!-- Standard node evolve with parameters chosen to (somewhat) optimize the evolution. -->
    <odeToleranceAbsolute value="0.01" />
    <odeToleranceRelative value="0.01" />
    <reuseODEStepSize value="false" />
  </mergerTreeNodeEvolver>
  <mergerTreeEvolveTimestep value="multi">
    <!-- Standard time-stepping rules -->
    <mergerTreeEvolveTimestep value="simple">
      <timeStepAbsolute value="1.000" />
      <timeStepRelative value="0.100" />
    </mergerTreeEvolveTimestep>
    <mergerTreeEvolveTimestep value="satellite">
      <timeOffsetMaximumAbsolute value="0.010" />
      <timeOffsetMaximumRelative value="0.001" />
    </mergerTreeEvolveTimestep>
    <mergerTreeEvolveTimestep value="satelliteDestruction">
      <!-- This timestep rule is required to ensure that subhalos are removed when they meet the destruction criteria. -->
    </mergerTreeEvolveTimestep>
    <mergerTreeEvolveTimestep value="hostTidalMassLoss">
      <!-- This timestep criterion makes sure that subsubahlos do not evolve too far ahead of their host subhalos when
           the host density and mass change rapidily due to tidal effects. It also limits the evolution time of subhalos
           to the time at which the hosts first becomes subhalos. -->
      <timeStepRelative value="0.1" />
    </mergerTreeEvolveTimestep>
  </mergerTreeEvolveTimestep>

  <!-- Output epochs -->
  <outputTimes value="list">
    <!-- Additional redshifts can be added to this list to generate more outputs. -->
    <redshifts value="0.0" />
  </outputTimes>

  <!--Additional parameters for outputting added 3.14.2022-->  
  <mergerTreeOutputter value="standard">
    <outputReferences value="false" />
  </mergerTreeOutputter>

  <!-- Output structure before evolution -->
  <!--
  <mergerTreeOperator value="outputStructure" >
    <nodePropertyExtractor value="multi">
     <nodePropertyExtractor value="nodeIndices"          />
     <nodePropertyExtractor value="indicesTree"          />
     <nodePropertyExtractor value="redshift" />
     <nodePropertyExtractor value="redshiftLastIsolated" />
     <nodePropertyExtractor value="hierarchy" />
     <nodePropertyExtractor value="massBasic" />
   </nodePropertyExtractor>
  </mergerTreeOperator>
  -->

  <!-- Charles Gannon 04.12.23 -->
  <!-- changed galacticusOutputFileName -> outputFileName-->
  <!-- Output file -->
  <outputFileName value="universe-machine-smhm-test.hdf5" />

  <!-- Output properties -->
  <nodePropertyExtractor value="multi">
    <!-- Orbital position relative to the main host halo -->
    <nodePropertyExtractor value="positionOrbital" />
    <!--Added code to get data on nodes and extra redshift data-->
    <nodePropertyExtractor value="nodeIndices" />
    <nodePropertyExtractor value="indicesTree" />
    <nodePropertyExtractor value="massBound" />

    <nodePropertyExtractor value="redshiftLastIsolated" />
    <!--Density profile extractor-->
    <nodePropertyExtractor value="darkMatterProfileScaleRadius" />
    <!--Viral properties extractor-->
    <nodePropertyExtractor value="virialProperties" />
    <!--Some new properties-->
    <nodePropertyExtractor value="hierarchy" />

    <!-- <nodePropertyExtractor value="tidallyTruncatedNFWFit"/> -->

    <!-- Adding Conversions to be compatible with Daniel's code -->
    <nodePropertyExtractor value="massHalo">
      <useLastIsolatedTime value="true" />
      <darkMatterProfileDMO value="NFW" />
      <virialDensityContrastDefinition value="fixed">
        <densityType value="critical" />
        <densityContrastValue value="200.0" />
        <turnAroundOverVirialRadius value="2.0" />
      </virialDensityContrastDefinition>
    </nodePropertyExtractor>
    <nodePropertyExtractor value="concentration">
      <useLastIsolatedTime value="true" />
      <darkMatterProfileDMO value="NFW" />
      <virialDensityContrastDefinition value="fixed">
        <densityType value="critical" />
        <densityContrastValue value="200.0" />
        <turnAroundOverVirialRadius value="2.0" />
      </virialDensityContrastDefinition>
    </nodePropertyExtractor>
  </nodePropertyExtractor>
    <!--Density profile-->
    <!--<nodePropertyExtractor value="densityProfile">
      <includeRadii value="true"/>
      <radiusSpecifiers value="                                virialRadius:all:all:radial:0.01000000                                virialRadius:all:all:radial:0.01274275                                virialRadius:all:all:radial:0.01623777                                virialRadius:all:all:radial:0.02069138                                virialRadius:all:all:radial:0.02636651                                virialRadius:all:all:radial:0.03359818                                virialRadius:all:all:radial:0.04281332                                virialRadius:all:all:radial:0.05455595                                virialRadius:all:all:radial:0.06951928                                virialRadius:all:all:radial:0.08858668                                virialRadius:all:all:radial:0.11288379                                virialRadius:all:all:radial:0.14384499                                virialRadius:all:all:radial:0.18329807                                virialRadius:all:all:radial:0.23357215                                virialRadius:all:all:radial:0.29763514                                virialRadius:all:all:radial:0.37926902                                virialRadius:all:all:radial:0.48329302                                virialRadius:all:all:radial:0.61584821                                virialRadius:all:all:radial:0.78475997                                virialRadius:all:all:radial:1.00000000                               "/>
    </nodePropertyExtractor>-->  

  <!--Backup files here-->
  <!--<stateFileRoot value="/home/cgannon/scratch/lsubmodv3.1-cg-date-07.11.2024-time-00.55.15-date-07.11.2024-time-00.55.16-z-5.00000E-01-mh-1.00000E+13-mstar-2.51189E+11-dmstar-0.00000E+00-drstar-0.00000E+00.xml.tmp" /> -->
  <!--<galacticusOutputScratchFileName value="/home/cgannon/galacticus/scratch/__FILENAME__-scratch.hdf5" /> -->

</parameters>
abensonca commented 2 months ago

The problem here is that this line in the parameter file:

<massDestructionAbsolute value="=[mergerTreeMassResolution::massResolution]" />

is referencing the massResolution parameter inside the mergerTreeMassResolution section. But, when you use the mergerTreeMassResolutionScaled class that parameter doesn't exist.

So, you'll want to change how the destruction threshold is computed. This should work:

    <nodeOperator value="satelliteDestructionMassThreshold">
      <!-- Subhalos will be removed if they fall below the merger tree mass resolution limit. -->
      <massDestructionAbsolute value="=[mergerTreeMassResolution::massResolutionMinimum]" />
      <massDestructionMassTreeFraction value="=[mergerTreeMassResolution::massResolutionFractional]" />
    </nodeOperator>

I opened PR #680 to provide a more helpful error message when this type of problem arises.

cgannonucm commented 2 months ago

Thanks!