Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add noaa machines and minor cleanup from RG #319

Merged
merged 1 commit into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cicecore/cicedynB/infrastructure/ice_domain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,12 @@ subroutine init_domain_distribution(KMTG,ULATG)
if (this_block%j_glob(j) > 0) then
do i=this_block%ilo,this_block%ihi
if (this_block%i_glob(i) > 0) then
ig = this_block%i_glob(i)
ig = this_block%i_glob(i)
jg = this_block%j_glob(j)
if (KMTG(ig,jg) > puny .and. &
(ULATG(ig,jg) < shlat/rad_to_deg .or. &
ULATG(ig,jg) > nhlat/rad_to_deg) ) &
nocn(n) = nocn(n) + flat(ig,jg)
nocn(n) = nocn(n) + flat(ig,jg)
endif
end do
endif
Expand Down
2 changes: 1 addition & 1 deletion cicecore/shared/ice_arrays_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ module ice_arrays_column
real (kind=dbl_kind), dimension(:), allocatable, public :: &
R_C2N , & ! algal C to N (mole/mole)
R_chl2N , & ! 3 algal chlorophyll to N (mg/mmol)
R_Si2N ! silica to nitrogen mole ratio for algal groups
R_Si2N ! silica to nitrogen mole ratio for algal groups

!=======================================================================

Expand Down
2 changes: 1 addition & 1 deletion cicecore/shared/ice_constants.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module ice_constants
c180 = 180.0_dbl_kind, &
c360 = 360.0_dbl_kind, &
c365 = 365.0_dbl_kind, &
c400 = 400.0_dbl_kind, &
c400 = 400.0_dbl_kind, &
c1000= 1000.0_dbl_kind, &
c3600= 3600.0_dbl_kind, &
p001 = 0.001_dbl_kind, &
Expand Down
84 changes: 42 additions & 42 deletions cicecore/shared/ice_spacecurve.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module ice_spacecurve
! !PUBLIC MEMBER FUNCTIONS:

public :: GenSpaceCurve, &
IsLoadBalanced
IsLoadBalanced

public :: Factor, &
IsFactorable, &
Expand All @@ -41,24 +41,24 @@ module ice_spacecurve

! !PRIVATE MEMBER FUNCTIONS:

private :: map, &
PeanoM, &
Hilbert, &
Cinco, &
private :: map, &
PeanoM, &
Hilbert, &
Cinco, &
GenCurve

private :: FirstFactor, &
FindandMark

integer(int_kind), dimension(:,:), allocatable :: &
dir, &! direction to move along each level
dir, &! direction to move along each level
ordered ! the ordering
integer(int_kind), dimension(:), allocatable :: &
pos ! position along each of the axes
pos ! position along each of the axes

integer(int_kind) :: &
maxdim, &! dimensionality of entire space
vcnt ! visitation count
maxdim, &! dimensionality of entire space
vcnt ! visitation count

logical :: verbose=.FALSE.

Expand All @@ -80,7 +80,7 @@ recursive function Cinco(l,type,ma,md,ja,jd) result(ierr)
! !DESCRIPTION:
! This subroutine implements a Cinco space-filling curve.
! Cinco curves connect a Nb x Nb block of points where
!
!
! Nb = 5^p
!
! !REVISION HISTORY:
Expand All @@ -91,12 +91,12 @@ recursive function Cinco(l,type,ma,md,ja,jd) result(ierr)
! !INPUT PARAMETERS

integer(int_kind), intent(in) :: &
l, & ! level of the space-filling curve
l, & ! level of the space-filling curve
type, & ! type of SFC curve
ma, & ! Major axis [0,1]
md, & ! direction of major axis [-1,1]
ja, & ! joiner axis [0,1]
jd ! direction of joiner axis [-1,1]
ma, & ! Major axis [0,1]
md, & ! direction of major axis [-1,1]
ja, & ! joiner axis [0,1]
jd ! direction of joiner axis [-1,1]

! !OUTPUT PARAMETERS

Expand All @@ -111,12 +111,12 @@ recursive function Cinco(l,type,ma,md,ja,jd) result(ierr)
!-----------------------------------------------------------------------

integer(int_kind) :: &
lma, &! local major axis (next level)
lmd, &! local major direction (next level)
lja, &! local joiner axis (next level)
ljd, &! local joiner direction (next level)
ltype, &! type of SFC on next level
ll ! next level down
lma, &! local major axis (next level)
lmd, &! local major direction (next level)
lja, &! local joiner axis (next level)
ljd, &! local joiner direction (next level)
ltype, &! type of SFC on next level
ll ! next level down

