Skip to content

Commit

Permalink
Major update.
Browse files Browse the repository at this point in the history
  • Loading branch information
dshawul committed Oct 15, 2020
1 parent e4bdd7b commit f16dc6f
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 86 deletions.
4 changes: 1 addition & 3 deletions Dockerfiles/gnu/Dockerfile-gfs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan -p 29418 -t rsa vlab.ncep.noaa.gov >
# mount ssh and secret ssh config file
ARG GERRIT_ID
RUN --mount=type=ssh,id=default \
--mount=type=secret,id=${GERRIT_ID},dst=/root/.ssh/config \
--mount=type=secret,id=gerrit,dst=/root/.ssh/config \
cat /root/.ssh/config \
&& ssh-add -L \
&& cd /opt && ./checkout_gfs.sh

COPY ./patches/workflow/GSI.diff /opt/patches/workflow/GSI.diff

# clone and build gfs
RUN cd /opt && ./patch_gfs.sh && \
cd global-workflow/sorc && bash ./build_all.sh && bash ./link_fv3gfs.sh emc linux.gnu
Expand Down
18 changes: 18 additions & 0 deletions Dockerfiles/gnu/Dockerfile-gsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# stage-1
ARG REPO
FROM ${REPO}/gfs-gnu:latest
MAINTAINER Daniel Abdi <[email protected]>

# stage-2
FROM ${REPO}/esmf-gnu:latest
MAINTAINER Daniel Abdi <[email protected]>

RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libblas-dev \
liblapack-dev \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /opt/exec
COPY --from=0 /etc/bashrc /etc/bashrc
COPY --from=0 /opt/global-workflow/sorc/gsi.fd/exec /opt/exec
15 changes: 15 additions & 0 deletions Dockerfiles/gnu/Dockerfile-ufs-utils
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# stage-1
ARG REPO
FROM ${REPO}/gfs-gnu:latest
MAINTAINER Daniel Abdi <[email protected]>

# stage-2
FROM ${REPO}/esmf-gnu:latest
MAINTAINER Daniel Abdi <[email protected]>

RUN mkdir -p /opt/exec
COPY --from=0 /etc/bashrc /etc/bashrc
COPY --from=0 /opt/global-workflow/sorc/ufs_utils.fd/exec /opt/exec
COPY --from=0 /usr/local/lib/libjasper.so /usr/local/lib/libjasper.so
COPY --from=0 /usr/local/lib/libjasper.so.4 /usr/local/lib/libjasper.so.4
COPY --from=0 /usr/local/lib/libjasper.so.4.0.0 /usr/local/lib/libjasper.so.4.0.0
2 changes: 1 addition & 1 deletion Dockerfiles/intel/Dockerfile-gfs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan -p 29418 -t rsa vlab.ncep.noaa.gov >
# mount ssh and secret ssh config file
ARG GERRIT_ID
RUN --mount=type=ssh,id=default \
--mount=type=secret,id=${GERRIT_ID},dst=/root/.ssh/config \
--mount=type=secret,id=gerrit,dst=/root/.ssh/config \
cat /root/.ssh/config \
&& ssh-add -L \
&& cd /opt && ./checkout_gfs.sh
Expand Down
18 changes: 18 additions & 0 deletions Dockerfiles/intel/Dockerfile-gsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# stage-1
ARG REPO
FROM ${REPO}/gfs-intel:latest
MAINTAINER Daniel Abdi <[email protected]>

# stage-2
FROM ${REPO}/esmf-intel:latest
MAINTAINER Daniel Abdi <[email protected]>

RUN dnf update -y && \
dnf install -y --enablerepo=PowerTools \
lapack-devel \
blas-devel \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /opt/exec
COPY --from=0 /etc/bashrc /etc/bashrc
COPY --from=0 /opt/global-workflow/sorc/gsi.fd/exec /opt/exec
1 change: 1 addition & 0 deletions Dockerfiles/intel/Dockerfile-nceplibs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN dnf update -y && \
dnf install -y --enablerepo=PowerTools \
redhat-lsb-core \
curl-devel \
lapack-devel \
blas-devel \
libpng-devel \
bzip2-devel \
Expand Down
15 changes: 15 additions & 0 deletions Dockerfiles/intel/Dockerfile-ufs-utils
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# stage-1
ARG REPO
FROM ${REPO}/gfs-intel:latest
MAINTAINER Daniel Abdi <[email protected]>

