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

Cmmb #713

Closed
wants to merge 2 commits into from
Closed

Cmmb #713

wants to merge 2 commits into from

Conversation

pvelissariou1
Copy link

Pull Request Summary

Workaround to compile with gfortran >= 10; argument mismatch errors when compiling with gfortran >= 10

Description

This fix degrades argument mismatch in procedures from errors to warnings when WW3 is compiled using gcc/gfortran >= 10.
It passes the flag "-fallow-argument-mismatch" to gfortran if gfortran >= 10.
This is an an enhancement to the GNU build system.

Please see the list of affected files:

================================================================================

w3iorsmd.F90:507:38:

493 | ( NRQ, IRQRSS, IERR_MPI )
| 2
......
507 | ( NRQ, IRQRSS(IH), IERR_MPI )
| 1
Warning: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
w3iorsmd.F90:528:32:

493 | ( NRQ, IRQRSS, IERR_MPI )
| 2
......
528 | ( 1, IRQRSS(IB), IERR_MPI )
| 1
Warning: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
w3iorsmd.F90:611:30:

503 | ( NRQ, IRQRSS(IH), STAT1, IERR_MPI )
| 2
......
611 | ( NRQRS, IRQRS , STAT2, IERR_MPI )
| 1
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)

================================================================================

================================================================================

w3iosfmd.F90:476:26:

470 | CALL MPI_SEND ( ICPRT, ICSIZ, MPI_REAL, NAPPRT-1, IT, &
| 2
......
476 | ( DTPRT, 6*DTSIZ, MPI_REAL, NAPPRT-1, &
| 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
w3iosfmd.F90:513:28:

504 | CALL MPI_RECV ( ICP, ICSIZ, MPI_REAL, JAPROC-1, IT, &
| 2
......
513 | ( DTP, DIMP*DTSIZ, MPI_REAL, JAPROC-1, &
| 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).

================================================================================

================================================================================

w3wavemd.F90:1316:38:

1316 | CALL MPI_STARTALL ( NRQGO, IRQGO , IERR_MPI )
| 1
......
1887 | MPI_STARTALL ( NRQSG2, IRQSG2(IOFF,2), IERR_MPI )
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1323:39:

1323 | CALL MPI_STARTALL ( NRQGO2, IRQGO2, IERR_MPI )
| 1
......
1887 | MPI_STARTALL ( NRQSG2, IRQSG2(IOFF,2), IERR_MPI )
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1335:47:

1335 | CALL MPI_STARTALL ( NRQPO, IRQPO1, IERR_MPI )
| 1
......
1887 | MPI_STARTALL ( NRQSG2, IRQSG2(IOFF,2), IERR_MPI )
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1343:47:

1343 | CALL MPI_STARTALL ( NRQRS, IRQRS , IERR_MPI )
| 1
......
1887 | MPI_STARTALL ( NRQSG2, IRQSG2(IOFF,2), IERR_MPI )
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1351:48:

1351 | CALL MPI_STARTALL ( NRQBP , IRQBP1, IERR_MPI )
| 1
......
1887 | MPI_STARTALL ( NRQSG2, IRQSG2(IOFF,2), IERR_MPI )
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1360:46:

1360 | CALL MPI_STARTALL (NRQBP2,IRQBP2,IERR_MPI)
| 1
......
1887 | MPI_STARTALL ( NRQSG2, IRQSG2(IOFF,2), IERR_MPI )
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1388:43:

1388 | ( NRQGO2, IRQGO2, STATIO, IERR_MPI )
| 1
......
1913 | MPI_WAITALL ( NRQSG2, IRQSG2(IOFF,2), &
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1420:42:

1420 | ( NRQBP2, IRQBP2,STATIO, IERR_MPI )
| 1
......
1913 | MPI_WAITALL ( NRQSG2, IRQSG2(IOFF,2), &
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1459:38:

1459 | ( NRQGO, IRQGO , STATIO, IERR_MPI )
| 1
......
1913 | MPI_WAITALL ( NRQSG2, IRQSG2(IOFF,2), &
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1461:38:

1461 | ( NRQPO, IRQPO1, STATIO, IERR_MPI )
| 1
......
1913 | MPI_WAITALL ( NRQSG2, IRQSG2(IOFF,2), &
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1463:38:

1463 | ( NRQRS, IRQRS , STATIO, IERR_MPI )
| 1
......
1913 | MPI_WAITALL ( NRQSG2, IRQSG2(IOFF,2), &
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
w3wavemd.F90:1465:38:

1465 | ( NRQBP, IRQBP1, STATIO, IERR_MPI )
| 1
......
1913 | MPI_WAITALL ( NRQSG2, IRQSG2(IOFF,2), &
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)

================================================================================

================================================================================

wmgridmd.F90:284:30:

271 | CALL MPI_BCAST ( GRIDS(I)%MAPSTA(1,1), NXYG, &
| 2
......
284 | CALL MPI_BCAST ( GRIDS(I)%CLATIS(1), NSEA, MPI_REAL, 0,&
| 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).

================================================================================

================================================================================

wminiomd.F90:531:33:

531 | CALL MPI_IRECV ( BPSTGE(IMOD,J)%VTIME, 2, &
| 1
......
1948 | CALL MPI_IRECV ( SEQL(1,I,IA), &
| 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).
wminiomd.F90:243:35:

243 | CALL MPI_ISEND ( BPSTGE(J,IMOD)%STIME, 2, &
| 1
......
1742 | CALL MPI_ISEND ( SEQL(1,I), NSPEC, MPI_REAL, IP-1, &
| 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).

================================================================================

================================================================================

wminitmd.F90:4769:29:

4760 | CALL MPI_BCAST ( TOUTP(1,I), 2, MPI_INTEGER, 0, &
| 2
......
4769 | CALL MPI_BCAST ( FLAGLL,1, MPI_LOGICAL, 0, &
| 1
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).

================================================================================

================================================================================

wmwavemd.F90:1392:32:

1392 | CALL MPI_SEND ( DATA, NR, MPI_INTEGER, IP-1, &
| 1
......
1528 | CALL MPI_SEND ( DUMMY, 1, MPI_INTEGER, IP-1, &
| 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).
wmwavemd.F90:1402:26:

1402 | CALL MPI_RECV ( DATA, NR, MPI_INTEGER, CROOT-1, ITAG, &
| 1
......
1537 | CALL MPI_RECV ( DUMMY, 1, MPI_INTEGER, 0, ITAG, &
| 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).

================================================================================

Commit Message

Workaround to compile with gfortran >= 10; argument mismatch errors when compiling with gfortran >= 10

Check list

Testing

  • How were these changes tested?
    Locally with gfortran v8.3 and gfortran v10.3.1

@JessicaMeixner-NOAA
Copy link
Collaborator

@pvelissariou1 thank you for your PR. I believe @aliabdolali has chatted with you offline, but I wanted to comment here that this PR has not been acted on because of #697 and corresponding upcoming PR #726 which removes the GNU make build in WW3. Would it be okay with you to close this PR? In addition, should we move some of the contents of your PR to an issue so that we can keep track of 1. testing to see if these are issues with the CMAKE build as well and/or 2. Address the underlying code issues that are requiring additional compiler flags with gfortran >= 10?

@aliabdolali
Copy link
Contributor

Hi @pvelissariou1. I am closing this PR and made an issue associated with it.
#760
Thanks for reporting it and providing the quick workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants