Changeset 1403 for trunk/LMDZ.GENERIC/makegcm_pgf90
- Timestamp:
- Mar 31, 2015, 3:49:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/makegcm_pgf90
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 … … 27 30 #setenv LMDGCM "/san/home/rdword/gcm/LMDZ.GENERIC" 28 31 setenv LIBOGCM $LMDGCM/libo 29 # NetCDF, on LMD 64 bit machines32 # NetCDF, on LMD computers: 30 33 setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_pgi/lib 31 34 setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_pgi/include … … 115 118 set machine=XNEC 116 119 set XNEC=1 120 else if ( `uname` == CYGWIN_NT-6.1-WOW64) then 121 set machine=LINUX 122 set LINUX=1 117 123 else 118 124 echo Vous travaillez sur une machine non prevue par le reglement … … 208 214 set mod_loc_dir="./" 209 215 else 210 #### 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"211 216 set opt_link=" -C hopt -float0 -ew -P static -I$NCDFINC -L/SX/usr/local/lib -lnetcdf_i8r8" 212 217 set mod_loc_dir="." … … 216 221 endif 217 222 218 set nomlib=$ machine223 set nomlib=${machine} 219 224 220 225 # Impose distinct name for 64 bit Linux machines (to avoid mixing 32 and 64) … … 399 404 if ( "$physique" == 'nophys' ) then 400 405 set phys="L_PHY= LIBPHY=" 401 endif 402 406 else 407 set src_dirs="$src_dirs phy$physique" 408 set include="$include "' -I$(LIBF)/phy'"$physique" 409 endif 410 set libdyn_phy="" 411 set LIBDYN_PHYS="" 403 412 ######################################################################## 404 413 #subtilites sur le nom de la librairie … … 478 487 set include="$include "'-I$(LIBF)/dyn2d ' 479 488 set dimh=$dim 480 else 489 endif 490 if ( "$dimc" == "3" ) then 481 491 if ( "$dyntype" == "olddyn" ) then 482 492 set include="$include "'-I$(LIBF)/olddyn3d ' 493 set src_dirs="$src_dirs olddyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 483 494 else 484 495 set include="$include "'-I$(LIBF)/dyn3d ' 496 set src_dirs="$src_dirs dyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 485 497 endif 498 set libdyn_phy="-ldynlonlat_phylonlat" 499 set LIBDYN_PHYS='$(LIBO)/libdynlonlat_phylonlat.a' 486 500 set dimh=`echo $dim | awk ' { print $1 "." $2 } '` 487 501 endif … … 556 570 ## NB: we still need to have L_DYN=libdyn3d to reach routines and module 557 571 ## objects which are located in dyn3d 558 set dyn="L_DYN=-ldyn3d DYN= L_FILTRE= DIRMAIN=phy$physique " 572 set dyntype="" 573 set filtre="L_DYN= DYN= FILTRE= L_FILTRE= " 574 set dyn="L_DYN= DYN= L_FILTRE= " 575 set dirmain="phy$physique/dyn1d" 576 set src_dirs="$src_dirs phy$physique/dyn1d " 577 set include="$include "' -I$(LIBF)/phy'"$physique"'/dyn1d' 559 578 endif 560 579 endif … … 578 597 if ( `expr $dimc \> 2` == 1 ) then 579 598 set filtre="FILTRE=$filtre" 599 if ( "$dyntype" == "olddyn" ) then 600 set src_dirs="$src_dirs oldfiltrez" 601 else 602 set src_dirs="$src_dirs filtrez" 603 endif 580 604 else 581 set filtre="FILTRE= L_FILTRE= "605 set filtre="FILTRE= L_FILTRE= L_DYN= " 582 606 endif 583 607 echo "MACRO FILTRE $filtre" … … 621 645 \cp tmp90 liste_des_sources_f90 622 646 echo "Remaking the makefile!" 623 if ("$dyntype" == "olddyn") then 624 ./create_make_gcm olddyn3d grid bibio phy$physique >! tmp 625 else 626 ./create_make_gcm dyn3d grid bibio phy$physique >! tmp 627 endif 647 echo "src_dirs: $src_dirs" 648 create_make_gcm $src_dirs >! tmp 628 649 \mv tmp makefile 629 650 echo "New makefile created." … … 730 751 endif 731 752 732 733 753 cd $localdir 734 754 735 755 set source_code=${code}.F 736 756 # handle cases when the main program is in the physics directory 737 if (-f $LMDGCM/libf/phy${physique}/${code}.F) then 738 set dyn="$dyn DIRMAIN=phy$physique " 739 endif 740 if (-f $LMDGCM/libf/phy${physique}/${code}.F90) then 757 set dirmain=dyn${dimc}d 758 if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then 741 759 set source_code=${code}.F90 742 set dyn="$dyn DIRMAIN=phy$physique " 760 endif 761 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F ) then 762 set dirmain=phy${physique}/dyn1d 763 set source_code=${code}.F 764 endif 765 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F90 ) then 766 set dirmain=phy${physique}/dyn1d 767 set source_code=${code}.F90 768 endif 769 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F ) then 770 set dirmain=dynlonlat_phylonlat/phy${physique} 771 set source_code=${code}.F 772 endif 773 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F90 ) then 774 set dirmain=dynlonlat_phylonlat/phy${physique} 775 set source_code=${code}.F90 743 776 endif 744 777 … … 751 784 $filtre \ 752 785 LIBO=$libo \ 753 $dyn \754 786 $phys \ 787 LIBDYN_PHYS=${LIBDYN_PHYS} \ 755 788 DIM=$dimc \ 756 789 DYNTYPE="$dyntype" \ 790 L_DYN_PHY="$libdyn_phy" \ 757 791 L_ADJNT="$adjnt" \ 758 792 LOCAL_DIR="$localdir" \ … … 765 799 MOD_SUFFIX=$mod_suffix \ 766 800 AR=$ar \ 801 DIRMAIN=$dirmain \ 767 802 SOURCE=$source_code \ 768 803 PROG=$code … … 777 812 $filtre \ 778 813 LIBO=$libo \ 779 $dyn \780 814 $phys \ 815 LIBDYN_PHYS=${LIBDYN_PHYS} \ 781 816 DIM=$dimc \ 782 817 DYNTYPE="$dyntype" \ 818 L_DYN_PHY="$libdyn_phy" \ 783 819 L_ADJNT="$adjnt" \ 784 820 LOCAL_DIR="$localdir" \ … … 791 827 MOD_SUFFIX=$mod_suffix \ 792 828 AR=$ar \ 829 DIRMAIN=$dirmain \ 793 830 SOURCE=$source_code \ 794 831 PROG=$code
Note: See TracChangeset
for help on using the changeset viewer.