Skip to content

Commit

Permalink
CHG: Temporarily downloading specific version of MPICH to deal with i…
Browse files Browse the repository at this point in the history
…ssue with latest version of MacOS SDK; cleanup
  • Loading branch information
TidbitSoftware committed Feb 3, 2025
1 parent a9a3804 commit b03ad34
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion externalpackages/petsc/install-3.22-linux-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu

## Constants
#
VER="3.22.0"
VER="3.22.3"

PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
Expand Down
3 changes: 2 additions & 1 deletion externalpackages/petsc/install-3.22-linux.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
set -eu


## Constants
#
VER="3.22.0"
VER="3.22.3"

PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
Expand Down
4 changes: 2 additions & 2 deletions externalpackages/petsc/install-3.22-mac-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu

## Constants
#
VER="3.22.0"
VER="3.22.3"

PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
Expand Down Expand Up @@ -47,7 +47,7 @@ cd ${PETSC_DIR}
--with-ssl=0 \
--download-fblaslapack=1 \
--download-metis=1 \
--download-mpich=1 \
--download-mpich=https://www.mpich.org/static/downloads/4.3.0/mpich-4.3.0.tar.gz \
--download-mumps=1 \
--download-parmetis=1 \
--download-scalapack=1 \
Expand Down
5 changes: 3 additions & 2 deletions externalpackages/petsc/install-3.22-mac.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
set -eu


## Constants
#
VER="3.22.0"
VER="3.22.3"

PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
Expand Down Expand Up @@ -43,7 +44,7 @@ cd ${PETSC_DIR}
--with-pic=1 \
--download-fblaslapack=1 \
--download-metis=1 \
--download-mpich=1 \
--download-mpich=https://www.mpich.org/static/downloads/4.3.0/mpich-4.3.0.tar.gz \
--download-mumps=1 \
--download-parmetis=1 \
--download-scalapack=1 \
Expand Down
59 changes: 29 additions & 30 deletions src/m/classes/hydrologyshakti.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@


class hydrologyshakti(object):
"""
HYDROLOGYSHAKTI class definition
"""hydrologyshakti class definition
Usage:
hydrologyshakti = hydrologyshakti()
Usage:
hydrologyshakti = hydrologyshakti()
"""

def __init__(self): # {{{
self.head = float('NaN')
self.gap_height = float('NaN')
self.bump_spacing = float('NaN')
self.bump_height = float('NaN')
self.englacial_input = float('NaN')
self.moulin_input = float('NaN')
self.reynolds = float('NaN')
self.spchead = float('NaN')
self.neumannflux = float('NaN')
self.head = np.nan
self.gap_height = np.nan
self.bump_spacing = np.nan
self.bump_height = np.nan
self.englacial_input = np.nan
self.moulin_input = np.nan
self.reynolds = np.nan
self.spchead = np.nan
self.neumannflux = np.nan
self.relaxation = 0
self.storage = np.nan
self.requested_outputs = []
Expand All @@ -31,28 +30,28 @@ def __init__(self): # {{{

# }}}
def __repr__(self): # {{{
string = ' hydrologyshakti solution parameters:'
string = "%s\n%s" % (string, fielddisplay(self, 'head', 'subglacial hydrology water head (m)'))
string = "%s\n%s" % (string, fielddisplay(self, 'gap_height', 'height of gap separating ice to bed (m)'))
string = "%s\n%s" % (string, fielddisplay(self, 'bump_spacing', 'characteristic bedrock bump spacing (m)'))
string = "%s\n%s" % (string, fielddisplay(self, 'bump_height', 'characteristic bedrock bump height (m)'))
string = "%s\n%s" % (string, fielddisplay(self, 'englacial_input', 'liquid water input from englacial to subglacial system (m / yr)'))
string = "%s\n%s" % (string, fielddisplay(self, 'moulin_input', 'liquid water input from moulins (at the vertices) to subglacial system (m^3 / s)'))
string = "%s\n%s" % (string, fielddisplay(self, 'reynolds', 'Reynolds'' number'))
string = "%s\n%s" % (string, fielddisplay(self, 'neumannflux', 'water flux applied along the model boundary (m^2 / s)'))
string = "%s\n%s" % (string, fielddisplay(self, 'spchead', 'water head constraints (NaN means no constraint) (m)'))
string = "%s\n%s" % (string, fielddisplay(self, 'relaxation', 'under - relaxation coefficient for nonlinear iteration'))
string = "%s\n%s" % (string, fielddisplay(self, 'storage', 'englacial storage coefficient (void ratio)'))
string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
return string
s = ' hydrologyshakti solution parameters:'
s += '{}\n'.format(fielddisplay(self, 'head', 'subglacial hydrology water head (m)'))
s += '{}\n'.format(fielddisplay(self, 'gap_height', 'height of gap separating ice to bed (m)'))
s += '{}\n'.format(fielddisplay(self, 'bump_spacing', 'characteristic bedrock bump spacing (m)'))
s += '{}\n'.format(fielddisplay(self, 'bump_height', 'characteristic bedrock bump height (m)'))
s += '{}\n'.format(fielddisplay(self, 'englacial_input', 'liquid water input from englacial to subglacial system (m / yr)'))
s += '{}\n'.format(fielddisplay(self, 'moulin_input', 'liquid water input from moulins (at the vertices) to subglacial system (m^3 / s)'))
s += '{}\n'.format(fielddisplay(self, 'reynolds', 'Reynolds'' number'))
s += '{}\n'.format(fielddisplay(self, 'neumannflux', 'water flux applied along the model boundary (m^2 / s)'))
s += '{}\n'.format(fielddisplay(self, 'spchead', 'water head constraints (NaN means no constraint) (m)'))
s += '{}\n'.format(fielddisplay(self, 'relaxation', 'under - relaxation coefficient for nonlinear iteration'))
s += '{}\n'.format(fielddisplay(self, 'storage', 'englacial storage coefficient (void ratio)'))
s += '{}\n'.format(fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
return s
# }}}

def extrude(self, md): # {{{
return self
# }}}

def setdefaultparameters(self): # {{{
# Set under - relaxation parameter to be 1 (no under - relaxation of nonlinear iteration)
# Set under-relaxation parameter to be 1 (no under-relaxation of nonlinear iteration)
self.relaxation = 1
self.storage = 0
self.requested_outputs = ['default']
Expand All @@ -65,7 +64,7 @@ def defaultoutputs(self, md): # {{{
# }}}

def checkconsistency(self, md, solution, analyses): # {{{
#Early return
# Early return
if 'HydrologyShaktiAnalysis' not in analyses:
return md

Expand Down Expand Up @@ -107,7 +106,7 @@ def marshall(self, prefix, md, fid): # {{{
tsl = md.mesh.numberofelements
WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'storage', 'format', 'DoubleMat', 'mattype', mattype, 'timeserieslength', tsl + 1, 'yts', md.constants.yts)

#process requested outputs
# Process requested outputs
outputs = self.requested_outputs
indices = [i for i, x in enumerate(outputs) if x == 'default']
if len(indices) > 0:
Expand Down

0 comments on commit b03ad34

Please sign in to comment.