Changeset 106 for LMDZ.3.3/trunk/makegcm


Ignore:
Timestamp:
Jul 21, 2000, 10:34:18 AM (24 years ago)
Author:
lmdzadmin
Message:

Introduction cross-compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ.3.3/trunk/makegcm

    r102 r106  
    1818# set LMDGCM=$HOME/LMDZ.3.3
    1919#
    20 #   a changer  rlmd304/agcm
    21 #
    22 ###### VERSION LMDZ.3.2
    23 
    24 if ( ! $?LMDGCM ) then
    25    echo You must initialize the variable LMDGCM in your environnement
    26    echo for instance: "setenv LMDGCM /usr/myself/supergcm" in .cshrc
    27    exit
    28 endif
    29 if ( ! $?LIBOGCM ) then
    30    set LIBOGCM=$LMDGCM/libo
    31 endif
    32 if ( ! $?IOIPSLDIR ) then
    33    echo You must initialize the variable IOIPSLDIR in your environnement
    34    echo for instance: "setenv IOIPSLDIR /usr/myself/ioipsl" in .cshrc
    35    exit
    36 endif
    37 if ( ! $?NCDFLIB ) then
    38    echo You must initialize the variable NCDFLIB in your environnement
    39    echo for instance: "setenv NCDFLIB /usr/myself/netcdf" in .cshrc
    40    exit
    41 endif
    42 if ( ! $?NCDFINC ) then
    43    echo You must initialize the variable NCDFINC in your environnement
    44    echo for instance: "setenv NCDFINC /usr/myself/netcdf" in .cshrc
    45    exit
     20
     21setenv localdir "`pwd`"
     22set MODIPSL=0
     23echo $localdir | grep modipsl >& /dev/null
     24if ( ! $status ) then
     25  set MODIPSL=1
     26  setenv LMDGCM $localdir
     27  cd ../..
     28  setenv LIBOGCM "`pwd`/lib"
     29  setenv IOIPSLDIR $LIBOGCM
     30  cd $localdir
     31  if ( `hostname` == rhodes ) then
     32    set NCDFINC=`grep sxnec ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
     33    set NCDFLIB=`grep sxnec ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
     34  else
     35    echo 'Probleme de definition des variables NCDFINC et NCDFLIB'
     36  endif
     37else
     38  if ( ! $?LMDGCM ) then
     39    echo You must initialize the variable LMDGCM in your environnement
     40    echo for instance: "setenv LMDGCM /usr/myself/supergcm" in .cshrc
     41    exit
     42  endif
     43  if ( ! $?LIBOGCM ) then
     44    set LIBOGCM=$LMDGCM/libo
     45  endif
     46  if ( ! $?IOIPSLDIR ) then
     47    echo You must initialize the variable IOIPSLDIR in your environnement
     48    echo for instance: "setenv IOIPSLDIR /usr/myself/ioipsl" in .cshrc
     49    exit
     50  endif
     51  if ( ! $?NCDFLIB ) then
     52    echo You must initialize the variable NCDFLIB in your environnement
     53    echo for instance: "setenv NCDFLIB /usr/myself/netcdf" in .cshrc
     54    exit
     55  endif
     56  if ( ! $?NCDFINC ) then
     57    echo You must initialize the variable NCDFINC in your environnement
     58    echo for instance: "setenv NCDFINC /usr/myself/netcdf" in .cshrc
     59    exit
     60  endif
    4661endif
    4762set model=$LMDGCM
     
    6075set LINUX=0
    6176set NEC=0
     77set XNEC=0
    6278if ( `uname` == HP-UX ) then
    6379   set machine=HP
     
    84100   set machine=NEC
    85101   set NEC=1
     102else if ( `hostname` == rhodes) then
     103   set machine=XNEC
     104   set XNEC=1
    86105else
    87106   echo Vous travaillez sur une machine non prevue par le reglement
     
    120139set libf=$model/libf
    121140#setenv localdir "LOCAL_DIR=`pwd`"
    122 setenv localdir "`pwd`"
     141#setenv localdir "`pwd`"
    123142cd $model
    124143if $CRAY then
     
    165184else if $NEC then
    166185   set optim90=' -clear -C hopt -float0 -ew -P stack -Wf,"-pvctl fullmsg noassume "'
     186   set optimtru90=' -clear -f4 -C hopt -float0 -ew -P stack -Wf,"-pvctl fullmsg noassume "'
    167187   set optim="$optim90"
    168188   set optimbis=" "
     
    170190   set mod_loc_dir="."
    171191   set mod_suffix="mod"
     192else if $XNEC then
     193   set optim90=' -clear -C hopt -float0 -ew -P stack -Wf,"-pvctl fullmsg noassume "'
     194   set optimtru90=' -clear -f4 -C hopt -float0 -ew -P stack -Wf,"-pvctl fullmsg noassume "'
     195   set optim="$optim90"
     196   set optimbis=" "
     197   if $MODIPSL then
     198     set opt_link="-L$IOIPSLDIR -lsxioipsl -float0 -ew -P stack -I$NCDFINC $NCDFLIB "
     199     set mod_loc_dir="$localdir/../lib"
     200   else
     201     set opt_link=" -C hopt -float0 -ew -P stack -L$IOIPSLDIR -lioipsl -L /u/rech/psl/rpsl003/IOIPSL -lnetcdf_i8r8_v -I$NCDFINC "
     202     set mod_loc_dir="."
     203   endif
     204   set mod_suffix="mod"
     205
    172206else
    173207   set optim=""
     
    404438    set nomlib=F90_${dim_}_t${ntrac}
    405439endif
    406 if ( $NEC ) then
     440if ( $NEC || $XNEC ) then
    407441    set nomlib=F90_${dim_}_t${ntrac}
    408442endif
     
    567601   set f77=f90
    568602   set f90=f90
     603else if $XNEC then
     604   set f77=sxmpif90
     605   set f90=sxmpif90
    569606else
    570607   set f77=f77
     
    582619else if $LINUX then
    583620set make="make -k RANLIB=ranlib"
     621else if $XNEC then
     622set make="gmake RANLIB=ls"
    584623else
    585624set make="make RANLIB=ranlib"
     
    646685else if $NEC then
    647686 set optim90=" $optim90 -I$libo "
     687else if $XNEC then
     688 set optim90=" $optim90 -I$libo "
     689 set optimtru90=" $optimtru90 -M$libo "
    648690else if $LINUX then
    649691 set optim90=" -fast -module $libo "
     
    656698set link="$f90 $optim90"
    657699
    658 #if $NEC then
    659 #  set link="sxld $opt_link"
    660 #  set ar=sxar
    661 #endif
     700if $XNEC then
     701  set link="sxld $opt_link"
     702  set link="$f90 "
     703  set ar=sxar
     704endif
    662705
    663706
     
    684727MOD_LOC_DIR=$mod_loc_dir \
    685728MOD_SUFFIX=$mod_suffix \
     729AR=$ar \
    686730PROG=$code
    687731
     
    706750MOD_LOC_DIR=$mod_loc_dir \
    707751MOD_SUFFIX=$mod_suffix \
     752AR=$ar \
    708753PROG=$code
    709754
Note: See TracChangeset for help on using the changeset viewer.