Changeset 1590
- Timestamp:
- Nov 24, 2011, 9:30:06 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install.sh
r1589 r1590 39 39 40 40 41 real=r441 #real=r4 42 42 real=r8 43 43 … … 58 58 veget=0 59 59 bench=1 60 ## compilo=pgf90 ou g95 ou gfortran sur PC linux60 ## compilo=pgf90 ou g95 ou gfortran ou ifort sur PC linux 61 61 compilo=gfortran 62 62 pclinux=1 … … 77 77 if [ $real = r8 ] ; then OPTPREC="-fdefault-real-8 -DNC_DOUBLE" ; fi 78 78 OPTIM='-O3' 79 el se #pgf9080 if [ $real = r8 ] ; then echo "Option real 8 non disponible pour pgf90" ; exit; fi79 elif [ $compilo = pgf90 ] ; then 80 if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi 81 81 OPTIM='-O2 -Munroll -Mnoframe -Mautoinline -Mcache_align' 82 # with pgf90, compile with fcm 83 compile_with_fcm=1 84 else 85 # ifort 86 if [ $real = r8 ] ; then OPTPREC="-real-size 64 -DNC_DOUBLE" ; fi 87 OPTIM="-O2 -ip -mkl=sequential -align all -static " 88 # with ifort, compile with fcm 89 compile_with_fcm=1 82 90 fi 83 91 OPTIMGCM="$OPTIM $OPTPREC" … … 220 228 export F90=pgf90 221 229 export F90FLAGS="$OPTIMNC" 230 elif [ $compilo = ifort ] ; then 231 export CPP="icc -E" 232 export F77=ifort 233 export FFLAGS="-O2 -ip -fpic -mcmodel=large" 234 export F90=ifort 235 export FCFLAGS="-O2 -ip -fpic -mcmodel=large" 236 export CC=icc 237 export CFLAGS="-O2 -ip -fpic -mcmodel=large" 238 export CXX=icpc 239 export CXXFLAGS="-O2 -ip -fpic -mcmodel=large" 222 240 else 223 241 echo Le compilateur $compilo pas prevu ; exit … … 261 279 elif [ $compilo = g95 ] ; then 262 280 fmod='fmod=' 281 elif [ $compilo = ifort ] ; then 282 fmod='module ' 263 283 else # gfortran 264 284 fmod='I ' … … 366 386 -e 's/g95/gfortran/g' \ 367 387 -e 's/-fmod=/-I/g' \ 388 -e 's/-fno-second-underscore//' -e 's/-fstatic//' \ 389 -e 's/-lparallel//' \ 390 -e 's/-lorglob//' \ 391 -e 's/-ffixed-form//' -e 's/-ffree-form//' \ 392 -e 's/set OPT_LINUX.*.$/set OPT_LINUX=\"'"$OPTIMGCM"\"'/' makegcm.orig >| makegcm 393 elif [ $compilo = ifort ] ; then 394 sed \ 395 -e 's:\#setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \ 396 -e 's:\#setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \ 397 -e 's:setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \ 398 -e 's:setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \ 399 -e 's/set FC_LINUX.*.$/set FC_LINUX='$compilo'/' \ 400 -e 's/g95/ifort/g' \ 401 -e 's/-fmod=/-module /g' \ 368 402 -e 's/-fno-second-underscore//' -e 's/-fstatic//' \ 369 403 -e 's/-lparallel//' \ … … 405 439 cd arch 406 440 # fichier arch-local.path 407 echo "NETCDF_LIBDIR=\"-L /${ncdfdir}/lib -lnetcdf\"" > arch-local.path408 echo "NETCDF_INCDIR=-I /${ncdfdir}/include" >> arch-local.path441 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path 442 echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path 409 443 echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path 410 444 echo 'IOIPSL_LIBDIR=$LMDGCM/../../lib' >> arch-local.path … … 415 449 sed -e s:"%COMPILER pgf95":"%COMPILER g95":1 \ 416 450 -e s:"%LINK pgf95":"%LINK g95":1 \ 417 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS ":1 \418 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPT IMGCM":1 \451 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS $OPTIM":1 \ 452 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPTPREC":1 \ 419 453 arch-linux-32bit.fcm > arch-local.fcm 420 454 if [ $real = r8 ] ; then … … 426 460 sed -e s:"%COMPILER pgf95":"%COMPILER gfortran":1 \ 427 461 -e s:"%LINK pgf95":"%LINK gfortran":1 \ 428 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS ":1 \429 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPT IMGCM":1 \462 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS $OPTIM":1 \ 463 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPTPREC":1 \ 430 464 arch-linux-32bit.fcm > arch-local.fcm 431 465 if [ $real = r8 ] ; then … … 436 470 elif [ $compilo = pgf90 ] ; then 437 471 sed -e s:"-Wl,-Bstatic -L/usr/lib/gcc-lib/i386-linux/2.95.2":" ":1 \ 438 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS ":1 \439 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPT IMGCM":1 \472 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS $OPTIM":1 \ 473 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPTPREC":1 \ 440 474 arch-linux-32bit.fcm > arch-local.fcm 441 if [ $real = r8] ; then 475 if [ $real = r8 ] ; then 476 sed -e s:"%FPP_DEF ":"%FPP_DEF NC_DOUBLE":1 \ 477 arch-local.fcm > arch-local.fcm.new 478 mv -f arch-local.fcm.new arch-local.fcm 479 fi 480 elif [ $compilo = ifort ] ; then 481 sed -e s:"%COMPILER pgf95":"%COMPILER ifort":1 \ 482 -e s:"%LINK pgf95":"%LINK ifort":1 \ 483 -e s:"-Wl,-Bstatic -L/usr/lib/gcc-lib/i386-linux/2.95.2":" ":1 \ 484 -e s:"%PROD_FFLAGS -fast":"%PROD_FFLAGS $OPTIM":1 \ 485 -e s:"%BASE_FFLAGS ":"%BASE_FFLAGS $OPTPREC":1 \ 486 -e s:"%DEBUG_FFLAGS -g -O0 -Kieee -Ktrap=fp -Mbounds":"%DEBUG_FFLAGS -g -no-ftz -traceback -ftrapuv -fp-stack-check -check":1 \ 487 arch-linux-32bit.fcm > arch-local.fcm 488 if [ $real = r8 ] ; then 442 489 sed -e s:"%FPP_DEF ":"%FPP_DEF NC_DOUBLE":1 \ 443 490 arch-local.fcm > arch-local.fcm.new … … 470 517 ./makelmdz_fcm -d ${grid_resolution} -arch local -v $ok_veget gcm 471 518 else 472 # Compilation avec makegcm 519 # Compilation avec makegcm: 520 # 3 times! because some dependecies are not well resolved with makegcm 473 521 ./makegcm -d ${grid_resolution} -v $ok_veget gcm 474 522 ./makegcm -d ${grid_resolution} -v $ok_veget gcm
Note: See TracChangeset
for help on using the changeset viewer.