Changeset 1403 for trunk/LMDZ.GENERIC/makegcm_g95
- Timestamp:
- Mar 31, 2015, 3:49:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/makegcm_g95
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 … … 25 28 set scriptdir=`dirname $0` 26 29 setenv LMDGCM `readlink -f $scriptdir` 27 #setenv LMDGCM /u/emlmd/LMDZ.MARS30 #setenv LMDGCM "/san/home/rdword/gcm/LMDZ.GENERIC" 28 31 setenv LIBOGCM $LMDGCM/libo 29 # NetCDF 30 # 64 bit machines what is below is OK on LMD machines 31 setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_g95/lib 32 setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_g95/include 33 #else 34 # setenv NCDFLIB /distrib/local/netcdf/g95_32bits/lib 35 # setenv NCDFINC /distrib/local/netcdf/g95_32bits/include 36 #endif 37 #### 32 # NetCDF, on LMD computers: 33 setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_g95/lib 34 setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_g95/include 35 ##### 36 37 38 38 39 39 40 setenv localdir "`pwd`" … … 120 121 set machine=XNEC 121 122 set XNEC=1 123 else if ( `uname` == CYGWIN_NT-6.1-WOW64) then 124 set machine=LINUX 125 set LINUX=1 122 126 else 123 127 echo Vous travaillez sur une machine non prevue par le reglement … … 209 213 set mod_loc_dir="./" 210 214 else 211 #### 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"212 215 set opt_link=" -C hopt -float0 -ew -P static -I$NCDFINC -L/SX/usr/local/lib -lnetcdf_i8r8" 213 216 set mod_loc_dir="." … … 326 329 ######################################################################## 327 330 328 case -d :331 case -d 329 332 set dim=$2 ; shift ; shift ; goto top 330 333 331 334 case -O: 332 set optim90="$2" ; s hift ; shift ; goto top335 set optim90="$2" ; set optim="$2" ; set optimtru90="$2" ; shift ; shift ; goto top 333 336 334 337 case -p … … 391 394 endif 392 395 396 393 397 echo "apres les opts dim $dim" 394 398 … … 398 402 if ( "$physique" == 'nophys' ) then 399 403 set phys="L_PHY= LIBPHY=" 400 endif 401 404 else 405 set src_dirs="$src_dirs phy$physique" 406 set include="$include "' -I$(LIBF)/phy'"$physique" 407 endif 408 set libdyn_phy="" 409 set LIBDYN_PHYS="" 402 410 ######################################################################## 403 411 #subtilites sur le nom de la librairie 404 412 ######################################################################## 413 405 414 406 415 \rm tmp ; touch tmp … … 476 485 set include="$include "'-I$(LIBF)/dyn2d ' 477 486 set dimh=$dim 478 else 487 endif 488 if ( "$dimc" == "3" ) then 479 489 if ( "$dyntype" == "olddyn" ) then 480 490 set include="$include "'-I$(LIBF)/olddyn3d ' 491 set src_dirs="$src_dirs olddyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 481 492 else 482 493 set include="$include "'-I$(LIBF)/dyn3d ' 494 set src_dirs="$src_dirs dyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 483 495 endif 496 set libdyn_phy="-ldynlonlat_phylonlat" 497 set LIBDYN_PHYS='$(LIBO)/libdynlonlat_phylonlat.a' 484 498 set dimh=`echo $dim | awk ' { print $1 "." $2 } '` 485 499 endif … … 554 568 ## NB: we still need to have L_DYN=libdyn3d to reach routines and module 555 569 ## objects which are located in dyn3d 556 set dyn="L_DYN=-ldyn3d DYN= L_FILTRE= DIRMAIN=phy$physique " 570 set dyntype="" 571 set filtre="L_DYN= DYN= FILTRE= L_FILTRE= " 572 set dyn="L_DYN= DYN= L_FILTRE= " 573 set dirmain="phy$physique/dyn1d" 574 set src_dirs="$src_dirs phy$physique/dyn1d " 575 set include="$include "' -I$(LIBF)/phy'"$physique"'/dyn1d' 557 576 endif 558 577 endif … … 576 595 if ( `expr $dimc \> 2` == 1 ) then 577 596 set filtre="FILTRE=$filtre" 597 if ( "$dyntype" == "olddyn" ) then 598 set src_dirs="$src_dirs oldfiltrez" 599 else 600 set src_dirs="$src_dirs filtrez" 601 endif 578 602 else 579 set filtre="FILTRE= L_FILTRE= "603 set filtre="FILTRE= L_FILTRE= L_DYN= " 580 604 endif 581 605 echo "MACRO FILTRE $filtre" … … 618 642 \cp tmp77 liste_des_sources_f77 619 643 \cp tmp90 liste_des_sources_f90 620 echo "On recree le makefile" 621 if ("$dyntype" == "olddyn") then 622 ./create_make_gcm olddyn3d grid bibio aeronomars phy$physique >! tmp 623 else 624 ./create_make_gcm dyn3d grid bibio aeronomars phy$physique >! tmp 625 endif 644 echo "Remaking the makefile!" 645 echo "src_dirs: $src_dirs" 646 create_make_gcm $src_dirs >! tmp 626 647 \mv tmp makefile 627 echo "N ouveau makefile cree."648 echo "New makefile created." 628 649 endif 629 650 … … 631 652 # Execution de la comande make 632 653 ######################################################################## 654 633 655 634 656 echo PHYSIQUE $phys … … 649 671 set f90=f90 650 672 else if $LINUX then 651 # set f77=pgf90652 # set f90=pgf90653 673 set f77=g95 654 674 set f90=g95 … … 727 747 set source_code=${code}.F 728 748 # handle cases when the main program is in the physics directory 729 if (-f $LMDGCM/libf/phy${physique}/${code}.F) then 730 set dyn="$dyn DIRMAIN=phy$physique " 731 endif 732 if (-f $LMDGCM/libf/phy${physique}/${code}.F90) then 749 set dirmain=dyn${dimc}d 750 if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then 733 751 set source_code=${code}.F90 734 set dyn="$dyn DIRMAIN=phy$physique " 752 endif 753 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F ) then 754 set dirmain=phy${physique}/dyn1d 755 set source_code=${code}.F 756 endif 757 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F90 ) then 758 set dirmain=phy${physique}/dyn1d 759 set source_code=${code}.F90 760 endif 761 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F ) then 762 set dirmain=dynlonlat_phylonlat/phy${physique} 763 set source_code=${code}.F 764 endif 765 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F90 ) then 766 set dirmain=dynlonlat_phylonlat/phy${physique} 767 set source_code=${code}.F90 735 768 endif 736 769 737 770 echo $make -f $LMDGCM/makefile \ 738 771 OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \ 772 OPTIM="$optim" \ 739 773 OPTIM90="$optim90" \ 740 774 OPTIMTRU90="$optimtru90" \ … … 742 776 $filtre \ 743 777 LIBO=$libo \ 744 $dyn \745 778 $phys \ 779 LIBDYN_PHYS=${LIBDYN_PHYS} \ 746 780 DIM=$dimc \ 747 781 DYNTYPE="$dyntype" \ 782 L_DYN_PHY="$libdyn_phy" \ 748 783 L_ADJNT="$adjnt" \ 749 784 LOCAL_DIR="$localdir" \ … … 756 791 MOD_SUFFIX=$mod_suffix \ 757 792 AR=$ar \ 793 DIRMAIN=$dirmain \ 758 794 SOURCE=$source_code \ 759 795 PROG=$code … … 762 798 $make -f $LMDGCM/makefile \ 763 799 OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \ 800 OPTIM="$optim" \ 764 801 OPTIM90="$optim90" \ 765 802 OPTIMTRU90="$optimtru90" \ … … 767 804 $filtre \ 768 805 LIBO=$libo \ 769 $dyn \770 806 $phys \ 807 LIBDYN_PHYS=${LIBDYN_PHYS} \ 771 808 DIM=$dimc \ 772 809 DYNTYPE="$dyntype" \ 810 L_DYN_PHY="$libdyn_phy" \ 773 811 L_ADJNT="$adjnt" \ 774 812 LOCAL_DIR="$localdir" \ … … 781 819 MOD_SUFFIX=$mod_suffix \ 782 820 AR=$ar \ 821 DIRMAIN=$dirmain \ 783 822 SOURCE=$source_code \ 784 823 PROG=$code … … 786 825 \rm -f $libf/grid/dimensions.h 787 826 \rm -f $libf/grid/bands.h 788 \rm -f $libf/phy$ {physique}/bands.h827 \rm -f $libf/phy$physique/bands.h 789 828 \rm -f $libf/phy$physique/scatterers.h
Note: See TracChangeset
for help on using the changeset viewer.