Ignore:
Timestamp:
Aug 7, 2009, 1:48:33 PM (15 years ago)
Author:
Ehouarn Millour
Message:

Changes and cleanups to enable compiling without physics
and without ioipsl.

IOIPSL related cleanups:

  • bibio/writehist.F encapsulate the routine (which needs IOIPSL to function)

with #ifdef IOIPSL flag.

  • dyn3d/abort_gcm.F, dyn3dpar/abort_gcm.F and dyn3dpar/getparam.F90: use ioipsl_getincom module when not compiling with IOIPSL library, in order to always be able to use getin() routine.
  • removed unused "use IOIPSL" in dyn3dpar/guide_p_mod.F90
  • calendar related issue: Initialize day_ref and annee_ref in iniacademic.F (i.e. when they are not read from start.nc file)

Earth-specific programs/routines/modules:
create_etat0.F, fluxstokenc.F, limit_netcdf.F, startvar.F
(versions in dyn3d and dyn3dpar)
These routines and modules, which by design and porpose are made to function with
Earth physics are encapsulated with #CPP_EARTH cpp flag.

Earth-specific instructions:

  • calls to qminimum (specific treatment of first 2 tracers, i.e. water) in dyn3d/caladvtrac.F, dyn3d/integrd.F, dyn3dpar/caladvtrac_p.F, dyn3dpar/integrd_p.F only if (planet_type == 'earth')

Interaction with parallel physics:

  • routine dyn3dpar/parallel.F90 uses "surface_data" module (which is in the physics ...) to know value of "type_ocean" . Encapsulated that with #ifdef CPP_EARTH and set to a default type_ocean="dummy" otherwise.
  • So far, only Earth physics are parallelized, so all the interaction between parallel dynamics and parallel physics are encapsulated with #ifdef CCP_EARTH (this way we can run parallel without any physics). The (dyn3dpar) routines which contains such interaction are: bands.F90, gr_dyn_fi_p.F, gr_fi_dyn_p.F, mod_interface_dyn_phys.F90 This should later (when improving dyn/phys interface) be encapsulated with a more general and appropriate #ifdef CPP_PHYS cpp flag.

I checked that these changes do not alter results (on the simple
32x24x11 bench) on Ciclad (seq & mpi), Brodie (seq, mpi & omp) and
Vargas (seq, mpi & omp).

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/parallel.F90

    r1089 r1222  
     1!
     2! $Id$
     3!
    14  module parallel
    25  USE mod_const_mpi
     
    3336#include "dimensions.h"
    3437#include "paramet.h"
    35    
     38#include "iniprint.h"
     39
    3640      integer :: ierr
    3741      integer :: i,j
     
    8387        if (jj_nb_para(i) <= 2 ) then
    8488         
    85          print *,"Arret : le nombre de bande de lattitude par process est trop faible (<2)."
    86          print *," ---> diminuez le nombre de CPU ou augmentez la taille en lattitude"
     89         write(lunout,*)"Arret : le nombre de bande de lattitude par process est trop faible (<2)."
     90         write(lunout,*)" ---> diminuez le nombre de CPU ou augmentez la taille en lattitude"
    8791         
    8892#ifdef CPP_MPI
     
    127131      endif
    128132       
    129       print *,"jj_begin",jj_begin
    130       print *,"jj_end",jj_end
    131       print *,"ij_begin",ij_begin
    132       print *,"ij_end",ij_end
     133      write(lunout,*)"init_parallel: jj_begin",jj_begin
     134      write(lunout,*)"init_parallel: jj_end",jj_end
     135      write(lunout,*)"init_parallel: ij_begin",ij_begin
     136      write(lunout,*)"init_parallel: ij_end",ij_end
    133137
    134138!$OMP PARALLEL
     
    185189    use mod_prism_proto
    186190#endif
     191#ifdef CPP_EARTH
     192! Ehouarn: surface_data module is in 'phylmd' ...
    187193      use surface_data, only : type_ocean
    188194      implicit none
     195#else
     196      implicit none
     197! without the surface_data module, we declare (and set) a dummy 'type_ocean'
     198      character(len=6),parameter :: type_ocean="dummy"
     199#endif
     200! #endif of #ifdef CPP_EARTH
    189201
    190202      include "dimensions.h"
     
    415427    implicit none
    416428#include "dimensions.h"
    417 #include "paramet.h"   
     429#include "paramet.h"
     430#include "iniprint.h"
    418431#ifdef CPP_MPI
    419432    include 'mpif.h'
     
    436449           call Pack_Data(Field(ij_begin,1),ij,ll,min(jj_end,jjm)-jj_begin+1,Buffer_send)
    437450        else
    438            print *,ij 
     451           write(lunout,*)ij 
    439452        stop 'erreur dans Gather_Field'
    440453        endif
Note: See TracChangeset for help on using the changeset viewer.