Index: palm/trunk/SOURCE/pmc_mpi_wrapper.f90
===================================================================
--- palm/trunk/SOURCE/pmc_mpi_wrapper.f90	(revision 1765)
+++ palm/trunk/SOURCE/pmc_mpi_wrapper.f90	(revision 1779)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-!
+! kind=dp replaced by wp
 !
 ! Former revisions:
@@ -53,11 +53,4 @@
    SAVE
 
-!-- TO_DO: what is the meaning of this? Could variables declared in this module
-!--        also have single precision?
-!   INTEGER, PARAMETER :: dp = wp
-
-
-   ! INTERFACE section
-
    INTERFACE PMC_Send_to_Server
       MODULE PROCEDURE PMC_Send_to_Server_INTEGER
@@ -159,15 +152,15 @@
 
    SUBROUTINE  PMC_Send_to_Server_real_r1 (buf, n, Server_rank, tag, ierr)
-      IMPLICIT     none
-!--   TO_DO: has buf always to be of dp-kind, or can wp used here
-!--          this effects all respective declarations in this file
-      REAL(kind=dp), DIMENSION(:), INTENT(IN)   :: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Server_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Send (buf, n, MPI_DOUBLE_PRECISION, Server_rank, tag, m_to_server_comm, ierr)
+
+      IMPLICIT     none
+
+      REAL(wp), DIMENSION(:), INTENT(IN) ::  buf
+      INTEGER, INTENT(IN)                ::  n
+      INTEGER, INTENT(IN)                ::  Server_rank
+      INTEGER, INTENT(IN)                ::  tag
+      INTEGER, INTENT(OUT)               ::  ierr
+
+      ierr = 0
+      CALL MPI_Send (buf, n, MPI_REAL, Server_rank, tag, m_to_server_comm, ierr)
 
       return
@@ -175,14 +168,16 @@
 
    SUBROUTINE  PMC_Recv_from_Server_real_r1 (buf, n, Server_rank, tag, ierr)
-      IMPLICIT     none
-      REAL(kind=dp), DIMENSION(:), INTENT(OUT)  :: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Server_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Recv (buf, n, MPI_DOUBLE_PRECISION, Server_rank, tag, m_to_server_comm, &
-         MPI_STATUS_IGNORE, ierr)
+
+      IMPLICIT     none
+
+      REAL(wp), DIMENSION(:), INTENT(OUT) ::  buf
+      INTEGER, INTENT(IN)                 ::  n
+      INTEGER, INTENT(IN)                 ::  Server_rank
+      INTEGER, INTENT(IN)                 ::  tag
+      INTEGER, INTENT(OUT)                ::  ierr
+
+      ierr = 0
+      CALL MPI_Recv (buf, n, MPI_REAL, Server_rank, tag, m_to_server_comm,     &
+                     MPI_STATUS_IGNORE, ierr)
 
       return
@@ -190,13 +185,15 @@
 
    SUBROUTINE  PMC_Send_to_Server_real_r2 (buf, n, Server_rank, tag, ierr)
-      IMPLICIT     none
-      REAL(kind=dp), DIMENSION(:,:), INTENT(IN) :: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Server_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Send (buf, n, MPI_DOUBLE_PRECISION, Server_rank, tag, m_to_server_comm, ierr)
+
+      IMPLICIT     none
+
+      REAL(wp), DIMENSION(:,:), INTENT(IN) ::  buf
+      INTEGER, INTENT(IN)                  ::  n
+      INTEGER, INTENT(IN)                  ::  Server_rank
+      INTEGER, INTENT(IN)                  ::  tag
+      INTEGER, INTENT(OUT)                 ::  ierr
+
+      ierr = 0
+      CALL MPI_Send (buf, n, MPI_REAL, Server_rank, tag, m_to_server_comm, ierr)
 
       return
@@ -204,13 +201,15 @@
 
    SUBROUTINE  PMC_Recv_from_Server_real_r2 (buf, n, Server_rank, tag, ierr)
