source: trunk/mesoscale/LMD_LES_MARS/modif_mars/makeles @ 24

Last change on this file since 24 was 24, checked in by aslmd, 14 years ago

spiga:mineur diverses notes et tests g95 64bits

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#! /bin/bash
2
3#------------------------------
4# makeles
5#------------------------------
6#     MMM must be defined
7#------------------------------
8# A. Spiga 01/2009
9#------------------------------
10
11
12#
13# SPECIAL CICLAD
14#
15
16donotcompilephys=0
17while getopts "n" options; do
18  case $options in
19   n ) donotcompilephys=1;; ## do not recompile physics
20  esac
21done
22
23#
24# LOCATIONS
25#
26here=$PWD
27whereliblmd=$here
28
29
30##############################################################
31##############################################################
32if [ ${donotcompilephys} -eq 0 ]
33then
34
35#
36# COMPILE PHYSICS
37#
38cd $MMM
39makemeso -j
40#
41#makemeso -rd < last > /dev/null
42folder=$PWD'/'$(more what_folder)'/WRFV2/'
43libphys_folder=$folder'mars_lmd/libo/'
44phymars_folder=$folder'mars_lmd/libf/phymars/'
45\rm what_folder 2> /dev/null
46
47#
48# GET liblmd GENERATED LIBRARY and INCLUDEs
49#
50echo $libphys_folder
51cp -rf ${libphys_folder}/liblmd.a ${whereliblmd}/
52cp -rf ${phymars_folder}/dimphys.h ${here}/modif_mars/
53cp -rf ${folder}/call_meso_inifis.inc ${here}/modif_mars/
54cp -rf ${folder}/call_meso_physiq.inc ${here}/modif_mars/
55cp -rf ${folder}/inc/module_lmd_driver_output*.inc ${here}/modif_mars/
56cp -rf ${phymars_folder}/wrf_output_2d.h ${here}/modif_mars/
57cp -rf ${phymars_folder}/wrf_output_3d.h ${here}/modif_mars/
58
59fi
60##############################################################
61##############################################################
62
63
64cd $here
65
66#------------------------------
67#------------------------------
68#
69# MPI (dm) 64 bits
70#
71#TODO: le rendre adapte aux reponses du user a makemeso
72touch conf
73echo 3 >> conf
74#echo 4 >> conf  #openMP n'arrange pas beaucoup de le tps de calcul
75echo 1 >> conf
76#------------------------------
77#------------------------------
78
79
80
81### SINGLE PROC 32 bits g95
82#touch conf
83#echo 5 >> conf
84#echo 0 >> conf
85
86## SINGLE PROC 64 bits
87#touch conf
88#echo 1 >> conf
89#echo 0 >> conf
90
91
92
93#
94# CONFIGURE
95#
96echo "configure..."
97#touch configure.wrf
98\rm configure.wrf
99./configure < conf > /dev/null 2> /dev/null
100#./configure
101#sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf | sed s+'mpif90 -f90=$(SFC)'+'/usr/lib64/openmpi/1.2.8-pgf/bin/mpif90'+g | sed s+'mpicc -cc=$(SCC)'+'/usr/lib64/openmpi/1.2.8-gcc/bin/mpicc -DMPI2_SUPPORT'+g > yeah
102## WHERE_MPI must be defined
103sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf | sed s+"mpif90"+"$WHERE_MPI/mpif90"+g | sed s+"mpicc"+"$WHERE_MPI/mpicc"+g > yeah
104#sed s+"# -g"+"-fno-second-underscore # -g"+g configure.wrf | sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g > yeah
105#sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf | sed s+"#-g"+"-g"+g > yeah
106#sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf > yeah
107mv yeah configure.wrf
108
109        ####
110        #### provoque des seg faults....
111        ####
112        #sed s+"-fastsse"+"-fastsse -mcmodel=medium -Mlarge_arrays"+g configure.wrf > yeah
113        #### TEST TEST
114        #mv yeah configure.wrf
115
116sed s+"-fastsse"+" "+g configure.wrf > yeah
117#
118# sometimes fastsse is problematic
119#
120
121##sed s+"-fastsse"+"-fastsse -mcmodel=medium"+g configure.wrf > yeah
122mv yeah configure.wrf
123#sed s+"-mp -Minfo=mp"+"-mp -Minfo=mp -mp=nonuma"+g configure.wrf > yeah
124#mv yeah configure.wrf
125
126\rm conf
127
128
129#
130# COMPILE LES TEST CASE w/ LMD PHYSICS
131#
132touch modif_mars/module_lmd_driver.F
133\rm log_compile
134\rm log_error
135echo "compile LES WRF with LMD Mars physics... look log_compile and log_error"
136compile em_les > log_compile 2> log_error
137
138echo '***********************************'
139tail -n 20 log_error
140
Note: See TracBrowser for help on using the repository browser.