Changeset 2071 for LMDZ5/branches/LMDZ5-DOFOCO/makelmdz
- Timestamp:
- Jun 23, 2014, 10:35:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/LMDZ5-DOFOCO/makelmdz
r1789 r2071 25 25 fcm_path=none 26 26 cosp=false 27 sisvat=false 28 rrtm=false 27 29 28 30 # guess a default 'arch' … … 30 32 ## try to recognise machine and infer arch from it 31 33 machine=`hostname` 32 if [[ "$machine" == "brodie" ]] 33 then 34 arch="SX8_BRODIE" 35 fi 36 if [[ "${machine:0:6}" == "vargas" ]] 37 then 38 arch="PW6_VARGAS" 39 fi 40 if [[ "${machine:0:6}" == "ciclad" ]] 41 then 42 arch="AMD64_CICLAD" 34 if [[ "${machine:0:3}" == "ada" ]] 35 then 36 arch="X64_ADA" 43 37 fi 44 38 if [[ "${machine:0:7}" == "platine" ]] … … 165 159 CPP_KEY="$CPP_KEY $2" ; shift ; shift ;; 166 160 167 "-adjnt")168 echo "not operational ... work to be done here ";exit169 opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "170 optim="$optim -Dadj" ; shift ;;171 172 161 "-cosp") 173 162 cosp="$2" ; shift ; shift ;; 163 164 "-sisvat") 165 sisvat="$2" ; shift ; shift ;; 166 167 "-rrtm") 168 rrtm="$2" ; shift ; shift ;; 174 169 175 170 "-mem") … … 276 271 LIB="$LIB ${archfileopt}" 277 272 273 # add Include files defined in arch.fcm file for pre-processing 274 archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm ) 275 for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done 276 278 277 if [[ "$physique" != "nophys" ]] 279 278 then … … 306 305 FLAG_PARA='' 307 306 else 308 FLAG_PARA=" par"307 FLAG_PARA="$paramem" 309 308 fi 310 309 … … 351 350 fi 352 351 353 if [[ "$veget" == "orchidee2.0" ]] 354 then 355 # orchidee2.0 : 356 # Compile with ORCHIDEE 2.0 (or more recent) 352 353 #============================================================================== 354 if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ] 355 then 356 357 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 357 358 CPP_KEY="$CPP_KEY CPP_VEGET" 358 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 359 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee " 360 elif [[ "$veget" == "orchidee1.9" ]] 361 then 362 # orchidee1.9 : 363 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 364 CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP" 365 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 366 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" 367 elif [[ "$veget" == "true" ]] 368 then 369 # true : 370 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6 371 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments 372 CPP_KEY="$CPP_KEY CPP_VEGET" 373 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 374 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" 375 elif [[ "$veget" != "false" ]] 376 then 359 # temporary, for Orchidee versions 1.9.* (before openmp activation) 360 if [[ "$veget" == "orchidee1.9" ]] ; then 361 CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP" 362 fi 363 if [[ "$veget" == "orchidee2.0" ]] ; then 364 orch_libs="sechiba parameters stomate parallel orglob orchidee" 365 else 366 orch_libs="sechiba parameters stomate parallel orglob" 367 fi 368 LIB="${LIB} -L${ORCH_LIBDIR}" 369 for lib in ${orch_libs} ; do 370 if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then 371 LIB="${LIB} -l${LIBPREFIX}$lib " 372 fi 373 done 374 elif [[ "$veget" != "false" ]] ; then 377 375 echo "Option -v $veget does not exist" 378 376 echo "Use ./makelmdz -h for more information" … … 380 378 fi 381 379 380 #=============================================================================== 382 381 if [[ $io == ioipsl ]] 383 382 then … … 385 384 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" 386 385 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" 386 elif [[ $io == xios ]] 387 then 388 # For now, xios implies also using ioipsl 389 CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" 390 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}" 391 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios" 387 392 fi 388 393 … … 396 401 INCLUDE="$INCLUDE"' -I$(LIBF)/cosp' 397 402 fi 403 404 if [[ "$sisvat" == "true" ]] 405 then 406 CPP_KEY="$CPP_KEY CPP_SISVAT" 407 fi 408 409 if [[ "$rrtm" == "true" ]] 410 then 411 CPP_KEY="$CPP_KEY CPP_RRTM" 412 fi 413 398 414 399 415 INCLUDE="$INCLUDE ${NETCDF_INCDIR}" … … 453 469 ######################################################################## 454 470 455 dimension=`echo $dim | wc -w` 456 echo dimension $dimension 457 458 if (( $dimension == 3 )) 459 then 460 cd $LIBFGCM/grid 461 \rm fxyprim.h 462 cp -p fxy_${grille}.h fxyprim.h 471 if (( $dimc == 3 )) ; then 472 cd $LIBFGCM/grid 473 \rm fxyprim.h 474 cp -p fxy_${grille}.h fxyprim.h 475 filtre="FILTRE=$filtre" 476 INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} -I$(LIBF)/dyn3d_common ' 477 elif (( $dimc == 2 )) ; then 478 filtre="FILTRE= L_FILTRE= " 479 INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d' 480 elif (( $dimc == 1 )) ; then 481 CPP_KEY="$CPP_KEY CPP_1D" 482 filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique " 483 INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d -I$(LIBF)/dyn3d_common ' # Pas tres propre 463 484 else 464 echo "Probleme dans les dimensions de la dynamique !!" 465 echo "Non reactive pour l'instant !!!" 466 fi 467 468 ###################################################################### 469 # Gestion du filtre qui n'existe qu'en 3d. 470 ###################################################################### 471 472 if (( `expr $dimc \> 2` == 1 )) 473 then 474 filtre="FILTRE=$filtre" 475 else 476 filtre="FILTRE= L_FILTRE= " 477 fi 478 echo MACRO FILTRE $filtre 479 480 echo $dimc 481 482 ###################################################################### 483 # Creation du suffixe de la configuration 484 ###################################################################### 485 486 487 SUFF_NAME=_${dim_full} 488 SUFF_NAME=${SUFF_NAME}_phy${physique} 489 490 if [[ "$parallel" != "none" ]] 491 then 492 SUFF_NAME=${SUFF_NAME}_para 493 DYN=dyn${dimc}d${paramem} 494 if [[ "$paramem" == "mem" ]] 495 then 496 SUFF_NAME=${SUFF_NAME}_${paramem} 497 fi 498 else 499 SUFF_NAME=${SUFF_NAME}_seq 500 DYN=dyn${dimc}d 501 fi 502 503 if [[ $veget != "false" ]] 504 then 505 SUFF_NAME=${SUFF_NAME}_orch 506 fi 507 508 if [[ $couple != "false" ]] 509 then 510 SUFF_NAME=${SUFF_NAME}_couple 511 fi 512 513 if [[ $chimie == "INCA" ]] 514 then 515 SUFF_NAME=${SUFF_NAME}_inca 516 fi 485 echo Dimension dimc=$dimc pas prevu ; exit 486 fi 487 517 488 518 489 cd $LMDGCM … … 531 502 ######################################################################## 532 503 cd $LMDGCM 504 533 505 find libf -name '*.[Fh]' -print > tmp77 534 506 find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90 535 find libf -name '*. [Fh90]' -print >> tmp90507 find libf -name '*.F90' -print >> tmp90 536 508 537 509 if [[ ! ( -r makefile ) || ! ( -r liste_des_sources_f90 ) || ! ( -r liste_des_sources_f77 ) || ` diff tmp77 liste_des_sources_f77 | wc -w ` -ne 0 || ` diff tmp90 liste_des_sources_f90 | wc -w ` -ne 0 ]] … … 557 529 then 558 530 source_code=${code}.F90 531 elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then 532 source_code=${code}.F90 559 533 fi 560 534 561 535 # library directory name: 562 if [[ "$parallel" == "none" ]] 563 then 564 nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod} 565 else 566 nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_${FLAG_PARA} 567 fi 536 nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'` 537 echo $nomlib 568 538 569 539 if [[ ! -d "${LIBOGCM}/${nomlib}" ]] … … 585 555 INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique" 586 556 fi 587 INCLUDE="$INCLUDE"' -I $(LIBF)/dyn'${dimc}'d'$FLAG_PARA' -I'${LIBOGCM}/${nomlib}557 INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib} 588 558 589 559 # ranlib utility (check it exists or else default to ls) … … 645 615 DIM=$dimc \ 646 616 FLAG_PARA=$FLAG_PARA \ 647 L_ADJNT= "$adjnt"\617 L_ADJNT=$adjnt \ 648 618 L_COSP="$lcosp" \ 649 619 L_CHIMIE="$libchimie" \ … … 660 630 PROG=$code 661 631 632 662 633 if [[ -r $LIBFGCM/grid/dimensions.h ]] 663 634 then
Note: See TracChangeset
for help on using the changeset viewer.