# stage-2
FROM ${REPO}/esmf-intel:latest
MAINTAINER Daniel Abdi <[email protected]>

RUN mkdir -p /opt/exec
COPY --from=0 /etc/bashrc /etc/bashrc
COPY --from=0 /opt/global-workflow/sorc/ufs_utils.fd/exec /opt/exec
COPY --from=0 /usr/local/lib/libjasper.so /usr/local/lib/libjasper.so
COPY --from=0 /usr/local/lib/libjasper.so.4 /usr/local/lib/libjasper.so.4
COPY --from=0 /usr/local/lib/libjasper.so.4.0.0 /usr/local/lib/libjasper.so.4.0.0
9 changes: 9 additions & 0 deletions build_gnu_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,12 @@ IMAGE_NAME=${REPO}/fv3-gnu
DOCKER_FILE=Dockerfiles/gnu/Dockerfile-fv3
build_image ${IMAGE_NAME} ${DOCKER_FILE}

#ufs-utils
IMAGE_NAME=${REPO}/ufs-utils-gnu
DOCKER_FILE=Dockerfiles/gnu/Dockerfile-ufs-utils
build_image ${IMAGE_NAME} ${DOCKER_FILE}

#gsi
IMAGE_NAME=${REPO}/gsi-gnu
DOCKER_FILE=Dockerfiles/gnu/Dockerfile-gsi
build_image ${IMAGE_NAME} ${DOCKER_FILE}
11 changes: 11 additions & 0 deletions build_intel_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,14 @@ DOCKER_FILE=Dockerfiles/intel/Dockerfile-fv3
COMMAND="cd /opt; source intel_comp.sh; ./copy_deps.sh"
build_image ${IMAGE_NAME} ${DOCKER_FILE} "${COMMAND}"

#ufs-utils
IMAGE_NAME=${REPO}/ufs-utils-intel
DOCKER_FILE=Dockerfiles/intel/Dockerfile-ufs-utils
COMMAND="cd /opt; source intel_comp.sh; ./copy_deps.sh"
build_image ${IMAGE_NAME} ${DOCKER_FILE} "${COMMAND}"

#gsi
IMAGE_NAME=${REPO}/gsi-intel
DOCKER_FILE=Dockerfiles/intel/Dockerfile-gsi
COMMAND="cd /opt; source intel_comp.sh; ./copy_deps.sh"
build_image ${IMAGE_NAME} ${DOCKER_FILE} "${COMMAND}"
1 change: 0 additions & 1 deletion patch_fv3.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
set -exo pipefail

FV3DIR=${FV3DIR:-NEMSfv3gfs}

Expand Down
1 change: 0 additions & 1 deletion patch_gfs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
set -exo pipefail

GFSDIR=${GFSDIR:-global-workflow}

