Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
5e694ee
EFDC: Remove OpenMP parallelisation AIX version
vt-max Dec 6, 2022
c6c040b
fixup: Remove OMP loops in additional files
vt-max Dec 12, 2022
d05dd3b
Remove OMP loop around buoyancy initialisation
vt-max Dec 12, 2022
4162d3f
Split lines that are considered too long
vt-max Nov 30, 2023
c65b91c
Replace write FMT containing bracketed variables
vt-max Nov 30, 2023
49fb53b
Replace deprecated `PAUSE` call with `READ`
vt-max Nov 30, 2023
5c02de7
Remove unused variables
vt-max Nov 30, 2023
231c08c
Resolve warning regarding lines with unused labels
vt-max Nov 30, 2023
075e74a
Replace non-standard function SECNDS by SECOND
vt-max Nov 30, 2023
9606649
Change SECOND() to CPU_TIME subroutine
vt-max Nov 30, 2023
9df3514
Resolve warning infinite loop on READ branch
vt-max Nov 30, 2023
1342731
Resolve compiler warnings due to `Wconversion`
vt-max Nov 30, 2023
83f2dfc
Initialise variables that are maybe uninitialised
vt-max Nov 30, 2023
02c772c
Revert "Resolve warning infinite loop on READ branch"
vt-max Dec 13, 2023
e511c5e
Transfer growth limit and algal rate prints
vt-max Nov 30, 2023
609b5aa
Match uppercase between implementations
vt-max Nov 30, 2023
f5d2d42
Drop unused variables and subroutine CALEBI0
vt-max Nov 30, 2023
c1e3854
Match format statement with NIER
vt-max Nov 30, 2023
103f940
Comment variable definitions to match NIER
vt-max Nov 30, 2023
a07100f
Initialise local variables
vt-max Dec 1, 2023
5a26a89
Add MPI-based subroutine implementations
vt-max Dec 4, 2023
c0bbc7b
Add the MPI module contained in MPI.f90
vt-max Dec 4, 2023
386639c
Move variables from function args to globals
vt-max Dec 4, 2023
5ae9729
Extend Makefile to compile MPI sources
vt-max Dec 4, 2023
063ebeb
Add README to track questionable patches
vt-max Dec 4, 2023
9549c0a
Include NIER patches for HDMT2T
vt-max Dec 4, 2023
e799bf6
Transfer missing loops to WQSKE3
vt-max Dec 4, 2023
194da9e
Initialise variables
vt-max Dec 4, 2023
af6201e
Add note regarding CALAVBOLD mpi differences
vt-max Dec 4, 2023
fe3088f
Transition patches from NIER to VARINIT.for
vt-max Dec 4, 2023
a522707
Setting NQCTYPM to EQ needs to be reverted?
vt-max Dec 13, 2023
969ab02
Add note on missing patch WQ3D.for in NIER
vt-max Dec 4, 2023
0ca3bfa
Include missing patch for maybe new variables
vt-max Dec 4, 2023
fed30eb
Scale variable initialisation with loop bound
vt-max Dec 4, 2023
3eb937e
Add WINDCOEFF and EFDC2 input card processing
vt-max Dec 4, 2023
622b0df
Make CALPUV2C consistent with NIER
vt-max Dec 4, 2023
b724060
Introduce remaining MPI related patches
vt-max Dec 5, 2023
d4a5587
Extract OMP thread through OMP_GET_MAX_THREADS
vt-max Dec 5, 2023
e7f5f74
Add MPI init, finialise, and subroutine calls
vt-max Dec 5, 2023
d4fa9fa
VFPROJ wip: repairs the visual studio project???
vt-max Dec 12, 2023
d638fc1
VFPROJ project file after first build attempt
vt-max Dec 12, 2023
9df1723
VFPROJ more updates to the vfproj file
vt-max Dec 12, 2023
a402fef
add missing source file EEXPOUT_opt_mpi
vt-max Dec 12, 2023
e749cca
VFPROJ: more updates
vt-max Dec 14, 2023
aee29be
fixup! Add MPI init, finialise, and subroutine calls
vt-max Dec 14, 2023
d842b34
wip: some were not initialised!!
vt-max Dec 14, 2023
29c22b7
VFPROJ another update
vt-max Dec 18, 2023
a00e6c1
fixup! wip: some were not initialised!!
vt-max Dec 18, 2023
ccd9fdb
Fix issue with reallocating space for cser series
Jan 22, 2024
8fc97bf
Initialize TIMESEC
Jan 22, 2024
ac20b80
Fix format specifiers
Jan 22, 2024
3320ef8
Correct nr of args to CALFQC
Jan 22, 2024
595e60c
Fix merge regression
Jan 22, 2024
102f8f8
Remove duplicate code after merge
Jan 22, 2024
d201f0a
Remove duplicat code after merge
Jan 22, 2024
4744a01
Add MPI to linker
Jan 22, 2024
ebd8990
Add fixes for solar radiation
Apr 25, 2024
fd12727
Initializi variables to zero
Apr 25, 2024
9e4e47f
Add check if file exists before delete
Apr 25, 2024
9034bb3
Pass correct number of arguments
Apr 25, 2024
6c9efec
Fix format specifier for debug logging
Apr 25, 2024
c69aea2
Fix typo
Apr 25, 2024
9cf736a
Stop calculation on NaN temperatures
Apr 25, 2024
f870fef
Update documentation
Apr 25, 2024
4b7bddd
Add gitignore
Apr 25, 2024
da64fb2
Remove debug output
May 22, 2024
66d01fe
Add error message when using DLL with multiple MPI processes
May 22, 2024
5623352
Disable wrapper debug output
May 22, 2024
7b6406b
Add implicit none and fix bug for dry cells
May 28, 2024
64d631e
Correct initialization of reals
May 28, 2024
cc0eeb8
Improve error message
May 28, 2024
c21ce8e
Add implicit none and variable declarations
May 28, 2024
f7d71f6
Add new version of EFDC.for main file, used for reference only
May 28, 2024
1f038d0
Call CALBUOY_mpi
May 28, 2024
3c7006a
Update solution
May 28, 2024
f743382
Fix issue with EE_WC.OUT not being created
Dec 9, 2024
b7e5c86
Rename solution
Dec 10, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@
<UseDebugLibraries>true</UseDebugLibraries>
<CLRSupport>false</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CLRSupport>false</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CLRSupport>false</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CLRSupport>false</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
10 changes: 10 additions & 0 deletions model_efdc_dll/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*genmod.*
*.obj
*.mod
*.lib
*.exp
*.u2d
*.pdb
*.manifest*

