Commit 99f8e4a0 authored by bjb's avatar bjb
Browse files

Fix name clash on PARALLEL with OpenMP key word

parent be65fc9d
!$Id: m2d.F90,v 1.32 2009-08-18 10:24:43 bjb Exp $
!$Id: m2d.F90,v 1.33 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -124,8 +124,8 @@
! Allocates memory for the public data members - if not static
call init_variables_2d(runtype)
#if defined(PARALLEL) || defined(NO_BAROTROPIC)
! STDERR 'Not calling cfl_check() - PARALLEL or NO_BAROTROPIC'
#if defined(GETM_PARALLEL) || defined(NO_BAROTROPIC)
! STDERR 'Not calling cfl_check() - GETM_PARALLEL or NO_BAROTROPIC'
! call cfl_check()
#else
call cfl_check()
......
#$Id: Rules.make,v 1.21 2009-08-18 10:24:43 bjb Exp $
#$Id: Rules.make,v 1.22 2009-08-21 08:56:33 bjb Exp $
#
# This file contains rules which are shared between multiple Makefiles.
# This file is quite complicated - all compilation options are set in this
......@@ -170,7 +170,7 @@ EXTRA_LIBS += $(NETCDFLIB) $(HDF5LIB)
# Where does the MPI library reside.
ifeq ($(parallel),true)
DEFINES += -DPARALLEL
DEFINES += -DGETM_PARALLEL
# OPENMPI - set FC to mpif90
ifeq ($(MPI),OPENMPI)
......
!$Id: part_domain.F90,v 1.2 2007-06-07 10:25:19 kbk Exp $
!$Id: part_domain.F90,v 1.3 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -12,7 +12,7 @@
use domain, only: iextr,jextr
use domain, only: imin,imax,jmin,jmax,kmax
use domain, only: ioff,joff
#ifdef PARALLEL
#ifdef GETM_PARALLEL
use halo_mpi, only: part_domain_mpi
#endif
IMPLICIT NONE
......@@ -39,7 +39,7 @@
write(debug,*) 'part_domain'
#endif
#ifndef PARALLEL
#ifndef GETM_PARALLEL
#ifndef STATIC
imin=1 ; imax=iextr ; jmin=1 ; jmax=jextr
#endif
......
!$Id: exceptions.F90,v 1.2 2005-04-25 09:26:57 kbk Exp $
!$Id: exceptions.F90,v 1.3 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -28,6 +28,9 @@
! Original author(s): Lars Umlauf
!
! $Log: exceptions.F90,v $
! Revision 1.3 2009-08-21 08:56:34 bjb
! Fix name clash on PARALLEL with OpenMP key word
!
! Revision 1.2 2005-04-25 09:26:57 kbk
! default all is private
!
......@@ -55,7 +58,7 @@
!
! !USES:
IMPLICIT NONE
#ifdef PARALLEL
#ifdef GETM_PARALLEL
! use mpi
include "mpif.h"
#endif
......@@ -80,7 +83,7 @@
STDERR "FATAL GETM ERROR: "//trim(whatsup)
STDERR " "
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call MPI_Abort(MPI_COMM_WORLD,1,ierr)
#else
stop
......@@ -135,7 +138,7 @@
!
! !USES:
IMPLICIT NONE
#ifdef PARALLEL
#ifdef GETM_PARALLEL
! use mpi
include "mpif.h"
#endif
......@@ -169,7 +172,7 @@
STDERR "NETCDF MESSAGE : "//trim(nf_strerror(status))
STDERR " "
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call MPI_Abort(MPI_COMM_WORLD,1,ierr)
#else
stop
......
!$Id: getm_error.F90,v 1.3 2004-04-06 16:54:33 kbk Exp $
!$Id: getm_error.F90,v 1.4 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -12,7 +12,7 @@
!
! !USES:
IMPLICIT NONE
#ifdef PARALLEL
#ifdef GETM_PARALLEL
! use mpi
include "mpif.h"
#endif
......@@ -24,6 +24,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: getm_error.F90,v $
! Revision 1.4 2009-08-21 08:56:34 bjb
! Fix name clash on PARALLEL with OpenMP key word
!
! Revision 1.3 2004-04-06 16:54:33 kbk
! cleaned a little
!
......@@ -40,7 +43,7 @@
!BOC
FATAL "Called from: ",trim(sub)
FATAL "Message: ",trim(msg)
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call MPI_Abort(MPI_COMM_WORLD,1,ierr)
#else
stop "getm_error()"
......
......@@ -149,7 +149,7 @@
timernames(TIM_INTEGR2D) = 'integrate_2d other'
#ifdef PARALLEL
#ifdef GETM_PARALLEL
timernames(TIM_MOMENTUMH) = ' momentum-halo'
#endif
......@@ -183,7 +183,7 @@
timernames(TIM_INTEGR3D) = 'integrate_3d other'
! We only really want to display halo-stuff if we compile for parallel:
#ifdef PARALLEL
#ifdef GETM_PARALLEL
timernames(TIM_GOTMH) = ' gotm-halo'
timernames(TIM_SEALEVELH) = ' sealevel-halo'
timernames(TIM_UVADV3DH) = ' uv_advect_3d-halo'
......
!$Id: halo_zones.F90,v 1.6 2008-09-16 10:03:24 kb Exp $
!$Id: halo_zones.F90,v 1.7 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -13,7 +13,7 @@
! places in 'getm'. From version 1.4 real use of MPI will be implemented.
!
! !USES:
#ifdef PARALLEL
#ifdef GETM_PARALLEL
use halo_mpi
#endif
IMPLICIT NONE
......@@ -22,7 +22,7 @@
public init_halo_zones,update_2d_halo,update_3d_halo,wait_halo
!
! !PUBLIC DATA MEMBERS:
#ifndef PARALLEL
#ifndef GETM_PARALLEL
integer, parameter :: H_TAG=10,HU_TAG=11,HV_TAG=12
integer, parameter :: D_TAG=20,DU_TAG=21,DV_TAG=22
integer, parameter :: z_TAG=30,U_TAG=31,V_TAG=32
......@@ -32,6 +32,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: halo_zones.F90,v $
! Revision 1.7 2009-08-21 08:56:34 bjb
! Fix name clash on PARALLEL with OpenMP key word
!
! Revision 1.6 2008-09-16 10:03:24 kb
! added Holtermanns emergency break algorithm
!
......@@ -54,7 +57,7 @@
! recovering after CVS crash
!
! !LOCAL VARIABLES:
#ifndef PARALLEL
#ifndef GETM_PARALLEL
integer, parameter :: nprocs=1
#endif
!EOP
......@@ -152,7 +155,7 @@
f1(il-1,jl-1) = f2(il,jl)
end if
else
#ifdef PARALLEL
#ifdef GETM_PARALLEL
if( present(mirror) ) then
call update_2d_halo_mpi(f1,f2,imin,jmin,imax,jmax,tag, &
mirror=mirror)
......@@ -204,7 +207,7 @@
f1( : , jl-1, : ) = f2( : , jl, : )
f1( : , jh+1, : ) = f2( : , jh, : )
else
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call update_3d_halo_mpi(f1,f2,imin,jmin,imax,jmax,kmax,tag)
#endif
end if
......@@ -238,7 +241,7 @@
!EOP
!-------------------------------------------------------------------------
!BOC
#ifdef PARALLEL
#ifdef GETM_PARALLEL
if (nprocs .gt. 1) then
call wait_halo_mpi(tag)
end if
......@@ -273,7 +276,7 @@
!EOP
!-------------------------------------------------------------------------
!BOC
#ifdef PARALLEL
#ifdef GETM_PARALLEL
if (nprocs .gt. 1) then
call set_flag_mpi(n,flag,flags)
end if
......
!$Id: parallel.F90,v 1.4 2008-06-26 06:19:30 kb Exp $
!$Id: parallel.F90,v 1.5 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -11,13 +11,13 @@
! !DESCRIPTION:
!
! !USES:
#ifdef PARALLEL
#ifdef GETM_PARALLEL
use halo_mpi, only: postinit_mpi,print_MPI_info,barrier,myid
#endif
IMPLICIT NONE
!
! !PUBLIC DATA MEMBERS:
#ifndef PARALLEL
#ifndef GETM_PARALLEL
integer, parameter :: myid=-1
#endif
!
......@@ -25,6 +25,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: parallel.F90,v $
! Revision 1.5 2009-08-21 08:56:34 bjb
! Fix name clash on PARALLEL with OpenMP key word
!
! Revision 1.4 2008-06-26 06:19:30 kb
! barrier() + verbose when finishing parallel run - Bchmann
!
......@@ -86,7 +89,7 @@
! 22Apr99 Karsten Bolding & Hans Burchard Initial code.
!
! !LOCAL VARIABLES:
#ifdef PARALLEL
#ifdef GETM_PARALLEL
logical :: TO_FILE=.true.
character(len=3) :: buf
character(len=16) :: pid,ext
......@@ -102,7 +105,7 @@
write(debug,*) 'init_parallel'
#endif
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call postinit_mpi(input_dir)
call print_MPI_info()
if (TO_FILE) then
......@@ -154,7 +157,7 @@
! 22Apr99 Karsten Bolding & Hans Burchard Initial code.
!
! !LOCAL VARIABLES:
#ifdef PARALLEL
#ifdef GETM_PARALLEL
integer :: ierr
#endif
!EOP
......@@ -166,7 +169,7 @@
write(debug,*) 'clean_parallel'
#endif
#ifdef PARALLEL
#ifdef GETM_PARALLEL
LEVEL2 'At final MPI barrier'
call barrier()
LEVEL2 'About to finish parallel part of GETM - calling MPI_Finalize()'
......
!$Id: initialise.F90,v 1.22 2009-08-18 10:24:46 bjb Exp $
!$Id: initialise.F90,v 1.23 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -22,6 +22,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: initialise.F90,v $
! Revision 1.23 2009-08-21 08:56:34 bjb
! Fix name clash on PARALLEL with OpenMP key word
!
! Revision 1.22 2009-08-18 10:24:46 bjb
! New getm_timers module
!
......@@ -135,7 +138,7 @@
!
! !USES:
use kurt_parallel, only: init_parallel,myid
#ifdef PARALLEL
#ifdef GETM_PARALLEL
use halo_mpi, only: init_mpi,print_MPI_info
#endif
use output, only: init_output,do_output,restart_file,out_dir
......@@ -197,7 +200,7 @@
logical :: hotstart=.false.
logical :: use_epoch=.false.
logical :: save_initial=.false.
#if (defined PARALLEL && defined INPUT_DIR)
#if (defined GETM_PARALLEL && defined INPUT_DIR)
character(len=PATH_MAX) :: input_dir=INPUT_DIR
#else
character(len=PATH_MAX) :: input_dir='./'
......@@ -238,11 +241,11 @@
! "say hello" right away. For MPI this changes the working directory,
! so that input files can be read.
!
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call init_mpi()
#endif
#if (defined PARALLEL && defined INPUT_DIR)
#if (defined GETM_PARALLEL && defined INPUT_DIR)
STDERR 'input_dir:'
STDERR trim(input_dir)
#endif
......@@ -270,7 +273,7 @@
! call all modules init_ ... routines
if (parallel) then
#ifdef PARALLEL
#ifdef GETM_PARALLEL
call init_parallel(runid,input_dir)
#else
STDERR 'You must define GETM_PARALLEL and recompile'
......@@ -279,9 +282,9 @@
#endif
end if
#if (defined PARALLEL && defined SLICE_MODEL)
#if (defined GETM_PARALLEL && defined SLICE_MODEL)
call getm_error('init_model()', &
'SLICE_MODEL does not work with PARALLEL - for now')
'SLICE_MODEL does not work with GETM_PARALLEL - for now')
#endif
STDERR LINE
......
!$Id: main.F90,v 1.14 2009-08-18 10:24:46 bjb Exp $
!$Id: main.F90,v 1.15 2009-08-21 08:56:34 bjb Exp $
#include "cppdefs.h"
!!-----------------------------------------------------------------------
!!BOI
......@@ -40,6 +40,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: main.F90,v $
! Revision 1.15 2009-08-21 08:56:34 bjb
! Fix name clash on PARALLEL with OpenMP key word
!
! Revision 1.14 2009-08-18 10:24:46 bjb
! New getm_timers module
!
......@@ -169,7 +172,7 @@
STDERR 'Compilation options (unstable version):'
STDERR LINE
!
#ifdef PARALLEL
#ifdef GETM_PARALLEL
LEVEL1 'Compiled for parallel execution'
#else
LEVEL1 'Compiled for serial execution'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment