Changeset 6050


Ignore:
Timestamp:
Jan 23, 2026, 8:25:22 AM (40 hours ago)
Author:
fhourdin
Message:

Corrections et parallelisation makelmdz

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/makelmdz

    r6039 r6050  
    9898#src_dirs: directories containing source files
    9999src_dirs="grid misc"
     100make_parallel=
    100101########################################################################
    101102# lecture des options
     
    137138[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
    138139[-link LINKS]              : additional links with other libraries
     140[-j n]                     : active parallel compiling on ntask
    139141[-full]                    : full recompiling
    140142[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
     
    221223      "-ext_src")
    222224          EXT_SRC=$2 ; src_dirs="$src_dirs $EXT_SRC" ; shift ; shift ;;
     225
     226      "-j")
     227          make_parallel=-j$2 ; shift ; shift ;;
    223228
    224229      "-full")
     
    740745source_code=${code}.F
    741746dirmain=dyn${dimc}d${FLAG_PARA}
    742 if [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.F90 ]]
    743 then
    744   source_code=${code}.F90
    745 elif [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.f90 ]]
    746 then
    747   source_code=${code}.f90
    748 elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then
    749   dirmain=phy$physique
    750   source_code=${code}.F90
    751 elif [[ -r $LMDGCM/libf/dynphy_lonlat/phy$phys_root/${code}.F90 ]] ; then
    752   dirmain="dynphy_lonlat/phy${phys_root}"
    753   source_code=${code}.F90
    754 elif [[ -r $LMDGCM/libf/phy$physique/dyn1d/${code}.F90 ]] ; then
    755   dirmain=phy$physique/dyn1d
    756   source_code=${code}.F90
    757 fi
     747
     748for suf_ in F90 f90 ; do
     749    for dir_ in dyn${dimc}d${FLAG_PARA} phy$physique libf/dynphy_lonlat/phy$phys_root phy$physique/dyn1d ; do
     750       if [[ -r $LMDGCM/libf/$dir_/${code}.$suf_ ]] ; then
     751            source_code=${code}.$suf_
     752            dirmain=$dir_
     753       fi
     754    done
     755done
     756       
     757# Retrirer ces lignes à la prochaine commissions
     758# Elles sont remplacées par la double boucle au dessus
     759#if [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.F90 ]]
     760#then
     761#  source_code=${code}.F90
     762#elif [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.f90 ]]
     763#then
     764#  source_code=${code}.f90
     765#elif [[ -r $LMDGCM/libf/phy$physique/${code}.f90 ]] ; then
     766#  dirmain=phy$physique
     767#  source_code=${code}.f90
     768#elif [[ -r $LMDGCM/libf/dynphy_lonlat/phy$phys_root/${code}.F90 ]] ; then
     769#  dirmain="dynphy_lonlat/phy${phys_root}"
     770#  source_code=${code}.F90
     771#elif [[ -r $LMDGCM/libf/phy$physique/dyn1d/${code}.F90 ]] ; then
     772#  dirmain=phy$physique/dyn1d
     773#  source_code=${code}.F90
     774#elif [[ -r $LMDGCM/libf/phy$physique/dyn1d/${code}.f90 ]] ; then
     775#  dirmain=phy$physique/dyn1d
     776#  source_code=${code}.f90
     777#fi
    758778
    759779if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
     
    799819#################################################################
    800820set -v
    801 $makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
     821$makecommand $make_parallel RANLIB=$ranlib -f $LMDGCM/makefile \
    802822OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
    803823OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
Note: See TracChangeset for help on using the changeset viewer.