Changeset 1403 for trunk/LMDZ.GENERIC/makegcm_ifort
- Timestamp:
- Mar 31, 2015, 3:49:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/makegcm_ifort
r1216 r1403 8 8 set physique=std 9 9 set phys="PHYS=$physique" 10 set include='-I$(LIBF)/grid -I$(LIBF)/ bibio -I.'10 set include='-I$(LIBF)/grid -I$(LIBF)/misc -I. -I$(LIBF)/dynlonlat_phylonlat' 11 11 set ntrac = 1 12 12 set filtre=filtrez … … 16 16 set scatterers="1" 17 17 set full="" 18 #src_dirs: directories containing source files 19 set src_dirs="grid misc" 20 18 21 ######################################################################## 19 22 # path a changer contenant les sources et les objets du modele … … 126 129 set machine=XNEC 127 130 set XNEC=1 131 else if ( `uname` == CYGWIN_NT-6.1-WOW64) then 132 set machine=LINUX 133 set LINUX=1 128 134 else 129 135 echo Vous travaillez sur une machine non prevue par le reglement … … 216 222 set mod_loc_dir="./" 217 223 else 218 #### set opt_link=" -C hopt -float0 -ew -P static -L$IOIPSLDIR -lsxioipsl -L /u/rech/psl/rpsl003/IOIPSL -lnetcdf_i8r8_v -I$NCDFINC -L/SX/usr/local/lib -lnetcdf_i8r8"219 224 set opt_link=" -C hopt -float0 -ew -P static -I$NCDFINC -L/SX/usr/local/lib -lnetcdf_i8r8" 220 225 set mod_loc_dir="." … … 224 229 endif 225 230 226 set nomlib=$ machine231 set nomlib=${machine} 227 232 228 233 # Impose distinct name for 64 bit Linux machines (to avoid mixing 32 and 64) … … 404 409 if ( "$physique" == 'nophys' ) then 405 410 set phys="L_PHY= LIBPHY=" 406 endif 407 411 else 412 set src_dirs="$src_dirs phy$physique" 413 set include="$include "' -I$(LIBF)/phy'"$physique" 414 endif 415 set libdyn_phy="" 416 set LIBDYN_PHYS="" 408 417 ######################################################################## 409 418 #subtilites sur le nom de la librairie … … 483 492 set include="$include "'-I$(LIBF)/dyn2d ' 484 493 set dimh=$dim 485 else 494 endif 495 if ( "$dimc" == "3" ) then 486 496 if ( "$dyntype" == "olddyn" ) then 487 497 set include="$include "'-I$(LIBF)/olddyn3d ' 498 set src_dirs="$src_dirs olddyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 488 499 else 489 500 set include="$include "'-I$(LIBF)/dyn3d ' 501 set src_dirs="$src_dirs dyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 490 502 endif 503 set libdyn_phy="-ldynlonlat_phylonlat" 504 set LIBDYN_PHYS='$(LIBO)/libdynlonlat_phylonlat.a' 491 505 set dimh=`echo $dim | awk ' { print $1 "." $2 } '` 492 506 endif … … 561 575 ## NB: we still need to have L_DYN=libdyn3d to reach routines and module 562 576 ## objects which are located in dyn3d 563 set dyn="L_DYN=-ldyn3d DYN= L_FILTRE= DIRMAIN=phy$physique " 577 set dyntype="" 578 set filtre="L_DYN= DYN= FILTRE= L_FILTRE= " 579 set dyn="L_DYN= DYN= L_FILTRE= " 580 set dirmain="phy$physique/dyn1d" 581 set src_dirs="$src_dirs phy$physique/dyn1d " 582 set include="$include "' -I$(LIBF)/phy'"$physique"'/dyn1d' 564 583 endif 565 584 endif … … 583 602 if ( `expr $dimc \> 2` == 1 ) then 584 603 set filtre="FILTRE=$filtre" 585 else 586 set filtre="FILTRE= L_FILTRE= " 604 if ( "$dyntype" == "olddyn" ) then 605 set src_dirs="$src_dirs oldfiltrez" 606 else 607 set src_dirs="$src_dirs filtrez" 608 endif 609 else 610 set filtre="FILTRE= L_FILTRE= L_DYN= " 587 611 endif 588 612 echo "MACRO FILTRE $filtre" … … 626 650 \cp tmp90 liste_des_sources_f90 627 651 echo "Remaking the makefile!" 628 if ("$dyntype" == "olddyn") then 629 ./create_make_gcm olddyn3d grid bibio phy$physique >! tmp 630 else 631 ./create_make_gcm dyn3d grid bibio phy$physique >! tmp 632 endif 652 echo "src_dirs: $src_dirs" 653 create_make_gcm $src_dirs >! tmp 633 654 \mv tmp makefile 634 655 echo "New makefile created." … … 663 684 # set f90="ifort -real-size 64 -DNC_DOUBLE" 664 685 set opt_link=" -L$LIBOGCM -L$NCDFLIB -lnetcdf " 665 # set f77=pgf90666 # set f90=pgf90667 686 else if $SUN then 668 687 set f77=f90 … … 739 758 set source_code=${code}.F 740 759 # handle cases when the main program is in the physics directory 741 if (-f $LMDGCM/libf/phy${physique}/${code}.F) then 742 set dyn="$dyn DIRMAIN=phy$physique " 743 endif 744 if (-f $LMDGCM/libf/phy${physique}/${code}.F90) then 760 set dirmain=dyn${dimc}d 761 if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then 745 762 set source_code=${code}.F90 746 set dyn="$dyn DIRMAIN=phy$physique " 763 endif 764 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F ) then 765 set dirmain=phy${physique}/dyn1d 766 set source_code=${code}.F 767 endif 768 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F90 ) then 769 set dirmain=phy${physique}/dyn1d 770 set source_code=${code}.F90 771 endif 772 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F ) then 773 set dirmain=dynlonlat_phylonlat/phy${physique} 774 set source_code=${code}.F 775 endif 776 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F90 ) then 777 set dirmain=dynlonlat_phylonlat/phy${physique} 778 set source_code=${code}.F90 747 779 endif 748 780 … … 755 787 $filtre \ 756 788 LIBO=$libo \ 757 $dyn \758 789 $phys \ 790 LIBDYN_PHYS=${LIBDYN_PHYS} \ 759 791 DIM=$dimc \ 760 792 DYNTYPE="$dyntype" \ 793 L_DYN_PHY="$libdyn_phy" \ 761 794 L_ADJNT="$adjnt" \ 762 795 LOCAL_DIR="$localdir" \ … … 769 802 MOD_SUFFIX=$mod_suffix \ 770 803 AR=$ar \ 804 DIRMAIN=$dirmain \ 771 805 SOURCE=$source_code \ 772 806 PROG=$code 807 773 808 774 809 $make -f $LMDGCM/makefile \ … … 780 815 $filtre \ 781 816 LIBO=$libo \ 782 $dyn \783 817 $phys \ 818 LIBDYN_PHYS=${LIBDYN_PHYS} \ 784 819 DIM=$dimc \ 785 820 DYNTYPE="$dyntype" \ 821 L_DYN_PHY="$libdyn_phy" \ 786 822 L_ADJNT="$adjnt" \ 787 823 LOCAL_DIR="$localdir" \ … … 794 830 MOD_SUFFIX=$mod_suffix \ 795 831 AR=$ar \ 832 DIRMAIN=$dirmain \ 796 833 SOURCE=$source_code \ 797 834 PROG=$code … … 799 836 \rm -f $libf/grid/dimensions.h 800 837 \rm -f $libf/grid/bands.h 801 \rm -f $libf/phy$ {physique}/bands.h838 \rm -f $libf/phy$physique/bands.h 802 839 \rm -f $libf/phy$physique/scatterers.h
Note: See TracChangeset
for help on using the changeset viewer.