BuildLog.htm
29 changes: 21 additions & 8 deletions model_efdc_dll/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,27 @@ C73 ISVPH NPVPH ISRVPH IVPHXY

## Restart files

Input
| Input | Output |
| ------ | ---- |
| RESTART.INP | RESTART.OUT |
| RSTWD.INP | RSTWD.OUT |
| TEMP.RST | TEMP.RSTO |
| WQWCRST.INP | TEMP.RSTO |

## Run time period

| Template file | EFDC file | Keyword |
| -------------------------- | ------------------------ | ---- |
| `EFDC_TEMPLATE.INP` |`EFDC.INP` | `C7` `$N_REF_PERIODS$` |
| `EFDC_TEMPLATE.INP` | `EFDC.INP` | `C8` `$RELATIVE_TSTART$` (`TCON` must be 86400) |
| `TOX_EVENT2_TEMPLATE.INP` | `TOX_EVENT2.INP` | `$TSTART$` `$TSTOP$` |

### Logging

| File | Content |
| ----- | ------- |
| `model.log` | Initialisation of dll, displays exchange items supported by current EFDC configuration |
| `instance001.log` | Per instance log, logs data exchange with exchange item id for times and values, compute steps, etc. |

```
RESTART.INP, RSTWD.INP, TEMP.RST, WQWCRST.INP
```

Output

```
RESTART.OUT, RSTWD.OUT, TEMP.RSTO, WQWCRST.OUT
```
1 change: 1 addition & 0 deletions model_efdc_dll/native/efdc_fortran_dll/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x64/
309 changes: 221 additions & 88 deletions model_efdc_dll/native/efdc_fortran_dll/EfdcFortranDLL.vfproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function enlarge_cser_time_series(id,size_n,size_k,size_m) result(ret_val)
if ((size_n > csert(id)%NDCSER)) then

!reallocate instance memory
if (debug) print*, "enlarge_cser_time_series", id, n, m
if (debug) print*, "enlarge_cser_time_series", id, n, m , k
if (debug) print*, "enlarge_cser_time_series", id, size_n, size_m, size_k

allocate(csert_new%MCSER(new_m,NSTVM))
Expand Down Expand Up @@ -282,6 +282,7 @@ function enlarge_cser_time_series(id,size_n,size_k,size_m) result(ret_val)
CSER(1:n,1:k,1:m,:)= CSER_orig

deallocate(TCSER_orig, CSER_orig)
ndcser_max= NDCSER

