Changeset 28


Ignore:
Timestamp:
07/26/12 15:27:26 (12 years ago)
Author:
ymipsl
Message:

update of bld.cfg and make_icosa for parallelism

YM

Location:
codes/icosagcm/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/bld.cfg

    r13 r28  
    2626bld::tool::fc        %COMPILER 
    2727bld::tool::ld        %LINK 
    28 bld::tool::ldflags   %LD_FLAGS  
     28bld::tool::ldflags   %LD_FLAGS %LIB  
    2929bld::tool::fflags    %FFLAGS  
     30bld::tool::fppkeys   %CPP_KEY %FPP_DEF 
     31 
    3032# Pre-process code before analysing dependencies 
    31 bld::pp              false 
     33bld::pp              true 
    3234 
    3335bld::excl_dep        use::netcdf 
    3436bld::excl_dep        use::omp_lib 
     37bld::excl_dep        inc::mpif.h 
     38 
    3539bld::tool::SHELL   /bin/bash 
    3640 
  • codes/icosagcm/trunk/make_icosa

    r14 r28  
    77 
    88arch_defined="FALSE" 
     9parallel_defined="FALSE" 
    910arch="" 
     11parallel="none" 
     12CPP_KEY="CPP_NONE"  
    1013 
    1114while (($# > 0)) 
     
    3336          arch=$2 ; arch_defined="TRUE"; shift ; shift ;; 
    3437 
     38      "-parallel") 
     39          parallel=$2 ; parallel_defined="TRUE"; shift ; shift ;; 
     40 
    3541      *) 
    3642          code="$1" ; shift ;; 
     
    3844done 
    3945 
     46rm -f .void_file 
     47echo > .void_file 
     48rm -rf .void_dir 
     49mkdir .void_dir 
     50 
    4051if [[ "$arch_defined" == "TRUE" ]] 
    4152then 
    4253  rm -f arch.path 
    4354  rm -f arch.fcm 
     55  rm -f arch.env 
    4456  ln -s arch/arch-${arch}.path ./arch.path 
    4557  ln -s arch/arch-${arch}.fcm  ./arch.fcm 
     58  if test -f arch/arch-${arch}.env 
     59    then 
     60      ln -s arch/arch-${arch}.env arch.env 
     61    else 
     62      ln -s .void_file arch.env 
     63    fi 
     64  source arch.env 
    4665  source arch.path 
    4766else 
     
    6180fi 
    6281 
     82if [[ "$parallel" == "mpi" ]] 
     83then 
     84  CPP_KEY="$CPP_KEY CPP_USING_MPI" 
     85elif [[ "$parallel" == "none" ]] 
     86then 
     87  parallel="none" 
     88else  
     89  echo "-parallel value $parallel is invalid, only permited <none> or <mpi>" 
     90  exit 1 
     91fi 
     92 
     93ICOSA_LIB="$NETCDF_LIBDIR $HDF5_LIBDIR $NETCDF_LIB $HDF5_LIB" 
     94 
    6395rm -f config.fcm 
    6496 
    65 echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm 
     97echo "%COMPIL_FFLAGS $COMPIL_FFLAGS $NETCDF_INCDIR" >> config.fcm 
     98echo "%CPP_KEY $CPP_KEY" >> config.fcm 
     99echo "%LIB $ICOSA_LIB">> config.fcm 
    66100 
    67101./build 
Note: See TracChangeset for help on using the changeset viewer.