Changeset 7440


Ignore:
Timestamp:
05/30/18 16:38:59 (7 months ago)
Author:
baker
Message:

update compiler warning flags, add Intel Fortran compiler support

Location:
trunk/environment
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/environment/ew_linux.bash

    r7438 r7440  
    4141 
    4242# Warning flags for compiler: 
    43 export WARNFLAGS="-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-pragmas -Wformat" 
     43export WARNFLAGS="-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-pragmas -Wformat -Wdeclaration-after-statement" 
    4444# Extra flags for enabling more warnings during code development: 
    45 #export WARNFLAGS="-Wall -Wextra -Wcast-align -Wpointer-arith -Wbad-function-cast -Winline -Wundef -Wnested-externs -Wshadow -Wfloat-equal -Wno-unused-parameter -Wformat" 
     45#export WARNFLAGS="-Wall -Wextra -Wcast-align -Wpointer-arith -Wbad-function-cast -Winline -Wundef -Wnested-externs -Wshadow -Wfloat-equal -Wno-unused-parameter -Wformat -Wdeclaration-after-statement" 
    4646 
    4747# -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) on a 32-bit compile (gcc only); it is benign on a 64-bit compile 
     
    8383   export FC 
    8484   # Extra run-time checks: -check bounds,uninit 
     85   # ifort version 15 introduced the -init option; older compilers complain, but ignore it 
    8586   # ifort complains about comments past column 72; -warn truncated_source is pretty useless 
    86    #export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -traceback" 
    87    export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -traceback" 
     87   #export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -diag-disable 8290 -traceback" 
     88   export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -diag-disable 8290 -traceback" 
    8889 
    8990   # The hyp2000 FLFLAGS is not needed with Intel Fortran 
  • trunk/environment/ew_macosx_intel.sh

    r7438 r7440  
    4141 
    4242# Warning flags for compiler: 
    43 export WARNFLAGS="-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-pragmas -Wformat" 
     43export WARNFLAGS="-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-pragmas -Wformat -Wdeclaration-after-statement" 
    4444# Extra flags for enabling more warnings during code development: 
    45 #export WARNFLAGS="-Wall -Wextra -Wcast-align -Wpointer-arith -Wbad-function-cast -Winline -Wundef -Wnested-externs -Wshadow -Wfloat-equal -Wno-unused-parameter -Wformat" 
     45#export WARNFLAGS="-Wall -Wextra -Wcast-align -Wpointer-arith -Wbad-function-cast -Winline -Wundef -Wnested-externs -Wshadow -Wfloat-equal -Wno-unused-parameter -Wformat -Wdeclaration-after-statement" 
    4646 
    4747# -D_DARWIN_USE_64_BIT_INODE (OSX 10.5 and later) is for 64-bit inode numbers (see man 2 stat) 
     
    8484   export FC 
    8585   # Extra run-time checks: -check bounds,uninit 
     86   # ifort version 15 introduced the -init option; older compilers complain, but ignore it 
    8687   # ifort complains about comments past column 72; -warn truncated_source is pretty useless 
    87    #export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -traceback" 
    88    export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -traceback" 
     88   #export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -diag-disable 8290 -traceback" 
     89   export FFLAGS="-m${EWBITS} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -diag-disable 8290 -traceback" 
    8990 
    9091   # The hyp2000 FLFLAGS is not needed with Intel Fortran 
  • trunk/environment/ew_nt.cmd

    r7434 r7440  
    1717set GLASS_DIR=%EW_HOME%\%EW_VERSION%\src\seismic_processing\glass 
    1818 
    19 @rem -------------------------- 
     19@rem Earthworm uses UTC 
     20@rem ------------------ 
    2021set TZ=GMT 
    2122 
    22 @rem Set up Visual C++ compilation environment  
     23@rem Set up Visual C++ compilation environment 
    2324@rem ----------------------------------------- 
    24 @rem call "c:\Program Files\Microsoft Visual Studio\VC98\bin\Vcvars32.bat" 
    25 @rem call "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" 
    26 @rem call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" 
    27 @rem call "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" 
    28 @rem call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv" /Release /x64 
    29 @rem call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"  
    30 @rem call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat" 
    31 @rem   For build that targets 64-bit platform using a 64-bit development machine: 
     25 
     26@rem Earthworm requires the C99 inttypes.h header and round() in math.h 
     27@rem The minimum MS Visual C++ version is 12.0 (Visual Studio 2013) 
     28@rem From https://en.wikipedia.org/wiki/Microsoft_Visual_C++: 
     29@rem    MSVC++ 12.0, _MSC_VER == 1800 (Visual Studio 2013 version 12.0) 
     30@rem (MSVC versions 10 and 11 include the C90 stdint.h header, but neither 
     31@rem the inttypes.h header nor round() in math.h) 
     32@rem MS Visual Studio Community (formerly Express) Editions (no cost) since VS 2013 should work 
     33 
     34@rem For build that targets 64-bit platform using a 64-bit development machine: 
    3235@rem call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" amd64 
    33 @rem   For build that targets 64-bit platform using a 32-bit development machine: 
     36 
     37@rem For build that targets 64-bit platform using a 32-bit development machine: 
    3438@rem call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" x86_amd64 
    35 @rem   For build that targets 32-bit platform: 
    36 @rem call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv" /Release /x86 
     39@rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 
     40 
     41@rem For build that targets 32-bit platform: 
     42@rem Open VS2013 x86 Native Tools Command Prompt, which will execute the following command; SDK 8.1 will be used 
     43@rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat x86" 
    3744@rem call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat" 
    3845call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 
    39 @rem Your mileage may vary on the following 64 bit compile with VS 2017. Best to wait for Earthworm 8.0 
    4046@rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 
    4147 
     
    4349@rem ------------------------------------------ 
    4450 
     51@rem To compile the Fortran modules, set FC to the Fortran compiler command 
     52 
    4553@rem The default is not to compile any Fortran modules 
    4654set FC= 
    47 @rem To compile the Fortran modules, set FC to the Fortran compiler command 
     55@rem The Intel Fortran compiler command is ifort (requires a license) 
     56@rem set FC=ifort 
    4857 
    49 @rem Set up Intel Fortran compilation environment 
    50 @rem -------------------------------------------- 
    51 @rem call "c:\Program Files\Microsoft Visual Studio\DF98\bin\dfvars.bat" 
    52 @rem call "c:\Program Files\Intel\Compiler\Fortran\9.0\IA32\Bin\ifortvars.bat" 
    53 @rem "c:\Program Files\Intel\Compiler\Fortran\9.1\IA32\Bin\ifortvars.bat" 
    54 @rem call "c:\Program Files (x86)\Intel\Compiler\Fortran\9.1\IA32\Bin\ifortvars.bat" 
    55 @rem IBM Visual FORTRAN 11.1 Professional 
    56 @rem "c:\Program Files\Intel\Compiler\11.1\060\bin\ifortvars.bat" ia32 vs2008 
    57 @rem Intel Composer XE for Windows 
    58 @rem call "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars.bat" ia32 vs2012shell 
    59 @rem call "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\ifortvars.bat" ia32 vs2010shell 
    60 @rem Intel Parallel Studio XE 2016 for Windows (ia32 for 32-bit host and target, 
    61 @rem   intel64 for 64-bit host and target, ia32_intel64 for 32-bit host and 64-bit target) 
    62 call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat" ia32 
     58If "%FC%" == "ifort" ( 
    6359 
    64 @rem Don't forget to define FC! 
     60   @rem Set up Intel Fortran compilation environment 
     61   @rem -------------------------------------------- 
    6562 
    66 @rem The Intel Fortran compiler command is ifort 
    67 set FC=ifort 
     63   @rem The minimum Intel Fortran compiler version that supports MS Visual Studio 2013 is 14.0 
     64   @rem (Composer/Parallel Studio XE 2013 SP1) 
     65   @rem Intel Parallel Studio (formerly Composer) XE 2013 SP1 for Windows 
     66   @rem call "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\ifortvars.bat" ia32 vs2013 
     67   @rem Intel Parallel Studio XE 2016 for Windows (ia32 for 32-bit host and target, 
     68   @rem   intel64 for 64-bit host and target, ia32_intel64 for 32-bit host and 64-bit target) 
     69   call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat" ia32 
     70 
     71   @rem Define the Intel Fortran compiler options 
     72   @rem Extra run-time checks: /check:bounds,uninit 
     73   @rem ifort version 15 introduced the /Qinit option; older compilers complain, but ignore it 
     74   @rem ifort complains about comments past column 72; /warn:truncated_source is pretty useless 
     75   @rem set FFLAGS=/O3 /Qinit:snan /Qinit:arrays /extend-source /warn:truncated_source /fpe-all:0 /check:bounds,uninit /Qdiag-disable:8290 /traceback 
     76   set FFLAGS=/O3 /Qinit:snan /Qinit:arrays /extend-source /warn:truncated_source /fpe-all:0 /Qdiag-disable:8290 /traceback 
     77 
     78   @rem FC_MAIN_IS_C is not necessary for MSVC 
     79   @rem set FC_MAIN_IS_C=-nofor-main 
     80 
     81) 
     82 
     83@rem Make sure the Fortran compiler is usable 
     84If NOT "%FC%" == "" ( 
     85   where %FC% 
     86   If %ERRORLEVEL% NEQ 0 ( 
     87      set FC= 
     88   ) 
     89) 
    6890 
    6991@rem Set the path 
Note: See TracChangeset for help on using the changeset viewer.