!ALLOCATE(CSERT_EFDC(KCM,0:NCSERM,NSTVM))
!ALLOCATE(MCTLAST(NCSERM,NSTVM))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
subroutine model_init

use global
use mpi

! arguments
!real, intent(out) :: time_period

! local
CHARACTER(len=80) :: TITLE

call model_init_1
call model_init_1 ! opens output files

! ** CALL INPUT SUBROUTINE
CALL VARINIT

CALL INPUT(TITLE)

CALL MPI_DECOMPOSITION

call model_init_2

! ** READ RESTART CONDITIONS OR INITIALIZE SCALAR FIELDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ C ** DXDJ

use omp_lib
USE GLOBAL
USE MPI



Expand Down Expand Up @@ -1009,7 +1010,7 @@ C
C
C ** SET BOUNDARY CONDITION SWITCHES
C
CALL SETBCS
CALL SETBCS_mpi
C
C ** CALCUATE CURVATURE METRICS (NEW ADDITION)
C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,15 +714,7 @@ C
C
C ** INITIALIZE BUOYANCY AND EQUATION OF STATE
C
!$OMP PARALLEL DO PRIVATE(LF,LL)

do ithds=0,nthds-1
LF=jse(1,ithds)
LL=jse(2,ithds)
c
CALL CALBUOY(LF,LL)
c
enddo
CALL CALBUOY_mpi
C
C ** INITIALIZE SFL IF(ISRESTI.EQ.0.AND ISTRAN(4).GE.1)
C
Expand Down Expand Up @@ -994,7 +986,7 @@ C
ENDIF
5300 FORMAT(' M BELSURF ASURFEL ',
& ' VOLSEL',/)
5301 FORMAT(1X,I3,2X,F10.5,2X,E12.4,2X,E12.4)
5301 FORMAT(1X,I4,2X,F10.5,2X,E12.4,2X,E12.4)
5302 FORMAT(/)
5303 FORMAT(2X,F10.5,3(2X,E12.4))
C
Expand Down Expand Up @@ -1090,7 +1082,7 @@ C
C ** SMOOTH INITIAL SALINITY
C
IF(NSBMAX.GE.1)THEN
CALL SALTSMTH
CALL SALTSMTH_mpi
ENDIF
C
C ** OUTPUT INITIAL DEPTH AND SALINITY FIELDS
Expand Down Expand Up @@ -1131,12 +1123,16 @@ C
C
C ** INITIALIZE EFDC EXPLORER OUTPUT
C
IF(ISSPH(8).EQ.1.OR.ISBEXP.EQ.1) CALL EEXPOUT(1)
IF(IBIN_TYPE.EQ.1)THEN
IF(ISSPH(8).EQ.1.OR.ISBEXP.EQ.1) CALL EEXPOUT_mpi(1)
ELSEIF(IBIN_TYPE.EQ.0)THEN
IF(ISSPH(8).EQ.1.OR.ISBEXP.EQ.1) CALL EEXPOUT_opt_mpi(1)
ENDIF
! { GEOSR WRITE HYDRO FIELD FOR WQ ALONE : JGCHO 2010.11.10
C ** INITIALIZE EFDC HYDRO DISTRIBUTION OUTPUT
IF(ISRESTO.LT.-20)THEN
CALL RESTOUT(-20)
ENDIF
! IF(ISRESTO.LT.-20)THEN
! CALL RESTOUT(-20)
! ENDIF
! } GEOSR WRITE HYDRO FIELD FOR WQ ALONE : JGCHO 2010.11.10

END SUBROUTINE model_init_3
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ subroutine model_make_step(time_period)
write(*,'(A,F8.4,A,F6.1,A)') "time integration with HDMT from day ", TBEGIN, ' over ', time_period / 60.0, ' minutes'
CALL HDMT
elseif (IS2TIM.GE.1) then
write(*,'(A,F8.4,A,F6.1,A)') "time integration with HDMT2T from day ", TBEGIN, ' over ', time_period / 60.0, ' minutes'
CALL HDMT2T
write(*,'(A,F8.4,A,F6.1,A)') "time integration with HDMT2T_mpi from day ", TBEGIN, ' over ', time_period / 60.0, ' minutes'
CALL HDMT2T_mpi
end if

end subroutine model_make_step
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ function model_set_state(id) result(ret_val)
WQV, WQVX,&
ISRESTI, TIMEDAY, NXSP
use model_extra_global
use mpi

implicit none

Expand All @@ -552,6 +553,8 @@ function model_set_state(id) result(ret_val)

call INPUT(TITLE)

call MPI_DECOMPOSITION

call model_init_2

! Act like this is a restart
Expand Down
Loading