-      IMPLICIT     none
-      REAL(kind=dp), DIMENSION(:,:),INTENT(OUT) :: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Server_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Recv (buf, n, MPI_DOUBLE_PRECISION, Server_rank, tag, m_to_server_comm, &
+
+      IMPLICIT     none
+
+      REAL(wp), DIMENSION(:,:), INTENT(OUT) ::  buf
+      INTEGER, INTENT(IN)                   ::  n
+      INTEGER, INTENT(IN)                   ::  Server_rank
+      INTEGER, INTENT(IN)                   ::  tag
+      INTEGER, INTENT(OUT)                  ::  ierr
+
+      ierr = 0
+      CALL MPI_Recv (buf, n, MPI_REAL, Server_rank, tag, m_to_server_comm, &
          MPI_STATUS_IGNORE, ierr)
 
@@ -219,13 +218,15 @@
 
    SUBROUTINE  PMC_Send_to_Server_real_r3 (buf, n, Server_rank, tag, ierr)
-      IMPLICIT     none
-      REAL(kind=dp), DIMENSION(:,:,:), INTENT(IN) :: buf
-      INTEGER, INTENT(IN)                         :: n
-      INTEGER, INTENT(IN)                         :: Server_rank
-      INTEGER, INTENT(IN)                         :: tag
-      INTEGER, INTENT(OUT)                        :: ierr
-
-      ierr = 0
-      CALL MPI_Send (buf, n, MPI_DOUBLE_PRECISION, Server_rank, tag, m_to_server_comm, ierr)
+
+      IMPLICIT     none
+
+      REAL(wp), DIMENSION(:,:,:), INTENT(IN) ::  buf
+      INTEGER, INTENT(IN)                    ::  n
+      INTEGER, INTENT(IN)                    ::  Server_rank
+      INTEGER, INTENT(IN)                    ::  tag
+      INTEGER, INTENT(OUT)                   ::  ierr
+
+      ierr = 0
+      CALL MPI_Send (buf, n, MPI_REAL, Server_rank, tag, m_to_server_comm, ierr)
 
       return
@@ -233,13 +234,15 @@
 
    SUBROUTINE  PMC_Recv_from_Server_real_r3 (buf, n, Server_rank, tag, ierr)
-      IMPLICIT     none
-      REAL(kind=dp), DIMENSION(:,:,:),INTENT(OUT) :: buf
-      INTEGER, INTENT(IN)                         :: n
-      INTEGER, INTENT(IN)                         :: Server_rank
-      INTEGER, INTENT(IN)                         :: tag
-      INTEGER, INTENT(OUT)                        :: ierr
-
-      ierr = 0
-      CALL MPI_Recv (buf, n, MPI_DOUBLE_PRECISION, Server_rank, tag, m_to_server_comm, &
+
+      IMPLICIT     none
+
+      REAL(wp), DIMENSION(:,:,:), INTENT(OUT) ::  buf
+      INTEGER, INTENT(IN)                     ::  n
+      INTEGER, INTENT(IN)                     ::  Server_rank
+      INTEGER, INTENT(IN)                     ::  tag
+      INTEGER, INTENT(OUT)                    ::  ierr
+
+      ierr = 0
+      CALL MPI_Recv (buf, n, MPI_REAL, Server_rank, tag, m_to_server_comm, &
          MPI_STATUS_IGNORE, ierr)
 
@@ -296,14 +299,16 @@
 
    SUBROUTINE  PMC_Send_to_Client_real_r1 (Client_id, buf, n, Client_rank, tag, ierr)
-      IMPLICIT     none
-      INTEGER, INTENT(IN)                       :: Client_id
-      REAL(kind=dp), DIMENSION(:), INTENT(IN)   :: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Client_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Send (buf, n, MPI_DOUBLE_PRECISION, Client_rank, tag, m_to_client_comm(Client_id), &
+
+      IMPLICIT     none
+
+      INTEGER, INTENT(IN)                ::  Client_id
+      REAL(wp), DIMENSION(:), INTENT(IN) ::  buf
+      INTEGER, INTENT(IN)                ::  n
+      INTEGER, INTENT(IN)                ::  Client_rank
+      INTEGER, INTENT(IN)                ::  tag
+      INTEGER, INTENT(OUT)               ::  ierr
+
+      ierr = 0
+      CALL MPI_Send (buf, n, MPI_REAL, Client_rank, tag, m_to_client_comm(Client_id), &
          ierr)
 
@@ -312,14 +317,16 @@
 
    SUBROUTINE  PMC_Recv_from_Client_real_r1 (Client_id, buf, n, Client_rank, tag, ierr)
-      IMPLICIT     none
-      INTEGER, INTENT(IN)                       :: Client_id
-      REAL(kind=dp), DIMENSION(:), INTENT(INOUT):: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Client_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Recv (buf, n, MPI_DOUBLE_PRECISION, Client_rank, tag, m_to_client_comm(Client_id), &
+
+      IMPLICIT     none
+
+      INTEGER, INTENT(IN)                   ::  Client_id
+      REAL(wp), DIMENSION(:), INTENT(INOUT) ::  buf
+      INTEGER, INTENT(IN)                   ::  n
+      INTEGER, INTENT(IN)                   ::  Client_rank
+      INTEGER, INTENT(IN)                   ::  tag
+      INTEGER, INTENT(OUT)                  ::  ierr
+
+      ierr = 0
+      CALL MPI_Recv (buf, n, MPI_REAL, Client_rank, tag, m_to_client_comm(Client_id), &
          MPI_STATUS_IGNORE, ierr)
 
@@ -328,14 +335,16 @@
 
    SUBROUTINE  PMC_Send_to_Client_real_r2 (Client_id, buf, n, Client_rank, tag, ierr)
-      IMPLICIT     none
-      INTEGER, INTENT(IN)                       :: Client_id
-      REAL(kind=dp), DIMENSION(:,:), INTENT(IN) :: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Client_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Send (buf, n, MPI_DOUBLE_PRECISION, Client_rank, tag, m_to_client_comm(Client_id), &
+
+      IMPLICIT     none
+
+      INTEGER, INTENT(IN)                  ::  Client_id
+      REAL(wp), DIMENSION(:,:), INTENT(IN) ::  buf
+      INTEGER, INTENT(IN)                  ::  n
+      INTEGER, INTENT(IN)                  ::  Client_rank
+      INTEGER, INTENT(IN)                  ::  tag
+      INTEGER, INTENT(OUT)                 ::  ierr
+
+      ierr = 0
+      CALL MPI_Send (buf, n, MPI_REAL, Client_rank, tag, m_to_client_comm(Client_id), &
          ierr)
 
@@ -344,14 +353,16 @@
 
    SUBROUTINE  PMC_Recv_from_Client_real_r2 (Client_id, buf, n, Client_rank, tag, ierr)
-      IMPLICIT     none
-      INTEGER, INTENT(IN)                       :: Client_id
-      REAL(kind=dp), DIMENSION(:,:), INTENT(OUT):: buf
-      INTEGER, INTENT(IN)                       :: n
-      INTEGER, INTENT(IN)                       :: Client_rank
-      INTEGER, INTENT(IN)                       :: tag
-      INTEGER, INTENT(OUT)                      :: ierr
-
-      ierr = 0
-      CALL MPI_Recv (buf, n, MPI_DOUBLE_PRECISION, Client_rank, tag, m_to_client_comm(Client_id), &
+
+      IMPLICIT     none
+
+      INTEGER, INTENT(IN)                   ::  Client_id
+      REAL(wp), DIMENSION(:,:), INTENT(OUT) ::  buf
+      INTEGER, INTENT(IN)                   ::  n
+      INTEGER, INTENT(IN)                   ::  Client_rank
+      INTEGER, INTENT(IN)                   ::  tag
+      INTEGER, INTENT(OUT)                  ::  ierr
+
+      ierr = 0
+      CALL MPI_Recv (buf, n, MPI_REAL, Client_rank, tag, m_to_client_comm(Client_id), &
          MPI_STATUS_IGNORE, ierr)
 
@@ -360,14 +371,16 @@
 
    SUBROUTINE  PMC_Send_to_Client_real_r3 (Client_id, buf, n, Client_rank, tag, ierr)
-      IMPLICIT     none
-      INTEGER, INTENT(IN)                         :: Client_id
-      REAL(kind=dp), DIMENSION(:,:,:), INTENT(IN) :: buf
-      INTEGER, INTENT(IN)                         :: n
-      INTEGER, INTENT(IN)                         :: Client_rank
-      INTEGER, INTENT(IN)                         :: tag
-      INTEGER, INTENT(OUT)                        :: ierr
-
-      ierr = 0
-      CALL MPI_Send (buf, n, MPI_DOUBLE_PRECISION, Client_rank, tag, m_to_client_comm(Client_id), &
+
+      IMPLICIT     none
+
+      INTEGER, INTENT(IN)                    ::  Client_id
+      REAL(wp), DIMENSION(:,:,:), INTENT(IN) ::  buf
+      INTEGER, INTENT(IN)                    ::  n
+      INTEGER, INTENT(IN)                    ::  Client_rank
+      INTEGER, INTENT(IN)                    ::  tag
+      INTEGER, INTENT(OUT)                   ::  ierr
+
+      ierr = 0
+      CALL MPI_Send (buf, n, MPI_REAL, Client_rank, tag, m_to_client_comm(Client_id), &
          ierr)
 
@@ -376,14 +389,16 @@
 
    SUBROUTINE  PMC_Recv_from_Client_real_r3 (Client_id, buf, n, Client_rank, tag, ierr)
-      IMPLICIT     none
-      INTEGER, INTENT(IN)                         :: Client_id
-      REAL(kind=dp), DIMENSION(:,:,:), INTENT(OUT):: buf
-      INTEGER, INTENT(IN)                         :: n
-      INTEGER, INTENT(IN)                         :: Client_rank
-      INTEGER, INTENT(IN)                         :: tag
-      INTEGER, INTENT(OUT)                        :: ierr
-
-      ierr = 0
-      CALL MPI_Recv (buf, n, MPI_DOUBLE_PRECISION, Client_rank, tag, m_to_client_comm(Client_id), &
+
+      IMPLICIT     none
+
+      INTEGER, INTENT(IN)                     ::  Client_id
+      REAL(wp), DIMENSION(:,:,:), INTENT(OUT) ::  buf
+      INTEGER, INTENT(IN)                     :: n
+      INTEGER, INTENT(IN)                     :: Client_rank
+      INTEGER, INTENT(IN)                     :: tag
+      INTEGER, INTENT(OUT)                    :: ierr
+
+      ierr = 0
+      CALL MPI_Recv (buf, n, MPI_REAL, Client_rank, tag, m_to_client_comm(Client_id), &
          MPI_STATUS_IGNORE, ierr)
 