logical :: debug = .FALSE.

Expand Down Expand Up @@ -963,8 +963,8 @@ function IncrementCurve(ja,jd) result(ierr)

! !INPUT PARAMETERS:
integer(int_kind) :: &
ja, &! axis to increment
jd ! direction along axis
ja, &! axis to increment
jd ! direction along axis

! !OUTPUT PARAMETERS:
integer(int_kind) :: ierr ! error return code
Expand All @@ -975,7 +975,7 @@ function IncrementCurve(ja,jd) result(ierr)
! mark the newly visited point
!-----------------------------
ordered(pos(0)+1,pos(1)+1) = vcnt

!------------------------------------
! increment curve and update position
!------------------------------------
Expand Down Expand Up @@ -1064,31 +1064,31 @@ function IsLoadBalanced(nelem,npart)
! !INTPUT PARAMETERS:

integer(int_kind), intent(in) :: &
nelem, & ! number of blocks/elements to partition
npart ! size of partition
nelem, & ! number of blocks/elements to partition
npart ! size of partition

! !OUTPUT PARAMETERS:
logical :: IsLoadBalanced ! .TRUE. if a perfectly load balanced
! partition is possible
! partition is possible
!EOP
!BOC
!-----------------------------------------------------------------------
!
! local variables
!
!-----------------------------------------------------------------------

integer(int_kind) :: tmp1 ! temporary int

character(len=*),parameter :: subname='(IsLoadBalanced)'

!-----------------------------------------------------------------------
tmp1 = nelem/npart

if(npart*tmp1 == nelem ) then
IsLoadBalanced=.TRUE.
if (npart*tmp1 == nelem ) then
IsLoadBalanced=.TRUE.
else
IsLoadBalanced=.FALSE.
IsLoadBalanced=.FALSE.
endif

!EOP
Expand Down Expand Up @@ -1285,7 +1285,7 @@ function Factor(num) result(res)
!-----------------------------------------------------------------------

integer(int_kind) :: &
tmp,tmp2,tmp3,tmp5 ! tempories for the factorization algorithm
tmp,tmp2,tmp3,tmp5 ! tempories for the factorization algorithm
integer(int_kind) :: i,n ! loop tempories
logical :: found ! logical temporary
character(len=*),parameter :: subname='(Factor)'
Expand Down Expand Up @@ -1437,9 +1437,9 @@ subroutine map(l)
!-----------------------------------------------------------------------

integer(int_kind) :: &
d, & ! dimension of curve only 2D is supported
type, & ! type of space-filling curve to start off
ierr ! error return code
d, & ! dimension of curve only 2D is supported
type, & ! type of space-filling curve to start off
ierr ! error return code
character(len=*),parameter :: subname='(map)'

d = SIZE(pos)
Expand Down Expand Up @@ -1484,8 +1484,8 @@ subroutine PrintCurve(Mesh)
!
!-----------------------------------------------------------------------
integer(int_kind) :: &
gridsize, &! order of space-filling curve
i ! loop temporary
gridsize, &! order of space-filling curve
i ! loop temporary
character(len=*),parameter :: subname='(PrintCurve)'

!-----------------------------------------------------------------------
Expand Down Expand Up @@ -1523,7 +1523,7 @@ subroutine PrintCurve(Mesh)
write (*,*) "------------------------------------------"
do i=1,gridsize
write(*,6) Mesh(1,i),Mesh(2,i),Mesh(3,i), &
Mesh(4,i),Mesh(5,i),Mesh(6,i)
Mesh(4,i),Mesh(5,i),Mesh(6,i)
enddo
else if(gridsize == 8) then
write (*,*) "A Level 3 Hilbert Curve:"
Expand Down Expand Up @@ -1615,7 +1615,7 @@ subroutine PrintCurve(Mesh)
Mesh(13,i),Mesh(14,i),Mesh(15,i),Mesh(16,i), &
Mesh(17,i),Mesh(18,i),Mesh(19,i),Mesh(20,i), &
Mesh(21,i),Mesh(22,i),Mesh(23,i),Mesh(24,i), &
Mesh(25,i)
Mesh(25,i)
enddo
else if(gridsize == 27) then
write (*,*) "A Level 3 Peano Meandering Curve:"
Expand Down Expand Up @@ -1683,7 +1683,7 @@ subroutine GenSpaceCurve(Mesh)

! !INPUT/OUTPUT PARAMETERS:
integer(int_kind), target,intent(inout) :: &
Mesh(:,:) ! The SFC ordering in 2D array
Mesh(:,:) ! The SFC ordering in 2D array

