diff --git a/openacc_cuda_sample/cray.cmake b/openacc_cuda_sample/cray.cmake index 3485057..c6a5cef 100644 --- a/openacc_cuda_sample/cray.cmake +++ b/openacc_cuda_sample/cray.cmake @@ -21,4 +21,6 @@ if (TARGET_GPU) set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -g") else() set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -g -eZ -eD -Rb -Rc -Rd -Rp -Rs") -endif() \ No newline at end of file +endif() + +set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "") diff --git a/openacc_cuda_sample/src/m_parameterizations.f90 b/openacc_cuda_sample/src/m_parameterizations.f90 index 03dd80e..594d6a3 100644 --- a/openacc_cuda_sample/src/m_parameterizations.f90 +++ b/openacc_cuda_sample/src/m_parameterizations.f90 @@ -68,10 +68,10 @@ SUBROUTINE microphysics(npx, npy, nlev, t, qc, qv) IMPLICIT NONE ! arguments - INTEGER, INTENT(IN) :: npx, npy, nlev ! dimension of inputs - REAL*8, INTENT(INOUT) :: t(:,:,:) ! temperature - REAL*8, INTENT(IN) :: qc(:,:,:) ! cloud water content - REAL*8, INTENT(INOUT) :: qv(:,:,:) ! water vapour content + INTEGER, INTENT(IN) :: npx, npy, nlev ! dimension of inputs + REAL*8, INTENT(INOUT) :: t(npx,npy,nlev) ! temperature + REAL*8, INTENT(IN) :: qc(npx,npy,nlev) ! cloud water content + REAL*8, INTENT(INOUT) :: qv(npx,npy,nlev) ! water vapour content ! local variables INTEGER :: i, j, k ! loop indices diff --git a/openacc_cuda_sample/src/main.f90 b/openacc_cuda_sample/src/main.f90 index 08808b8..e077f77 100644 --- a/openacc_cuda_sample/src/main.f90 +++ b/openacc_cuda_sample/src/main.f90 @@ -18,8 +18,10 @@ PROGRAM main ! local variables INTEGER :: ntstep + INTEGER :: mpi_error INTEGER, parameter :: itimloop = 5 - + + CALL MPI_init(mpi_error) CALL initialize() !---------------------------------------------------------------------------- @@ -49,4 +51,6 @@ PROGRAM main CALL cleanup() + CALL MPI_finalize(mpi_error) + END PROGRAM main