Expand Down
72 changes: 0 additions & 72 deletions patches/fv3gfs/FV3.diff
Original file line number Diff line number Diff line change
Expand Up @@ -38,75 +38,3 @@ index b9162a8..30bd783 100644
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
if (mype == 0 .or. mype == lead_wrttask(n_group)) print *,'aft fieldbundleregrid,na=',na, &
' time=', timerh- timerhi
diff --git gfsphysics/GFS_layer/GFS_driver.F90 gfsphysics/GFS_layer/GFS_driver.F90
index 28695eb..e0e98c2 100644
--- gfsphysics/GFS_layer/GFS_driver.F90
+++ gfsphysics/GFS_layer/GFS_driver.F90
@@ -717,15 +717,15 @@ module GFS_driver
type(GFS_radtend_type), intent(inout) :: Radtend
type(GFS_diag_type), intent(inout) :: Diag
#else
- type(GFS_control_type), intent(in ) :: Model
- type(GFS_statein_type), intent(in ) :: Statein
- type(GFS_stateout_type), intent(in ) :: Stateout
- type(GFS_sfcprop_type), intent(in ) :: Sfcprop
+ type(GFS_control_type), intent(inout ) :: Model
+ type(GFS_statein_type), intent(inout ) :: Statein
+ type(GFS_stateout_type), intent(inout ) :: Stateout
+ type(GFS_sfcprop_type), intent(inout ) :: Sfcprop
type(GFS_coupling_type), intent(inout) :: Coupling
- type(GFS_grid_type), intent(in ) :: Grid
- type(GFS_tbd_type), intent(in ) :: Tbd
- type(GFS_cldprop_type), intent(in ) :: Cldprop
- type(GFS_radtend_type), intent(in ) :: Radtend
+ type(GFS_grid_type), intent(inout ) :: Grid
+ type(GFS_tbd_type), intent(inout ) :: Tbd
+ type(GFS_cldprop_type), intent(inout ) :: Cldprop
+ type(GFS_radtend_type), intent(inout ) :: Radtend
type(GFS_diag_type), intent(inout) :: Diag
#endif
!--- local variables
diff --git gfsphysics/GFS_layer/GFS_physics_driver.F90 gfsphysics/GFS_layer/GFS_physics_driver.F90
index 06c710f..76bcaed 100644
--- gfsphysics/GFS_layer/GFS_physics_driver.F90
+++ gfsphysics/GFS_layer/GFS_physics_driver.F90
@@ -462,12 +462,12 @@ module module_physics_driver
type(GFS_radtend_type), intent(inout) :: Radtend
type(GFS_diag_type), intent(inout) :: Diag
#else
- type(GFS_control_type), intent(in) :: Model
+ type(GFS_control_type), intent(inout) :: Model
type(GFS_statein_type), intent(inout) :: Statein
type(GFS_stateout_type), intent(inout) :: Stateout
type(GFS_sfcprop_type), intent(inout) :: Sfcprop
type(GFS_coupling_type), intent(inout) :: Coupling
- type(GFS_grid_type), intent(in) :: Grid
+ type(GFS_grid_type), intent(inout) :: Grid
type(GFS_tbd_type), intent(inout) :: Tbd
type(GFS_cldprop_type), intent(inout) :: Cldprop
type(GFS_radtend_type), intent(inout) :: Radtend
diff --git gfsphysics/GFS_layer/GFS_radiation_driver.F90 gfsphysics/GFS_layer/GFS_radiation_driver.F90
index 8df0142..799808f 100644
--- gfsphysics/GFS_layer/GFS_radiation_driver.F90
+++ gfsphysics/GFS_layer/GFS_radiation_driver.F90
@@ -1045,14 +1045,14 @@
type(GFS_radtend_type), intent(inout) :: Radtend
type(GFS_diag_type), intent(inout) :: Diag
#else
- type(GFS_control_type), intent(in) :: Model
- type(GFS_statein_type), intent(in) :: Statein
+ type(GFS_control_type), intent(inout) :: Model
+ type(GFS_statein_type), intent(inout) :: Statein
type(GFS_stateout_type), intent(inout) :: Stateout
- type(GFS_sfcprop_type), intent(in) :: Sfcprop
+ type(GFS_sfcprop_type), intent(inout) :: Sfcprop
type(GFS_coupling_type), intent(inout) :: Coupling
- type(GFS_grid_type), intent(in) :: Grid
- type(GFS_tbd_type), intent(in) :: Tbd
- type(GFS_cldprop_type), intent(in) :: Cldprop
+ type(GFS_grid_type), intent(inout) :: Grid
+ type(GFS_tbd_type), intent(inout) :: Tbd
+ type(GFS_cldprop_type), intent(inout) :: Cldprop
type(GFS_radtend_type), intent(inout) :: Radtend
type(GFS_diag_type), intent(inout) :: Diag
#endif
4 changes: 1 addition & 3 deletions scripts/build_esmf.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/bash

set -exo pipefail
set -ex

export COMP=${COMP:-gnu}

NPROCS=`nproc`
export MAKEFLAGS="-j ${NPROCS}"
#install directory and compiler flag
INSTALL_DIR=${INSTALL_DIR:-/usr/local}
SRC_DIR=${SRC_DIR:-/opt}
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_mpi.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -exo pipefail
set -ex

#install directory and compiler flag
INSTALL_DIR=${INSTALL_DIR:-/usr/local}
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_nceplibs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -exo pipefail
set -ex

export COMP=${COMP:-gnu}

Expand Down
4 changes: 1 addition & 3 deletions scripts/build_netcdf.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/bash

set -exo pipefail
set -ex

export COMP=${COMP:-gnu}

NPROCS=`nproc`
export MAKEFLAGS="-j ${NPROCS}"
#install directory and compiler flag
INSTALL_DIR=${INSTALL_DIR:-/usr/local}
SRC_DIR=${SRC_DIR:-/opt}
Expand Down

0 comments on commit f16dc6f

Please sign in to comment.