!EOP
!BOC
Expand All @@ -1694,8 +1694,8 @@ subroutine GenSpaceCurve(Mesh)
!-----------------------------------------------------------------------

integer(int_kind) :: &
level, &! Level of space-filling curve
dim ! dimension of SFC... currently limited to 2D
level, &! Level of space-filling curve
dim ! dimension of SFC... currently limited to 2D

integer(int_kind) :: gridsize ! number of points on a side

Expand Down
28 changes: 28 additions & 0 deletions configuration/scripts/cice.batch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,34 @@ cat >> ${jobfile} << EOFB
#SBATCH --qos=standby
EOFB

else if (${ICE_MACHINE} =~ theia*) then
cat >> ${jobfile} << EOFB
#SBATCH -J ${ICE_CASENAME}
#SBATCH -t ${batchtime}
#SBATCH -q batch
#SBATCH -A marine-cpu
#SBATCH -N ${nnodes}
#SBATCH -e slurm%j.err
#SBATCH -o slurm%j.out
#SBATCH --mail-type END,FAIL
#SBATCH [email protected]
EOFB

else if (${ICE_MACHINE} =~ phase2*) then
cat >> ${jobfile} << EOFB
# nothing to do
EOFB

else if (${ICE_MACHINE} =~ phase3*) then
cat >> ${jobfile} << EOFB
# nothing to do
EOFB

else if (${ICE_MACHINE} =~ high_Sierra*) then
cat >> ${jobfile} << EOFB
# nothing to do
EOFB

else if (${ICE_MACHINE} =~ testmachine*) then
cat >> ${jobfile} << EOFB
# nothing to do
Expand Down
27 changes: 27 additions & 0 deletions configuration/scripts/cice.launch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,33 @@ mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
EOFR
endif

#=======
else if (${ICE_MACHINE} =~ theia*) then
cat >> ${jobfile} << EOFR
#mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
srun -n ${ntasks} -c ${nthrds} ./cice >&! \$ICE_RUNLOG_FILE
#./cice >&! \$ICE_RUNLOG_FILE
EOFR
#=======
else if (${ICE_MACHINE} =~ high_Sierra*) then
cat >> ${jobfile} << EOFR
mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
#./cice >&! \$ICE_RUNLOG_FILE
EOFR

#=======
else if (${ICE_MACHINE} =~ phase2*) then
cat >> ${jobfile} << EOFR
mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
#./cice >&! \$ICE_RUNLOG_FILE
EOFR

#=======
else if (${ICE_MACHINE} =~ phase3*) then
cat >> ${jobfile} << EOFR
mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
#./cice >&! \$ICE_RUNLOG_FILE
EOFR
#=======
else if (${ICE_MACHINE} =~ testmachine*) then
cat >> ${jobfile} << EOFR
Expand Down
47 changes: 47 additions & 0 deletions configuration/scripts/machines/Macros.high_Sierra_gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#==============================================================================
# Makefile macros for Travis-CI - GCC and openmpi compilers
#==============================================================================

CPP := cpp
CPPDEFS := -DFORTRANUNDERSCORE -DNO_R16 -DHAVE_F2008_CONTIGUOUS -DLINUX -DCPRINTEL ${ICE_CPPDEFS}
CFLAGS := -c -O2

FIXEDFLAGS := -132
FFLAGS := -O2 -ffree-line-length-none -fconvert=big-endian -finit-real=nan
FFLAGS_NOOPT:= -O0

ifeq ($(ICE_BLDDEBUG), true)
#FFLAGS += -O0 -g -Wextra -fbacktrace -fbounds-check -ffpe-trap=zero,overflow
FFLAGS += -O0 -g -std=f2008 -fbacktrace -fbounds-check -ffpe-trap=zero,overflow
else
FFLAGS += -O2
endif

FC := mpif90

MPICC:=

MPIFC:= mpif90
LD:= $(FC)

NETCDF_PATH := $(NETCDF)

ifeq ($(ICE_IOTYPE), netcdf)
NETCDF_PATH := $(shell nc-config --prefix)
INCLDIR := $(INCLDIR) -I$(NETCDF_PATH)/include
LIB_NETCDF := $(NETCDF_PATH)/lib
LIB_PNETCDF :=
SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff
else
SLIBS :=
endif

LIB_MPI :=
SCC:=gcc
SFC:=

#ifeq ($(ICE_THREADED), true)
# LDFLAGS += -fopenmp
# CFLAGS += -fopenmp
# FFLAGS += -fopenmp
#endif
Loading