From 272f732a41067ef09d3898277148de9d80a92434 Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Sun, 18 Dec 2022 22:39:03 -0500 Subject: [PATCH 01/22] Add Dockerfile to build standalone_stochy --- stochastic_physics.F90 | 36 ++++++++++++------------- unit_tests/Dockerfile | 15 +++++++++++ unit_tests/build_standalone.sh | 45 ++++++++++++++++++++++++++++++++ unit_tests/standalone_stochy.F90 | 6 +---- 4 files changed, 77 insertions(+), 25 deletions(-) create mode 100644 unit_tests/Dockerfile create mode 100755 unit_tests/build_standalone.sh diff --git a/stochastic_physics.F90 b/stochastic_physics.F90 index 7d95dac..6738d0f 100644 --- a/stochastic_physics.F90 +++ b/stochastic_physics.F90 @@ -19,13 +19,9 @@ module stochastic_physics !>@details It reads the stochastic physics namelist (nam_stoch and nam_sfcperts) !allocates and polulates the necessary arrays -subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in, fn_nml, nlunit, & - xlon,xlat, & - do_sppt_in, do_shum_in, do_skeb_in, lndp_type_in, n_var_lndp_in, use_zmtnblck_out, skeb_npass_out, & - lndp_var_list_out, lndp_prt_list_out, & - n_var_spp_in, spp_var_list_out, spp_prt_list_out, spp_stddev_cutoff_out, do_spp_in, & - ak, bk, nthreads, mpiroot, mpicomm, iret) -!\callgraph +subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in, fn_nml, nlunit, xlon,xlat, do_sppt_in, do_shum_in, do_skeb_in, lndp_type_in, n_var_lndp_in, use_zmtnblck_out, skeb_npass_out, lndp_var_list_out, lndp_prt_list_out, n_var_spp_in, spp_var_list_out, spp_prt_list_out, spp_stddev_cutoff_out, do_spp_in, ak, bk, nthreads, mpiroot, mpicomm, iret) + + !\callgraph !use stochy_internal_state_moa use stochy_data_mod, only : init_stochdata,gg_lats,gg_lons,nsppt, & rad2deg,INTTYP,wlon,rnlat,gis_stochy, & @@ -48,17 +44,17 @@ subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in character(len=*), intent(in) :: fn_nml real(kind=kind_phys), intent(in) :: xlon(:,:) real(kind=kind_phys), intent(in) :: xlat(:,:) -logical, intent(in) :: do_sppt_in, do_shum_in, do_skeb_in ,do_spp_in +logical, intent(in), optional :: do_sppt_in, do_shum_in, do_skeb_in ,do_spp_in integer, intent(in) :: lndp_type_in, n_var_lndp_in -integer, intent(in) :: n_var_spp_in +integer, intent(in), optional :: n_var_spp_in real(kind=kind_phys), intent(in) :: ak(:), bk(:) logical, intent(out) :: use_zmtnblck_out -integer, intent(out) :: skeb_npass_out +integer, intent(out) :: skeb_npass_out character(len=3), dimension(:), intent(out) :: lndp_var_list_out real(kind=kind_phys), dimension(:), intent(out) :: lndp_prt_list_out -character(len=3), dimension(:), intent(out) :: spp_var_list_out -real(kind=kind_phys), dimension(:), intent(out) :: spp_prt_list_out -real(kind=kind_phys), dimension(:), intent(out) :: spp_stddev_cutoff_out +character(len=3), dimension(:), intent(out), optional :: spp_var_list_out +real(kind=kind_phys), dimension(:), intent(out), optional :: spp_prt_list_out +real(kind=kind_phys), dimension(:), intent(out), optional :: spp_stddev_cutoff_out ! Local variables @@ -351,13 +347,13 @@ subroutine run_stochastic_physics(levs, kdt, fhour, blksz, sppt_wts, shum_wts, s integer, intent(in) :: levs, kdt real(kind=kind_phys), intent(in) :: fhour integer, intent(in) :: blksz(:) -real(kind=kind_phys), intent(inout) :: sppt_wts(:,:,:) -real(kind=kind_phys), intent(inout) :: shum_wts(:,:,:) -real(kind=kind_phys), intent(inout) :: skebu_wts(:,:,:) -real(kind=kind_phys), intent(inout) :: skebv_wts(:,:,:) -real(kind=kind_phys), intent(inout) :: sfc_wts(:,:,:) -real(kind=kind_phys), intent(inout) :: spp_wts(:,:,:,:) -integer, intent(in) :: nthreads +real(kind=kind_phys), intent(inout), optional :: sppt_wts(:,:,:) +real(kind=kind_phys), intent(inout), optional :: shum_wts(:,:,:) +real(kind=kind_phys), intent(inout), optional :: skebu_wts(:,:,:) +real(kind=kind_phys), intent(inout), optional :: skebv_wts(:,:,:) +real(kind=kind_phys), intent(inout), optional :: sfc_wts(:,:,:) +real(kind=kind_phys), intent(inout), optional :: spp_wts(:,:,:,:) +integer, intent(in), optional :: nthreads real(kind_dbl_prec),allocatable :: tmp_wts(:,:),tmpu_wts(:,:,:),tmpv_wts(:,:,:),tmpl_wts(:,:,:),tmp_spp_wts(:,:,:) !D-grid diff --git a/unit_tests/Dockerfile b/unit_tests/Dockerfile new file mode 100644 index 0000000..41db40c --- /dev/null +++ b/unit_tests/Dockerfile @@ -0,0 +1,15 @@ +From noaaepic/ubuntu20.04-gnu9.3-hpc-stack:v1.2 + +CMD ["/bin/bash"] + +ENV HOME=/home/builder + +COPY --chown=builder:builder stochastic_physics $HOME/stochastic_physics + +USER builder + +ENV USER=builder + +WORKDIR $HOME/stochastic_physics/unit_tests + +RUN /bin/sh -c $HOME/stochastic_physics/unit_tests/build_standalone.sh diff --git a/unit_tests/build_standalone.sh b/unit_tests/build_standalone.sh new file mode 100755 index 0000000..bf15695 --- /dev/null +++ b/unit_tests/build_standalone.sh @@ -0,0 +1,45 @@ +#!/bin/sh +compile_all=1 +DEBUG=1 + +#rm standalone_stochy.x +FMS_ROOT=/home/builder/opt +NETCDF=/home/builder/opt +echo ${FMS_ROOT} +FC=mpif90 +FMS_INC=${FMS_ROOT}/include_r4 +FMS_LIB=${FMS_ROOT}/lib +INCS="-I. -I${FMS_INC} -I${NETCDF}/include" +if [ $DEBUG -eq 1 ]; then + FLAGS="-DDEBUG -ggdb -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -g -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check -I. -fopenmp -c -Wargument-mismatch "$INCS +else + FLAGS="-ggdb -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check -O2 -fdefault-real-8 -O2 -fPIC -fopenmp -c -Wargument-mismatch "$INCS +fi +cd .. +if [ $compile_all -eq 1 ];then + rm -f *.i90 *.i *.o *.mod lib*a + $FC ${FLAGS} kinddef.F90 + $FC ${FLAGS} mpi_wrapper.F90 + $FC ${FLAGS} unit_tests/fv_arrays_stub.F90 + $FC ${FLAGS} unit_tests/fv_mp_stub_mod.F90 + $FC ${FLAGS} unit_tests/fv_control_stub.F90 + $FC ${FLAGS} unit_tests/atmosphere_stub.F90 + $FC ${FLAGS} mersenne_twister.F90 + $FC ${FLAGS} stochy_internal_state_mod.F90 + $FC ${FLAGS} stochy_namelist_def.F90 + $FC ${FLAGS} spectral_transforms.F90 + $FC ${FLAGS} compns_stochy.F90 + $FC ${FLAGS} stochy_patterngenerator.F90 + $FC ${FLAGS} stochy_data_mod.F90 + $FC ${FLAGS} get_stochy_pattern.F90 + $FC ${FLAGS} lndp_apply_perts.F90 + $FC ${FLAGS} stochastic_physics.F90 +fi +ar rv libstochastic_physics.a *.o +if [ $DEBUG -eq 1 ]; then + $FC -fdec -ggdb -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -g -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check -I. -fopenmp -o unit_tests/standalone_stochy.x unit_tests/standalone_stochy.F90 ${INCS} -I${NETCDF}/include -L. -lstochastic_physics -L${FMS_LIB} -lfms_r4 -L${ESMF_LIB} -Wl,-rpath,${ESMF_LIB} -lesmf -L${NETCDF}/lib -lnetcdff -lnetcdf -L${HDF5_LIBRARIES} -lhdf5_hl -lhdf5 \ +-L${ZLIB_LIBRARIES} -lz -ldl +else + $FC -fdec -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check -fdefault-real-8 -fdefault-double-8 -g -O2 -I. -fopenmp -o unit_tests/standalone_stochy.x unit_tests/standalone_stochy.F90 ${INCS} -I${NETCDF}/include -L. -lstochastic_physics -L${FMS_LIB} -lfms_r4 -L${ESMF_LIB} -Wl,-rpath,${ESMF_LIB} -lesmf -L${NETCDF}/lib -lnetcdff -lnetcdf -L${HDF5_LIBRARIES} -lhdf5_hl -lhdf5 \ +-L${ZLIB_LIBRARIES} -lz -ldl +fi diff --git a/unit_tests/standalone_stochy.F90 b/unit_tests/standalone_stochy.F90 index d91e368..94a0162 100644 --- a/unit_tests/standalone_stochy.F90 +++ b/unit_tests/standalone_stochy.F90 @@ -179,11 +179,7 @@ program standalone_stochy allocate(input_nml_file(1)) input_nml_file='input.nml' comm=MPI_COMM_WORLD -call init_stochastic_physics(nlevs, blksz, dtp, sppt_amp, & - input_nml_file, fn_nml, nlunit, xlon, xlat, do_sppt, do_shum, & - do_skeb, lndp_type, n_var_lndp, use_zmtnblck, skeb_npass, & - lndp_var_list, lndp_prt_list, & - ak, bk, nthreads, root_pe, comm, ierr) +call init_stochastic_physics(nlevs, blksz, dtp, sppt_amp, input_nml_file, fn_nml, nlunit, xlon, xlat, do_sppt, do_shum, do_skeb, lndp_type, n_var_lndp, use_zmtnblck, skeb_npass, lndp_var_list, lndp_prt_list, ak=ak, bk=bk, nthreads=nthreads, mpiroot=root_pe, mpicomm=comm, iret=ierr) if (ierr .ne. 0) print *, 'ERROR init_stochastic_physics call' ! Draper - need proper error trapping here call get_outfile(fname) write(strid,'(I2.2)') my_id+1 From 891823324177b4a9206eed406b04492f15b8434a Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Mon, 19 Dec 2022 06:55:53 -0500 Subject: [PATCH 02/22] update stochastic_physics.F90 --- stochastic_physics.F90 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/stochastic_physics.F90 b/stochastic_physics.F90 index 6738d0f..0539745 100644 --- a/stochastic_physics.F90 +++ b/stochastic_physics.F90 @@ -19,9 +19,13 @@ module stochastic_physics !>@details It reads the stochastic physics namelist (nam_stoch and nam_sfcperts) !allocates and polulates the necessary arrays -subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in, fn_nml, nlunit, xlon,xlat, do_sppt_in, do_shum_in, do_skeb_in, lndp_type_in, n_var_lndp_in, use_zmtnblck_out, skeb_npass_out, lndp_var_list_out, lndp_prt_list_out, n_var_spp_in, spp_var_list_out, spp_prt_list_out, spp_stddev_cutoff_out, do_spp_in, ak, bk, nthreads, mpiroot, mpicomm, iret) - - !\callgraph +subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in, fn_nml, nlunit, & + xlon,xlat, & + do_sppt_in, do_shum_in, do_skeb_in, lndp_type_in, n_var_lndp_in, use_zmtnblck_out, skeb_npass_out, & + lndp_var_list_out, lndp_prt_list_out, & + n_var_spp_in, spp_var_list_out, spp_prt_list_out, spp_stddev_cutoff_out, do_spp_in, & + ak, bk, nthreads, mpiroot, mpicomm, iret) +!\callgraph !use stochy_internal_state_moa use stochy_data_mod, only : init_stochdata,gg_lats,gg_lons,nsppt, & rad2deg,INTTYP,wlon,rnlat,gis_stochy, & @@ -56,7 +60,6 @@ subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in real(kind=kind_phys), dimension(:), intent(out), optional :: spp_prt_list_out real(kind=kind_phys), dimension(:), intent(out), optional :: spp_stddev_cutoff_out - ! Local variables real(kind=kind_phys), parameter :: con_pi =4.0d0*atan(1.0d0) integer :: nblks,len From c3852479e9d1a76570bb66b18a3e2fbe2e53d5a9 Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Mon, 19 Dec 2022 07:14:47 -0500 Subject: [PATCH 03/22] add git action yml --- .github/workflows/build-containers.yml | 23 +++++++++ .github/workflows/build-containers.yml~ | 69 +++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/build-containers.yml create mode 100644 .github/workflows/build-containers.yml~ diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml new file mode 100644 index 0000000..39bf793 --- /dev/null +++ b/.github/workflows/build-containers.yml @@ -0,0 +1,23 @@ +############################################################## +# Rename the file extension to "._yaml" (remove "_") to enable +############################################################## + +name: Build and Push Images (Docker) + +on: + # run it on push to the default repository branch + push: + branches: [feature/dockerfile] + +jobs: + build: + runs-on: ubuntu-latest + name: Build Docker Image ....... + steps: + - uses: actions/checkout@v2 + - name: docker build stochastic_physics unit test + run: | + echo "docker build image stochastic_physics unit test" + docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . + + diff --git a/.github/workflows/build-containers.yml~ b/.github/workflows/build-containers.yml~ new file mode 100644 index 0000000..1fa2d18 --- /dev/null +++ b/.github/workflows/build-containers.yml~ @@ -0,0 +1,69 @@ +############################################################## +# Rename the file extension to "._yaml" (remove "_") to enable +############################################################## + +name: Build and Push Images (Docker) + +on: + # run it on push to the default repository branch + push: + branches: [main] + # run it during pull request + pull_request: + +jobs: + build: + runs-on: ubuntu-latest # windows-latest | macos-latest + #container: noaaepic/ubuntu20.04-gnu9.3 + name: Build Docker Images and Push ....... + steps: + - uses: actions/checkout@v2 + - uses: jitterbit/get-changed-files@v1 + id: abc + with: + format: space-delimited + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Login to DockerHub Registry + run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + + - name: docker build tag noaaepic/ubuntu20.04-hpc-stack + run: | + echo ${{ steps.abc.outputs.all }} + for file in ${{ steps.abc.outputs.all }}; do + if [[ $file == *"ubuntu20.04-gnu9.3-hpc-stack.docker"* ]]; then + echo "docker build tag noaaepic/ubuntu20.04-hpc-stack" + docker build -t noaaepic/ubuntu20.04-hpc-stack:0.1 -f ./docker/ubuntu20.04-gnu9.3-hpc-stack.docker . + fi + done + - name: docker push tag noaaepic/ubuntu20.04-hpc-stack + run: | + echo ${{ steps.abc.outputs.all }} + for file in ${{ steps.abc.outputs.all }}; do + if [[ $file == *"ubuntu20.04-gnu9.3-hpc-stack.docker"* ]]; then + echo "docker push tag noaaepic/ubuntu20.04-hpc-stack:0.1" + docker push noaaepic/ubuntu20.04-hpc-stack:0.1 + fi + done + - name: docker build tag noaaepic/ubuntu20.04-epic-srwapp + run: | + echo ${{ steps.abc.outputs.all }} + for file in ${{ steps.abc.outputs.all }}; do + if [[ $file == *"ubuntu20.04-ufs-srwapp.docker"* ]]; then + echo "docker build tag noaaepic/ubuntu20.04-epic-srwapp" + docker build -t noaaepic/ubuntu20.04-epic-srwapp:1.0 -f ./docker/ubuntu20.04-ufs-srwapp.docker . + fi + done + - name: docker push tag noaaepic/ubuntu20.04-epic-srwapp + run: | + echo ${{ steps.abc.outputs.all }} + for file in ${{ steps.abc.outputs.all }}; do + if [[ $file == *"ubuntu20.04-ufs-srwapp.docker"* ]]; then + echo "docker push tag noaaepic/ubuntu20.04-epic-srwapp:1.0" + docker push noaaepic/ubuntu20.04-epic-srwapp:1.0 + fi + done + + - name: docker logout + run: | + docker logout From e5e0e5123184a0dcbc5603d3f20e03b2537228ef Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Mon, 19 Dec 2022 07:15:44 -0500 Subject: [PATCH 04/22] removed *~ file --- .github/workflows/build-containers.yml~ | 69 ------------------------- 1 file changed, 69 deletions(-) delete mode 100644 .github/workflows/build-containers.yml~ diff --git a/.github/workflows/build-containers.yml~ b/.github/workflows/build-containers.yml~ deleted file mode 100644 index 1fa2d18..0000000 --- a/.github/workflows/build-containers.yml~ +++ /dev/null @@ -1,69 +0,0 @@ -############################################################## -# Rename the file extension to "._yaml" (remove "_") to enable -############################################################## - -name: Build and Push Images (Docker) - -on: - # run it on push to the default repository branch - push: - branches: [main] - # run it during pull request - pull_request: - -jobs: - build: - runs-on: ubuntu-latest # windows-latest | macos-latest - #container: noaaepic/ubuntu20.04-gnu9.3 - name: Build Docker Images and Push ....... - steps: - - uses: actions/checkout@v2 - - uses: jitterbit/get-changed-files@v1 - id: abc - with: - format: space-delimited - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Login to DockerHub Registry - run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - - - name: docker build tag noaaepic/ubuntu20.04-hpc-stack - run: | - echo ${{ steps.abc.outputs.all }} - for file in ${{ steps.abc.outputs.all }}; do - if [[ $file == *"ubuntu20.04-gnu9.3-hpc-stack.docker"* ]]; then - echo "docker build tag noaaepic/ubuntu20.04-hpc-stack" - docker build -t noaaepic/ubuntu20.04-hpc-stack:0.1 -f ./docker/ubuntu20.04-gnu9.3-hpc-stack.docker . - fi - done - - name: docker push tag noaaepic/ubuntu20.04-hpc-stack - run: | - echo ${{ steps.abc.outputs.all }} - for file in ${{ steps.abc.outputs.all }}; do - if [[ $file == *"ubuntu20.04-gnu9.3-hpc-stack.docker"* ]]; then - echo "docker push tag noaaepic/ubuntu20.04-hpc-stack:0.1" - docker push noaaepic/ubuntu20.04-hpc-stack:0.1 - fi - done - - name: docker build tag noaaepic/ubuntu20.04-epic-srwapp - run: | - echo ${{ steps.abc.outputs.all }} - for file in ${{ steps.abc.outputs.all }}; do - if [[ $file == *"ubuntu20.04-ufs-srwapp.docker"* ]]; then - echo "docker build tag noaaepic/ubuntu20.04-epic-srwapp" - docker build -t noaaepic/ubuntu20.04-epic-srwapp:1.0 -f ./docker/ubuntu20.04-ufs-srwapp.docker . - fi - done - - name: docker push tag noaaepic/ubuntu20.04-epic-srwapp - run: | - echo ${{ steps.abc.outputs.all }} - for file in ${{ steps.abc.outputs.all }}; do - if [[ $file == *"ubuntu20.04-ufs-srwapp.docker"* ]]; then - echo "docker push tag noaaepic/ubuntu20.04-epic-srwapp:1.0" - docker push noaaepic/ubuntu20.04-epic-srwapp:1.0 - fi - done - - - name: docker logout - run: | - docker logout From 1bc44a74686851a084ee8da5f20a6abf32beca14 Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Mon, 19 Dec 2022 07:27:53 -0500 Subject: [PATCH 05/22] work on git action yml --- .github/workflows/build-containers.yml | 1 + unit_tests/dockerfile | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 unit_tests/dockerfile diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 39bf793..4e989f3 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -18,6 +18,7 @@ jobs: - name: docker build stochastic_physics unit test run: | echo "docker build image stochastic_physics unit test" + echo $(ls) docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . diff --git a/unit_tests/dockerfile b/unit_tests/dockerfile new file mode 100644 index 0000000..41db40c --- /dev/null +++ b/unit_tests/dockerfile @@ -0,0 +1,15 @@ +From noaaepic/ubuntu20.04-gnu9.3-hpc-stack:v1.2 + +CMD ["/bin/bash"] + +ENV HOME=/home/builder + +COPY --chown=builder:builder stochastic_physics $HOME/stochastic_physics + +USER builder + +ENV USER=builder + +WORKDIR $HOME/stochastic_physics/unit_tests + +RUN /bin/sh -c $HOME/stochastic_physics/unit_tests/build_standalone.sh From 5b4e7d5f09e8df301f465c4a1254a268489b4460 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Mon, 19 Dec 2022 07:31:48 -0500 Subject: [PATCH 06/22] Update build-containers.yml --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 4e989f3..4838713 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -18,7 +18,7 @@ jobs: - name: docker build stochastic_physics unit test run: | echo "docker build image stochastic_physics unit test" - echo $(ls) + ls docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . From 8b33511fcb7dca61f29bae0e8e2eee5af6f7b780 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Mon, 19 Dec 2022 07:33:14 -0500 Subject: [PATCH 07/22] Update build-containers.yml --- .github/workflows/build-containers.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 4838713..39bf793 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -18,7 +18,6 @@ jobs: - name: docker build stochastic_physics unit test run: | echo "docker build image stochastic_physics unit test" - ls docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . From 81019175d940dd48139a86f61e6b8b95637396b4 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Mon, 19 Dec 2022 07:34:43 -0500 Subject: [PATCH 08/22] Update Dockerfile --- unit_tests/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit_tests/Dockerfile b/unit_tests/Dockerfile index 41db40c..758813b 100644 --- a/unit_tests/Dockerfile +++ b/unit_tests/Dockerfile @@ -4,7 +4,7 @@ CMD ["/bin/bash"] ENV HOME=/home/builder -COPY --chown=builder:builder stochastic_physics $HOME/stochastic_physics +COPY --chown=builder:builder . $HOME/stochastic_physics USER builder From 93a94be3d07e6dbb0318a25fd8a66ef39a992baa Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Mon, 19 Dec 2022 07:51:43 -0500 Subject: [PATCH 09/22] Update build-containers.yml --- .github/workflows/build-containers.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 39bf793..82c33d2 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -2,7 +2,7 @@ # Rename the file extension to "._yaml" (remove "_") to enable ############################################################## -name: Build and Push Images (Docker) +name: Build Stochastic_Physics Unit Test Images (Docker) on: # run it on push to the default repository branch @@ -12,12 +12,12 @@ on: jobs: build: runs-on: ubuntu-latest - name: Build Docker Image ....... + name: Build Docker Stochastic_Physics Unit Test Image ....... steps: - uses: actions/checkout@v2 - - name: docker build stochastic_physics unit test + - name: docker build stochastic_physics unit test image run: | - echo "docker build image stochastic_physics unit test" + echo "docker build stochastic_physics unit test image" docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . From 7a4f33ce8a13315d4440c3804a083a6de872d652 Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Mon, 19 Dec 2022 07:53:34 -0500 Subject: [PATCH 10/22] Delete dockerfile --- unit_tests/dockerfile | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 unit_tests/dockerfile diff --git a/unit_tests/dockerfile b/unit_tests/dockerfile deleted file mode 100644 index 41db40c..0000000 --- a/unit_tests/dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -From noaaepic/ubuntu20.04-gnu9.3-hpc-stack:v1.2 - -CMD ["/bin/bash"] - -ENV HOME=/home/builder - -COPY --chown=builder:builder stochastic_physics $HOME/stochastic_physics - -USER builder - -ENV USER=builder - -WORKDIR $HOME/stochastic_physics/unit_tests - -RUN /bin/sh -c $HOME/stochastic_physics/unit_tests/build_standalone.sh From 9b508b8a6f1d6d0022e795299b33c04e6cb4f352 Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Thu, 22 Dec 2022 09:50:40 -0500 Subject: [PATCH 11/22] add sphinx yml --- .github/workflows/sphinx.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/sphinx.yml diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml new file mode 100644 index 0000000..9be1018 --- /dev/null +++ b/.github/workflows/sphinx.yml @@ -0,0 +1,23 @@ +name: Sphinx build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build HTML + uses: ammaraskar/sphinx-action@master + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: html-docs + path: docs/build/html/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/feature/dockerfile' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html + \ No newline at end of file From cfbfcf6f3bdd0855b96366327f87fffc3b6bf71f Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Thu, 22 Dec 2022 10:01:12 -0500 Subject: [PATCH 12/22] turning off container yml --- .github/workflows/{build-containers.yml => build-containers._yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-containers.yml => build-containers._yml} (100%) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers._yml similarity index 100% rename from .github/workflows/build-containers.yml rename to .github/workflows/build-containers._yml From 790f76e2654f5c1a67f11723e3ba11f6ca8e2c5e Mon Sep 17 00:00:00 2001 From: JONG KIM Date: Thu, 22 Dec 2022 10:02:26 -0500 Subject: [PATCH 13/22] Update sphinx.yml --- .github/workflows/sphinx.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 9be1018..54a6589 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -20,4 +20,3 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html - \ No newline at end of file From e0f19d4341db0ebfc6131fd8844b7bfbd74747ad Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Thu, 22 Dec 2022 10:05:08 -0500 Subject: [PATCH 14/22] add requirements.txt --- docs/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..db6cf7e --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +furo==2021.11.16 From 8effb81245699e9e32d0e59665fba742d6d4a6ec Mon Sep 17 00:00:00 2001 From: jkbk2004 Date: Thu, 22 Dec 2022 10:11:41 -0500 Subject: [PATCH 15/22] comment out sphinx_rtd_theme --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index b33583b..589bcc8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -61,7 +61,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +#jk html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, From e76baf7eee30b626b42e43f51dc978486fec3972 Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:28:15 -0500 Subject: [PATCH 16/22] Update and rename sphinx.yml to auto_doc.yml --- .github/workflows/{sphinx.yml => auto_doc.yml} | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename .github/workflows/{sphinx.yml => auto_doc.yml} (69%) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/auto_doc.yml similarity index 69% rename from .github/workflows/sphinx.yml rename to .github/workflows/auto_doc.yml index 54a6589..6ca6986 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/auto_doc.yml @@ -1,10 +1,17 @@ -name: Sphinx build +name: Automated documentation build on: push +# push: +# branches: [ "main" ] +# pull_request: +# branches: [ "main" ] + jobs: build: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v3 - name: Build HTML @@ -16,7 +23,7 @@ jobs: path: docs/build/html/ - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/feature/dockerfile' + if: github.ref == 'refs/heads/feature/ci' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html From bdcd2714ef5cd10826d445aa36186430ede26a80 Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:30:54 -0500 Subject: [PATCH 17/22] Update build-containers._yml --- .github/workflows/build-containers._yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-containers._yml b/.github/workflows/build-containers._yml index 82c33d2..769b9ca 100644 --- a/.github/workflows/build-containers._yml +++ b/.github/workflows/build-containers._yml @@ -1,23 +1,17 @@ -############################################################## -# Rename the file extension to "._yaml" (remove "_") to enable -############################################################## - -name: Build Stochastic_Physics Unit Test Images (Docker) +name: Build stochastic physics unit test images (Docker) on: # run it on push to the default repository branch push: - branches: [feature/dockerfile] + branches: [feature/ci] jobs: build: runs-on: ubuntu-latest - name: Build Docker Stochastic_Physics Unit Test Image ....... + name: Build Docker Stochastic_Physics Unit Test Image steps: - uses: actions/checkout@v2 - name: docker build stochastic_physics unit test image run: | echo "docker build stochastic_physics unit test image" - docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . - - + docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile From dbe9994ea1d6fe32e335e31c3845dc10d0ea9ab2 Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:32:06 -0500 Subject: [PATCH 18/22] Rename build-containers._yml to build_container.yml --- .github/workflows/{build-containers._yml => build_container.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-containers._yml => build_container.yml} (100%) diff --git a/.github/workflows/build-containers._yml b/.github/workflows/build_container.yml similarity index 100% rename from .github/workflows/build-containers._yml rename to .github/workflows/build_container.yml From 36201cbd8643ad2d443dd8d73776e1e360267d70 Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:37:40 -0500 Subject: [PATCH 19/22] Update build_container.yml --- .github/workflows/build_container.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 769b9ca..abb49b5 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -8,6 +8,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write name: Build Docker Stochastic_Physics Unit Test Image steps: - uses: actions/checkout@v2 From d27326ce14121d1793081f7b75383d05679b8f0f Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:40:51 -0500 Subject: [PATCH 20/22] Update build_container.yml --- .github/workflows/build_container.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index abb49b5..bd70bfd 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -1,4 +1,4 @@ -name: Build stochastic physics unit test images (Docker) +name: Build stochastic physics unit test image (Docker) on: # run it on push to the default repository branch @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - name: Build Docker Stochastic_Physics Unit Test Image + name: Build docker stochastic physics unit test image steps: - uses: actions/checkout@v2 - name: docker build stochastic_physics unit test image run: | echo "docker build stochastic_physics unit test image" - docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile + docker build -t stochastic_physics_test -f ./unit_tests/Dockerfile . From ee1cca177e80c5911c4b9f259ae41711e77a2b3e Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:44:58 -0500 Subject: [PATCH 21/22] turn on push/pull to master --- .github/workflows/auto_doc.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/auto_doc.yml b/.github/workflows/auto_doc.yml index 6ca6986..7a9caa4 100644 --- a/.github/workflows/auto_doc.yml +++ b/.github/workflows/auto_doc.yml @@ -1,11 +1,11 @@ name: Automated documentation build -on: push +on: -# push: -# branches: [ "main" ] -# pull_request: -# branches: [ "main" ] + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] jobs: build: @@ -23,7 +23,7 @@ jobs: path: docs/build/html/ - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/feature/ci' + if: github.ref == 'refs/heads/master' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html From fc70d9d9fede366689d771c113f1c89a052506ae Mon Sep 17 00:00:00 2001 From: "RhaeSung.Kim" Date: Fri, 24 Feb 2023 11:46:11 -0500 Subject: [PATCH 22/22] turn on push/pull to master --- .github/workflows/build_container.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index bd70bfd..e82d7c8 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -3,7 +3,9 @@ name: Build stochastic physics unit test image (Docker) on: # run it on push to the default repository branch push: - branches: [feature/ci] + branches: [ "master" ] + pull_request: + branches: [ "master" ] jobs: build: