From 1aa4e6879b92b8a5f35bff8863769521678123f2 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 23:12:51 -0500 Subject: [PATCH] FDS Build: Change Build scripts to allow both ifx and ifort, and keep same fortran compiler for FDS and thirdparty. --- .github/workflows/linux.yml | 11 +-- .github/workflows/windows.yml | 2 - Build/Scripts/HYPRE/build_hypre.bat | 29 +------ Build/Scripts/HYPRE/confmake.sh | 5 +- Build/Scripts/SUNDIALS/build_sundials.bat | 28 +------ Build/Scripts/SUNDIALS/confmake.sh | 6 +- Build/Scripts/build_thirdparty_libs.bat | 15 +--- Build/Scripts/build_thirdparty_libs.sh | 8 +- Build/Scripts/set_compilers.bat | 64 +++++++++++++++ ...irdparty_compilers.sh => set_compilers.sh} | 62 +++++++-------- Build/impi_intel_win/make_fds.bat | 9 +-- Build/impi_intel_win_db/make_fds.bat | 9 +-- Build/impi_intel_win_dv/make_fds.bat | 9 +-- Build/impi_intel_win_openmp/make_fds.bat | 9 +-- Build/impi_intel_win_openmp_db/make_fds.bat | 9 +-- Build/impi_intel_win_openmp_dv/make_fds.bat | 9 +-- Build/makefile | 79 ++++++++----------- 17 files changed, 170 insertions(+), 193 deletions(-) create mode 100644 Build/Scripts/set_compilers.bat rename Build/Scripts/{set_thirdparty_compilers.sh => set_compilers.sh} (53%) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fe150485a8..81ec0093dd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,18 +42,15 @@ jobs: - name: build fds debug run: | source /opt/intel/oneapi/setvars.sh - export INTEL_IFORT=ifx cd ./Build/impi_intel_linux_db - sh ./make_fds.sh + ./make_fds.sh ./fds_impi_intel_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh - export INTEL_IFORT=ifx cd ./Build/impi_intel_linux - sh ./make_fds.sh + ./make_fds.sh ./fds_impi_intel_linux - # Setup python - uses: actions/setup-python@v5 with: @@ -91,11 +88,11 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux_db - sh ./make_fds.sh + ./make_fds.sh ./fds_ompi_gnu_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux - sh ./make_fds.sh + ./make_fds.sh ./fds_ompi_gnu_linux diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index af55c7ffba..404a535927 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -73,13 +73,11 @@ jobs: - name: build fds debug run: | - set INTEL_IFORT=ifx cd Build\impi_intel_win_db call make_fds.bat fds_impi_intel_win_db.exe - name: build fds release run: | - set INTEL_IFORT=ifx cd Build\impi_intel_win call make_fds.bat fds_impi_intel_win.exe diff --git a/Build/Scripts/HYPRE/build_hypre.bat b/Build/Scripts/HYPRE/build_hypre.bat index a3aa14a5e5..f5cc32954b 100644 --- a/Build/Scripts/HYPRE/build_hypre.bat +++ b/Build/Scripts/HYPRE/build_hypre.bat @@ -76,18 +76,6 @@ echo ---------------------------------------------------------- echo ---------------------------------------------------------- echo. -set buildstatus=build -echo. -echo ---------------------------------------------------------- -echo ---------------------------------------------------------- -echo setting up Intel compilers -echo ---------------------------------------------------------- -echo ---------------------------------------------------------- -echo. -call %FIREMODELS%\fds\Build\Scripts\setup_intel_compilers.bat - -cd %CURDIR% - echo. echo ---------------------------------------------------------- echo ---------------------------------------------------------- @@ -130,27 +118,12 @@ echo ---------------------------------------------------------- echo ---------------------------------------------------------- echo. -::Check if make.bat or make.exe exists, and set CMAKE_MAKE_PROGRAM accordingly -set CMAKE_MAKE_PROGRAM= -for /f "delims=" %%i in ('where make.bat 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i -if not defined CMAKE_MAKE_PROGRAM ( - for /f "delims=" %%i in ('where make.exe 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i -) -if not defined CMAKE_MAKE_PROGRAM ( - echo Error: Neither make.bat nor make.exe found in PATH. - exit /b 1 -) - -echo. -echo make proram is %CMAKE_MAKE_PROGRAM% -echo. - set BUILDDIR=%LIB_REPO%\src\cmbuild cd %BUILDDIR% cmake ..\ ^ -G "MinGW Makefiles" ^ -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" ^ --DCMAKE_C_COMPILER=%CC% ^ +-DCMAKE_C_COMPILER=%COMP_CC% ^ -DCMAKE_C_FLAGS="/DWIN32 -O3 /fp:precise" ^ -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ^ -DCMAKE_MAKE_PROGRAM="%CMAKE_MAKE_PROGRAM%" ^ diff --git a/Build/Scripts/HYPRE/confmake.sh b/Build/Scripts/HYPRE/confmake.sh index ec56159a5e..74d700cfa9 100755 --- a/Build/Scripts/HYPRE/confmake.sh +++ b/Build/Scripts/HYPRE/confmake.sh @@ -10,7 +10,7 @@ fi cmake_args=( -DCMAKE_INSTALL_PREFIX="$HYPRE_INSTALL_PREFIX" - -DCMAKE_C_COMPILER="$CC" + -DCMAKE_C_COMPILER="$COMP_CC" -DCMAKE_C_FLAGS="$C_FLAGS" -DCMAKE_INSTALL_LIBDIR="lib" ) @@ -27,7 +27,4 @@ fi # Run cmake with the arguments cmake ../ "${cmake_args[@]}" -# ./configure CC=$CC FC=mpiifort CFLAGS="-O3 -fno-unsafe-math-optimizations -fp-model=precise" FFLAGS="-O3 -fno-unsafe-math-optimizations -fp-model=precise" \ -# --prefix=$FIREMODELS/libs/hypre/$HYPRE_VERSION - make install diff --git a/Build/Scripts/SUNDIALS/build_sundials.bat b/Build/Scripts/SUNDIALS/build_sundials.bat index 84b71c59ef..e0822b1cde 100644 --- a/Build/Scripts/SUNDIALS/build_sundials.bat +++ b/Build/Scripts/SUNDIALS/build_sundials.bat @@ -74,15 +74,6 @@ echo ---------------------------------------------------------- echo ---------------------------------------------------------- echo. -echo. -echo ---------------------------------------------------------- -echo ---------------------------------------------------------- -echo setting up Intel compilers -echo ---------------------------------------------------------- -echo ---------------------------------------------------------- -echo. -call %FIREMODELS%\fds\Build\Scripts\setup_intel_compilers.bat - git checkout %LIB_TAG% echo. @@ -110,28 +101,13 @@ echo ---------------------------------------------------------- echo ---------------------------------------------------------- echo. -::Check if make.bat or make.exe exists, and set CMAKE_MAKE_PROGRAM accordingly -set CMAKE_MAKE_PROGRAM= -for /f "delims=" %%i in ('where make.bat 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i -if not defined CMAKE_MAKE_PROGRAM ( - for /f "delims=" %%i in ('where make.exe 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i -) -if not defined CMAKE_MAKE_PROGRAM ( - echo Error: Neither make.bat nor make.exe found in PATH. - exit /b 1 -) - -echo. -echo make proram is %CMAKE_MAKE_PROGRAM% -echo. - cmake ..\ ^ -G "MinGW Makefiles" ^ -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" ^ -DEXAMPLES_INSTALL_PATH="%INSTALLDIR%\examples" ^ -DBUILD_FORTRAN_MODULE_INTERFACE=ON ^ --DCMAKE_C_COMPILER=%CC% ^ --DCMAKE_Fortran_COMPILER=%FC% ^ +-DCMAKE_C_COMPILER=%COMP_CC% ^ +-DCMAKE_Fortran_COMPILER=%COMP_FC% ^ -DEXAMPLES_ENABLE_C=OFF ^ -DEXAMPLES_ENABLE_CXX=OFF ^ -DEXAMPLES_ENABLE_F2003=OFF ^ diff --git a/Build/Scripts/SUNDIALS/confmake.sh b/Build/Scripts/SUNDIALS/confmake.sh index 3706c927f3..b6f0caf98c 100755 --- a/Build/Scripts/SUNDIALS/confmake.sh +++ b/Build/Scripts/SUNDIALS/confmake.sh @@ -3,9 +3,9 @@ export SUNDIALS_INSTALL_PREFIX=$FIREMODELS/libs/sundials/$SUNDIALS_VERSION cmake_args=( -DCMAKE_INSTALL_PREFIX="$SUNDIALS_INSTALL_PREFIX" -DEXAMPLES_INSTALL_PATH="$SUNDIALS_INSTALL_PREFIX/examples" - -DCMAKE_C_COMPILER="$CC" - -DCMAKE_CXX_COMPILER="$CXX" - -DCMAKE_Fortran_COMPILER="$FC" + -DCMAKE_C_COMPILER="$COMP_CC" + -DCMAKE_CXX_COMPILER="$COMP_CXX" + -DCMAKE_Fortran_COMPILER="$COMP_FC" -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DEXAMPLES_ENABLE_CXX=OFF -DEXAMPLES_ENABLE_CUDA=OFF diff --git a/Build/Scripts/build_thirdparty_libs.bat b/Build/Scripts/build_thirdparty_libs.bat index 880ddcb583..ed3fd61704 100644 --- a/Build/Scripts/build_thirdparty_libs.bat +++ b/Build/Scripts/build_thirdparty_libs.bat @@ -1,5 +1,8 @@ @echo off +:: Select the compilers +call ..\Scripts\set_compilers.bat + set clean_hypre= set clean_sundials= set clean_fds= @@ -89,18 +92,6 @@ cd %SCRIPTDIR% SET SCRIPTDIR=%CD% -:: Decide C and FORTRAN COMPILER for third-party builds -set CC=icx -if "x%INTEL_IFORT%" == "x" ( - set FC=ifx -) else ( - set FC=%INTEL_IFORT% -) -echo. -echo Third-party libs C Compiler=%CC% -echo Third-party libs Fortran Compiler=%FC% -echo. - ::Call HYPRE and SUNDIALS build script cd %SCRIPTDIR%\HYPRE diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index bf30aee8a3..5b990f5ff0 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,3 +1,9 @@ +#!/bin/bash + +# Decide compilers +source ../Scripts/set_compilers.sh + + # PARSE OPTIONS FOR CLEAN LIBRARY BUILDS #################################### # Set FIREMODELS environment variable if it is not already exists. @@ -64,8 +70,6 @@ fi # FINISHED WITH CLEANING OPTIONS ########################################### -# Decide compilers -source ../Scripts/set_thirdparty_compilers.sh # build hypre source ../Scripts/HYPRE/build_hypre.sh confmake.sh $clean_hypre diff --git a/Build/Scripts/set_compilers.bat b/Build/Scripts/set_compilers.bat new file mode 100644 index 0000000000..05c5269cc4 --- /dev/null +++ b/Build/Scripts/set_compilers.bat @@ -0,0 +1,64 @@ +@echo off + +:: Initialize compiler flags +set set_COMP_CC=0 +set set_COMP_FC=0 + +:: Check and set C compiler +if defined FIREMODELS_CC ( + set COMP_CC=%FIREMODELS_CC% + where /q %COMP_CC% && ( + set set_COMP_CC=1 + ) || ( + echo Warning: %FIREMODELS_CC% is not available. Searching for an alternative. + ) +) +if %set_COMP_CC%==0 ( + for %%C in (icx icc) do ( + where /q %%C && set COMP_CC=%%C && set set_COMP_CC=1 && goto :found_cc + ) + echo Error: Neither icx nor icc is available. Thirdparty libs will not be built. +) +:found_cc + +:: Check and set Fortran compiler +if defined FIREMODELS_FC ( + set COMP_FC=%FIREMODELS_FC% + where /q %COMP_FC% && ( + set set_COMP_FC=1 + ) || ( + echo Warning: %FIREMODELS_FC% is not available. Searching for an alternative. + ) +) +if %set_COMP_FC%==0 ( + for %%F in (ifx ifort) do ( + where /q %%F && set COMP_FC=%%F && set set_COMP_FC=1 && goto :found_fc + ) + echo Error: Neither ifx nor ifort is available. & exit /b 1 +) +:found_fc + +:: Display selected compilers +echo. +echo Third-party libs C Compiler: %COMP_CC% +echo Firemodels and Third-party libs Fortran Compiler: %COMP_FC% +echo. + + +::Check if make.bat or make.exe exists, and set CMAKE_MAKE_PROGRAM accordingly +::------------------------------------------------------------------------------ +set CMAKE_MAKE_PROGRAM= +for /f "delims=" %%i in ('where make.bat 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i +if not defined CMAKE_MAKE_PROGRAM ( + for /f "delims=" %%i in ('where make.exe 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i +) +if not defined CMAKE_MAKE_PROGRAM ( + echo Error: Neither make.bat nor make.exe found in PATH. + exit /b 1 +) + +echo. +echo make proram is %CMAKE_MAKE_PROGRAM% +echo. + + diff --git a/Build/Scripts/set_thirdparty_compilers.sh b/Build/Scripts/set_compilers.sh similarity index 53% rename from Build/Scripts/set_thirdparty_compilers.sh rename to Build/Scripts/set_compilers.sh index 9e20fe8c77..5137d1bb7e 100755 --- a/Build/Scripts/set_thirdparty_compilers.sh +++ b/Build/Scripts/set_compilers.sh @@ -1,10 +1,12 @@ +#!/bin/bash + echo "FDS build target = $FDS_BUILD_TARGET" # Initialize variables and check environment variables -set_compiler_var() { - local var_name=$1 # Variable name to set (e.g., CC, CXX, FC) - local env_var=$2 # Environment variable to check (e.g., FIREMODELS_LIBS_CC) - local set_flag_var=$3 # Flag variable name (e.g., set_CC, set_CXX, set_FC) +set_compiler_from_env_var() { + local var_name=$1 # Variable name to set (e.g., COMP_CC, COMP_CXX, COMP_FC) + local env_var=$2 # Environment variable to check (e.g., FIREMODELS_CC) + local set_flag_var=$3 # Flag variable name (e.g., set_COMP_CC, set_COMP_CXX, set_COMP_FC) if [ -n "${!env_var}" ]; then eval "$var_name=${!env_var}" @@ -18,8 +20,8 @@ set_compiler_var() { # Set compilers based on the build target -select_compiler() { - local var_name=$1 # Variable to set (CC, CXX, FC) +select_compiler_from_system() { + local var_name=$1 # Variable to set (COMP_CC, COMP_CXX, COMP_FC) shift local compilers=("$@") # List of compilers to check in order local set_flag_var="set_$var_name" @@ -41,39 +43,35 @@ select_compiler() { } -# Following variables indicate if compilers are set using environment variables FIREMODELS_LIBS_XXX. -set_CC=0 -set_CXX=0 -set_FC=0 +# Following variables indicate if compilers are set using environment variables FIREMODELS_XXX. +set_COMP_CC=0 +set_COMP_CXX=0 +set_COMP_FC=0 # Check environment variables for compilers -set_compiler_var CC FIREMODELS_LIBS_CC set_CC -set_compiler_var CXX FIREMODELS_LIBS_CXX set_CXX -set_compiler_var FC FIREMODELS_LIBS_FC set_FC +set_compiler_from_env_var COMP_CC FIREMODELS_CC set_COMP_CC +set_compiler_from_env_var COMP_CXX FIREMODELS_CXX set_COMP_CXX +set_compiler_from_env_var COMP_FC FIREMODELS_FC set_COMP_FC # Determine compiler list based on build target if [[ "$FDS_BUILD_TARGET" == *"osx"* ]]; then - select_compiler CC mpicc clang gcc - select_compiler CXX mpicxx clang++ g++ - select_compiler FC mpifort gfortran + select_compiler_from_system COMP_CC mpicc clang gcc + select_compiler_from_system COMP_CXX mpicxx clang++ g++ + select_compiler_from_system COMP_FC mpifort elif [[ "$FDS_BUILD_TARGET" == *"intel"* ]]; then - select_compiler CC mpiicx icx mpiicc icc - select_compiler CXX mpiicpx icpx mpiicpc icpc - select_compiler FC ifort mpiifx ifx + select_compiler_from_system COMP_CC mpiicx icx mpiicc icc + select_compiler_from_system COMP_CXX mpiicpx icpx mpiicpc icpc + select_compiler_from_system COMP_FC mpiifx mpiifort else # Default to GNU compilers - select_compiler CC mpicc gcc - select_compiler CXX mpicxx g++ - select_compiler FC mpifort gfortran + select_compiler_from_system COMP_CC mpicc gcc + select_compiler_from_system COMP_CXX mpicxx g++ + select_compiler_from_system COMP_FC mpifort fi +echo "Thirdparty libs C Compiler COMP_CC=$COMP_CC" +echo "Thirdparty libs C++ compiler COMP_CXX=$COMP_CXX" +echo "Firemodels and Thirdparty libs Fortran compiler COMP_FC=$COMP_FC" -echo "Third-party libs C Compiler=$CC" -echo "Third-party libs C++ compiler=$CXX" -echo "Third-party libs Fortran compiler=$FC" - -export CC=$CC -export CXX=$CXX -export FC=$FC - - - +export COMP_CC=$COMP_CC +export COMP_CXX=$COMP_CXX +export COMP_FC=$COMP_FC diff --git a/Build/impi_intel_win/make_fds.bat b/Build/impi_intel_win/make_fds.bat index 050bf75486..2d6dda6940 100644 --- a/Build/impi_intel_win/make_fds.bat +++ b/Build/impi_intel_win/make_fds.bat @@ -1,11 +1,6 @@ @echo off set arg1=%1 -:: build hypre and/or sundials libraries if necessary - -call ..\Scripts\build_thirdparty_libs %* -if %stopscript% == 1 exit /b - for %%I in (.) do set TARGET=%%~nxI :: setup compiler environment @@ -13,6 +8,10 @@ if x%arg1% == xbot goto endif1 call ..\Scripts\setup_intel_compilers.bat :endif1 +:: build hypre and/or sundials libraries if necessary +call ..\Scripts\build_thirdparty_libs %* +if %stopscript% == 1 exit /b + Title Building FDS (Intel MPI/%INTEL_IFORT%) for 64 bit Windows %TARGET% make SHELL="%ComSpec%" VPATH="../../Source" -f ..\makefile %TARGET% diff --git a/Build/impi_intel_win_db/make_fds.bat b/Build/impi_intel_win_db/make_fds.bat index ed0de466dc..41f667dc47 100644 --- a/Build/impi_intel_win_db/make_fds.bat +++ b/Build/impi_intel_win_db/make_fds.bat @@ -1,11 +1,6 @@ @echo off set arg1=%1 -:: build hypre and/or sundials libraries if necessary - -call ..\Scripts\build_thirdparty_libs %* -if %stopscript% == 1 exit /b - for %%I in (.) do set TARGET=%%~nxI :: setup compiler environment @@ -13,6 +8,10 @@ if x%arg1% == xbot goto endif1 call ..\Scripts\setup_intel_compilers.bat :endif1 +:: build hypre and/or sundials libraries if necessary +call ..\Scripts\build_thirdparty_libs %* +if %stopscript% == 1 exit /b + Title Building debug FDS (Intel MPI/%INTEL_IFORT%) for 64 bit Windows %TARGET% make SHELL="%ComSpec%" VPATH="../../Source" -f ..\makefile %TARGET% diff --git a/Build/impi_intel_win_dv/make_fds.bat b/Build/impi_intel_win_dv/make_fds.bat index 4110afc213..eac9bcc5fa 100644 --- a/Build/impi_intel_win_dv/make_fds.bat +++ b/Build/impi_intel_win_dv/make_fds.bat @@ -1,11 +1,6 @@ @echo off set arg1=%1 -:: build hypre and/or sundials libraries if necessary - -call ..\Scripts\build_thirdparty_libs %* -if %stopscript% == 1 exit /b - for %%I in (.) do set TARGET=%%~nxI :: setup compiler environment @@ -13,6 +8,10 @@ if x%arg1% == xbot goto endif1 call ..\Scripts\setup_intel_compilers.bat :endif1 +:: build hypre and/or sundials libraries if necessary +call ..\Scripts\build_thirdparty_libs %* +if %stopscript% == 1 exit /b + Title Building DV FDS (Intel MPI/%INTEL_IFORT%) for 64 bit Windows %TARGET% make SHELL="%ComSpec%" VPATH="../../Source" -f ..\makefile %TARGET% diff --git a/Build/impi_intel_win_openmp/make_fds.bat b/Build/impi_intel_win_openmp/make_fds.bat index 70275cab25..c7061a593b 100644 --- a/Build/impi_intel_win_openmp/make_fds.bat +++ b/Build/impi_intel_win_openmp/make_fds.bat @@ -1,11 +1,6 @@ @echo off set arg1=%1 -:: build hypre and/or sundials libraries if necessary - -call ..\Scripts\build_thirdparty_libs %* -if %stopscript% == 1 exit /b - for %%I in (.) do set TARGET=%%~nxI :: setup compiler environment @@ -13,6 +8,10 @@ if x%arg1% == xbot goto endif1 call ..\Scripts\setup_intel_compilers.bat :endif1 +:: build hypre and/or sundials libraries if necessary +call ..\Scripts\build_thirdparty_libs %* +if %stopscript% == 1 exit /b + Title Building OpenMP FDS (Intel MPI/%INTEL_IFORT% OpenMP) for 64 bit Windows %TARGET% make SHELL="%ComSpec%" VPATH="../../Source" -f ..\makefile %TARGET% diff --git a/Build/impi_intel_win_openmp_db/make_fds.bat b/Build/impi_intel_win_openmp_db/make_fds.bat index 4d8649e1e6..bcbd643edf 100644 --- a/Build/impi_intel_win_openmp_db/make_fds.bat +++ b/Build/impi_intel_win_openmp_db/make_fds.bat @@ -1,11 +1,6 @@ @echo off set arg1=%1 -:: build hypre and/or sundials libraries if necessary - -call ..\Scripts\build_thirdparty_libs %* -if %stopscript% == 1 exit /b - for %%I in (.) do set TARGET=%%~nxI :: setup compiler environment @@ -13,6 +8,10 @@ if x%arg1% == xbot goto endif1 call ..\Scripts\setup_intel_compilers.bat :endif1 +:: build hypre and/or sundials libraries if necessary +call ..\Scripts\build_thirdparty_libs %* +if %stopscript% == 1 exit /b + Title Building debug OpenMP FDS (Intel MPI/%INTEL_IFORT% OpenMP) for 64 bit Windows %TARGET% make SHELL="%ComSpec%" VPATH="../../Source" -f ..\makefile %TARGET% diff --git a/Build/impi_intel_win_openmp_dv/make_fds.bat b/Build/impi_intel_win_openmp_dv/make_fds.bat index ef84f8cea8..7ff48160f2 100644 --- a/Build/impi_intel_win_openmp_dv/make_fds.bat +++ b/Build/impi_intel_win_openmp_dv/make_fds.bat @@ -1,11 +1,6 @@ @echo off set arg1=%1 -:: build hypre and/or sundials libraries if necessary - -call ..\Scripts\build_thirdparty_libs %* -if %stopscript% == 1 exit /b - for %%I in (.) do set TARGET=%%~nxI :: setup compiler environment @@ -13,6 +8,10 @@ if x%arg1% == xbot goto endif1 call ..\Scripts\setup_intel_compilers.bat :endif1 +:: build hypre and/or sundials libraries if necessary +call ..\Scripts\build_thirdparty_libs %* +if %stopscript% == 1 exit /b + Title Building dv OpenMP FDS (Intel MPI/%INTEL_IFORT% OpenMP) for 64 bit Windows %TARGET% make SHELL="%ComSpec%" VPATH="../../Source" -f ..\makefile %TARGET% diff --git a/Build/makefile b/Build/makefile index 43ebb2e190..483d9fc11c 100644 --- a/Build/makefile +++ b/Build/makefile @@ -11,13 +11,6 @@ VPATH = ../Source -# set compiler type - -I_IFORT=ifort -ifdef INTEL_IFORT - I_IFORT=$(INTEL_IFORT) -endif - # 3rd part library versions HYPRE_VERSION=v2.32.0 SUNDIALS_VERSION=v6.7.0 @@ -182,7 +175,7 @@ main.obj: FFLAGS += $(FOPENMPFLAGS) impi_intel_win : MPILIB = "$(IMPI_RELEASE_ROOT)\impi.lib" impi_intel_win : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win : FFLAGS = -D_WIN32 /Qipo /O2 /I$(MPIINCLUDE) /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 -impi_intel_win : FCOMPL = $(I_IFORT) +impi_intel_win : FCOMPL = $(COMP_FC) impi_intel_win : obj = fds_impi_intel_win impi_intel_win : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) @@ -190,7 +183,7 @@ impi_intel_win : setup_win $(objwin_mpi) impi_intel_win_vt : MPILIB = "$(IMPI_RELEASE_ROOT)\impi.lib" impi_intel_win_vt : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win_vt : FFLAGS = -D_WIN32 /Qipo /O2 /I$(MPIINCLUDE) /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 /Zi /D "TBB_USE_THREADING_TOOLS" -impi_intel_win_vt : FCOMPL = $(I_IFORT) +impi_intel_win_vt : FCOMPL = $(COMP_FC) impi_intel_win_vt : obj = fds_impi_intel_win_vt impi_intel_win_vt : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) @@ -200,7 +193,7 @@ impi_intel_win_openmp : MPILIB = "$(IMPI_RELEASE_ROOT)\impi.lib" impi_intel_win_openmp : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win_openmp : FFLAGS = -D_WIN32 /Qipo /O2 /I$(MPIINCLUDE) /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 impi_intel_win_openmp : FOPENMPFLAGS = /Qopenmp -impi_intel_win_openmp : FCOMPL = $(I_IFORT) +impi_intel_win_openmp : FCOMPL = $(COMP_FC) impi_intel_win_openmp : obj = fds_impi_intel_win_openmp impi_intel_win_openmp : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) $(FOPENMPFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL_OPENMP) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) @@ -208,7 +201,7 @@ impi_intel_win_openmp : setup_win $(objwin_mpi) impi_intel_win_dv : MPILIB = "$(IMPI_RELEASE_ROOT)\impi.lib" impi_intel_win_dv : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win_dv : FFLAGS = -D_WIN32 /O1 /I$(MPIINCLUDE) /Z7 /traceback /debug:full /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 -impi_intel_win_dv : FCOMPL = $(I_IFORT) +impi_intel_win_dv : FCOMPL = $(COMP_FC) impi_intel_win_dv : obj = fds_impi_intel_win_dv impi_intel_win_dv : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) @@ -217,7 +210,7 @@ impi_intel_win_openmp_dv : MPILIB = "$(IMPI_RELEASE_ROOT)\impi.lib" impi_intel_win_openmp_dv : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win_openmp_dv : FFLAGS = -D_WIN32 /O1 /I$(MPIINCLUDE) /Z7 /traceback /debug:full /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 impi_intel_win_openmp_dv : FOPENMPFLAGS = /Qopenmp -impi_intel_win_openmp_dv : FCOMPL = $(I_IFORT) +impi_intel_win_openmp_dv : FCOMPL = $(COMP_FC) impi_intel_win_openmp_dv : obj = fds_impi_intel_win_openmp_dv impi_intel_win_openmp_dv : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) $(FOPENMPFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL_OPENMP) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) @@ -225,7 +218,7 @@ impi_intel_win_openmp_dv : setup_win $(objwin_mpi) impi_intel_win_db : MPILIB = "$(IMPI_DEBUG_ROOT)\impi.lib" impi_intel_win_db : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win_db : FFLAGS = -D_WIN32 /Od /nologo /debug:all /I$(MPIINCLUDE) /Z7 /extend-source:132 /warn:unused /warn:nointerfaces /Qtrapuv /fp:strict /fp:except /traceback /check:all /stand:f18 /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 -impi_intel_win_db : FCOMPL = $(I_IFORT) +impi_intel_win_db : FCOMPL = $(COMP_FC) impi_intel_win_db : obj = fds_impi_intel_win_db impi_intel_win_db : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) @@ -234,53 +227,53 @@ impi_intel_win_openmp_db : MPILIB = "$(IMPI_DEBUG_ROOT)\impi.lib" impi_intel_win_openmp_db : MPIINCLUDE = "$(I_MPI_ROOT)\include\mpi" impi_intel_win_openmp_db : FFLAGS = -D_WIN32 /Od /nologo /debug:all /I$(MPIINCLUDE) /Z7 /extend-source:132 /warn:unused /warn:nointerfaces /Qtrapuv /fp:strict /fp:except /traceback /check:all /stand:f18 /wrap-margin- $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE_WIN) $(FFLAGS_SUNDIALS_WIN) /Qdiag-disable:10448 impi_intel_win_openmp_db : FOPENMPFLAGS = /Qopenmp_INTEL -impi_intel_win_openmp_db : FCOMPL = $(I_IFORT) +impi_intel_win_openmp_db : FCOMPL = $(COMP_FC) impi_intel_win_openmp_db : obj = fds_impi_intel_win_openmp_db impi_intel_win_openmp_db : setup_win $(objwin_mpi) $(FCOMPL) -o $(obj) $(FFLAGS) $(FOPENMPFLAGS) /F1000000000 $(objwin_mpi) $(MPILIB) $(LFLAGSMKL_INTEL_OPENMP) $(LFLAGS_HYPRE_WIN) $(LFLAGS_SUNDIALS_WIN) # Linux Intel Fortran Compiler and Intel MPI -impi_intel_linux : FFLAGS = -m64 -fc=$(I_IFORT) -O2 -ipo -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 +impi_intel_linux : FFLAGS = -m64 -O2 -ipo -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 impi_intel_linux : LFLAGSMKL = $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -impi_intel_linux : FCOMPL = mpiifx +impi_intel_linux : FCOMPL = $(COMP_FC) impi_intel_linux : obj = fds_impi_intel_linux impi_intel_linux : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) -impi_intel_linux_openmp : FFLAGS = -m64 -fc=$(I_IFORT) -O2 -ipo -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448_INTEL +impi_intel_linux_openmp : FFLAGS = -m64 -O2 -ipo -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448_INTEL impi_intel_linux_openmp : LFLAGSMKL = $(LFLAGSMKL_INTEL_OPENMP) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -impi_intel_linux_openmp : FCOMPL = mpiifx +impi_intel_linux_openmp : FCOMPL = $(COMP_FC) impi_intel_linux_openmp : FOPENMPFLAGS = -qopenmp impi_intel_linux_openmp : obj = fds_impi_intel_linux_openmp impi_intel_linux_openmp : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) -impi_intel_linux_db : FFLAGS = -m64 -fc=$(I_IFORT) -check all -warn all -diag-error=remark,warn,error -O0 -g -traceback -fpe0 -nofltconsistency -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448_INTEL +impi_intel_linux_db : FFLAGS = -m64 -check all -warn all -diag-error=remark,warn,error -O0 -g -traceback -fpe0 -nofltconsistency -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448_INTEL impi_intel_linux_db : LFLAGSMKL = $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -impi_intel_linux_db : FCOMPL = mpiifx +impi_intel_linux_db : FCOMPL = $(COMP_FC) impi_intel_linux_db : obj = fds_impi_intel_linux_db impi_intel_linux_db : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) -impi_intel_linux_openmp_db : FFLAGS = -m64 -fc=$(I_IFORT) -check all -warn all -diag-error=remark,warn,error -O0 -g -traceback -fpe0 -nofltconsistency -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 +impi_intel_linux_openmp_db : FFLAGS = -m64 -check all -warn all -diag-error=remark,warn,error -O0 -g -traceback -fpe0 -nofltconsistency -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 impi_intel_linux_openmp_db : LFLAGSMKL = $(LFLAGSMKL_INTEL_OPENMP) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -impi_intel_linux_openmp_db : FCOMPL = mpiifx +impi_intel_linux_openmp_db : FCOMPL = $(COMP_FC) impi_intel_linux_openmp_db : FOPENMPFLAGS = -qopenmp impi_intel_linux_openmp_db : obj = fds_impi_intel_linux_openmp_db impi_intel_linux_openmp_db : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) -impi_intel_linux_dv : FFLAGS = -m64 -fc=$(I_IFORT) -warn unused -O1 -g -traceback -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 +impi_intel_linux_dv : FFLAGS = -m64 -warn unused -O1 -g -traceback -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 impi_intel_linux_dv : LFLAGSMKL = $(LFLAGSMKL_INTEL) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -impi_intel_linux_dv : FCOMPL = mpiifx +impi_intel_linux_dv : FCOMPL = $(COMP_FC) impi_intel_linux_dv : obj = fds_impi_intel_linux_dv impi_intel_linux_dv : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) -impi_intel_linux_openmp_dv : FFLAGS = -m64 -fc=$(I_IFORT) -warn unused -O1 -g -traceback -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 +impi_intel_linux_openmp_dv : FFLAGS = -m64 -warn unused -O1 -g -traceback -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 impi_intel_linux_openmp_dv : LFLAGSMKL = $(LFLAGSMKL_INTEL_OPENMP) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -impi_intel_linux_openmp_dv : FCOMPL = mpiifx +impi_intel_linux_openmp_dv : FCOMPL = $(COMP_FC) impi_intel_linux_openmp_dv : FOPENMPFLAGS = -qopenmp impi_intel_linux_openmp_dv : obj = fds_impi_intel_linux_openmp_dv impi_intel_linux_openmp_dv : setup $(obj_mpi) @@ -291,7 +284,7 @@ impi_intel_linux_openmp_dv : setup $(obj_mpi) ompi_intel_osx : FFLAGS = -m64 -O2 -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_CUSTOM) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_intel_osx : LFLAGSMKL = $(LFLAGSMKL_CUSTOM) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_intel_osx : LFLAGS = -static-intel -ompi_intel_osx : FCOMPL = mpifort +ompi_intel_osx : FCOMPL = $(COMP_FC) ompi_intel_osx : obj = fds_ompi_intel_osx ompi_intel_osx : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(LFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -300,7 +293,7 @@ ompi_intel_osx_openmp : FFLAGS = -m64 -O2 -stand:f18 -no-wrap-margin $(GITINFO) ompi_intel_osx_openmp : LFLAGSMKL = $(LFLAGSMKL_CUSTOM_OPENMP) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_intel_osx_openmp : LFLAGS = -static-intel ompi_intel_osx_openmp : FOPENMPFLAGS = -qopenmp -qopenmp-link static -ompi_intel_osx_openmp : FCOMPL = mpifort +ompi_intel_osx_openmp : FCOMPL = $(COMP_FC) ompi_intel_osx_openmp : obj = fds_ompi_intel_osx_openmp ompi_intel_osx_openmp : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(LFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -308,7 +301,7 @@ ompi_intel_osx_openmp : setup $(obj_mpi) ompi_intel_osx_db : FFLAGS = -m64 -check all -fp-stack-check -warn unused -O0 -auto -WB -g -traceback -fpe0 -nofltconsistency -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_CUSTOM) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_intel_osx_db : LFLAGSMKL = $(LFLAGSMKL_CUSTOM) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_intel_osx_db : LFLAGS = -static-intel -ompi_intel_osx_db : FCOMPL = mpifort +ompi_intel_osx_db : FCOMPL = $(COMP_FC) ompi_intel_osx_db : obj = fds_ompi_intel_osx_db ompi_intel_osx_db : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(LFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -317,7 +310,7 @@ ompi_intel_osx_openmp_db : FFLAGS = -m64 -check all -fp-stack-check -warn unused ompi_intel_osx_openmp_db : LFLAGSMKL = $(LFLAGSMKL_CUSTOM_OPENMP) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_intel_osx_openmp_db : LFLAGS = -static-intel ompi_intel_osx_openmp_db : FOPENMPFLAGS = -qopenmp -qopenmp-link static -ompi_intel_osx_openmp_db : FCOMPL = mpifort +ompi_intel_osx_openmp_db : FCOMPL = $(COMP_FC) ompi_intel_osx_openmp_db : obj = fds_ompi_intel_osx_openmp_db ompi_intel_osx_openmp_db : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(LFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -325,7 +318,7 @@ ompi_intel_osx_openmp_db : setup $(obj_mpi) ompi_intel_osx_dv : FFLAGS = -m64 -warn unused -O1 -g -traceback -stand:f18 -no-wrap-margin $(GITINFO) $(FFLAGSMKL_CUSTOM) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_intel_osx_dv : LFLAGSMKL = $(LFLAGSMKL_CUSTOM) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_intel_osx_dv : LFLAGS = -static-intel -ompi_intel_osx_dv : FCOMPL = mpifort +ompi_intel_osx_dv : FCOMPL = $(COMP_FC) ompi_intel_osx_dv : obj = fds_ompi_intel_osx_dv ompi_intel_osx_dv : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(LFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -334,7 +327,7 @@ ompi_intel_osx_openmp_dv : FFLAGS = -m64 -warn unused -O1 -g -traceback -stand:f ompi_intel_osx_openmp_dv : LFLAGSMKL = $(LFLAGSMKL_CUSTOM_OPENMP) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) ompi_intel_osx_openmp_dv : LFLAGS = -static-intel ompi_intel_osx_openmp_dv : FOPENMPFLAGS = -qopenmp -qopenmp-link static -ompi_intel_osx_openmp_dv : FCOMPL = mpifort +ompi_intel_osx_openmp_dv : FCOMPL = $(COMP_FC) ompi_intel_osx_openmp_dv : obj = fds_ompi_intel_osx_openmp_dv ompi_intel_osx_openmp_dv : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(LFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -343,7 +336,7 @@ ompi_intel_osx_openmp_dv : setup $(obj_mpi) ompi_intel_linux : FFLAGS = -m64 -O2 -ipo -no-wrap-margin $(GITINFO) $(FFLAGSMKL_INTEL_OPENMPI) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) -DUSE_IFPORT -diag-disable=10448 ompi_intel_linux : LFLAGSMKL = $(LFLAGSMKL_INTEL_OPENMPI) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_intel_linux : FCOMPL = mpifort +ompi_intel_linux : FCOMPL = $(COMP_FC) ompi_intel_linux : obj = fds_ompi_intel_linux ompi_intel_linux : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) @@ -352,7 +345,7 @@ ompi_intel_linux : setup $(obj_mpi) ompi_gnu_linux : FFLAGS = -m64 -O2 -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_linux : LFLAGSMKL = $(LFLAGSMKL_GNU_OPENMPI) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_gnu_linux : FCOMPL = mpifort +ompi_gnu_linux : FCOMPL = $(COMP_FC) ompi_gnu_linux : FOPENMPFLAGS = -fopenmp ompi_gnu_linux : obj = fds_ompi_gnu_linux ompi_gnu_linux : setup $(obj_mpi) @@ -360,7 +353,7 @@ ompi_gnu_linux : setup $(obj_mpi) ompi_gnu_linux_db : FFLAGS = -m64 -O0 -std=f2018 -ggdb -Wall -Werror -Wunused-parameter -Wcharacter-truncation -Wno-target-lifetime -fcheck=all -fbacktrace -ffpe-trap=invalid,zero,overflow -frecursive -ffpe-summary=none -fall-intrinsics -fbounds-check $(GITINFOGNU) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_linux_db : LFLAGSMKL = $(LFLAGSMKL_GNU_OPENMPI) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_gnu_linux_db : FCOMPL = mpifort +ompi_gnu_linux_db : FCOMPL = $(COMP_FC) ompi_gnu_linux_db : FOPENMPFLAGS = -fopenmp ompi_gnu_linux_db : obj = fds_ompi_gnu_linux_db ompi_gnu_linux_db : setup $(obj_mpi) @@ -368,7 +361,7 @@ ompi_gnu_linux_db : setup $(obj_mpi) ompi_gnu_linux_dv : FFLAGS = -m64 -O1 -fbacktrace -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_linux_dv : LFLAGSMKL = $(LFLAGSMKL_GNU_OPENMPI) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_gnu_linux_dv : FCOMPL = mpifort +ompi_gnu_linux_dv : FCOMPL = $(COMP_FC) ompi_gnu_linux_dv : FOPENMPFLAGS = -fopenmp ompi_gnu_linux_dv : obj = fds_ompi_gnu_linux_dv ompi_gnu_linux_dv : setup $(obj_mpi) @@ -376,7 +369,7 @@ ompi_gnu_linux_dv : setup $(obj_mpi) ompi_gnu_osx : FFLAGS = -m64 -O2 -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_CUSTOM) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_osx : LFLAGSMKL = $(LFLAGSMKL_GNU_CUSTOM) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_gnu_osx : FCOMPL = mpifort +ompi_gnu_osx : FCOMPL = $(COMP_FC) ompi_gnu_osx : FOPENMPFLAGS = -fopenmp ompi_gnu_osx : obj = fds_ompi_gnu_osx ompi_gnu_osx : setup $(obj_mpi) @@ -384,7 +377,7 @@ ompi_gnu_osx : setup $(obj_mpi) ompi_gnu_osx_db : FFLAGS = -m64 -O0 -std=f2018 -ggdb -Wall -Wcharacter-truncation -Wno-target-lifetime -fcheck=all -fbacktrace -ffpe-trap=invalid,zero,overflow -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_CUSTOM) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_osx_db : LFLAGSMKL = $(LFLAGSMKL_GNU_CUSTOM) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_gnu_osx_db : FCOMPL = mpifort +ompi_gnu_osx_db : FCOMPL = $(COMP_FC) ompi_gnu_osx_db : FOPENMPFLAGS = -fopenmp ompi_gnu_osx_db : obj = fds_ompi_gnu_osx_db ompi_gnu_osx_db : setup $(obj_mpi) @@ -392,20 +385,12 @@ ompi_gnu_osx_db : setup $(obj_mpi) ompi_gnu_osx_dv : FFLAGS = -m64 -O1 -fbacktrace -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(FFLAGSMKL_GNU_CUSTOM) $(GFORTRAN_OPTIONS) $(FFLAGS_HYPRE) $(FFLAGS_SUNDIALS) ompi_gnu_osx_dv : LFLAGSMKL = $(LFLAGSMKL_GNU_CUSTOM) $(CLT_VERSION) $(LFLAGS_HYPRE) $(LFLAGS_SUNDIALS) -ompi_gnu_osx_dv : FCOMPL = mpifort +ompi_gnu_osx_dv : FCOMPL = $(COMP_FC) ompi_gnu_osx_dv : FOPENMPFLAGS = -fopenmp ompi_gnu_osx_dv : obj = fds_ompi_gnu_osx_dv ompi_gnu_osx_dv : setup $(obj_mpi) $(FCOMPL) $(FFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) -mpich_gnu_polaris : FFLAGS = -m64 -O2 -fbacktrace -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(GNU_COMPINFO) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_SUNDIALS) -#mpich_gnu_polaris : FFLAGS = -m64 -O0 -std=f2018 -ggdb -Wall -Wcharacter-truncation -Wno-target-lifetime -fcheck=all -fbacktrace -ffpe-trap=invalid,zero,overflow -frecursive -ffpe-summary=none -fall-intrinsics $(GITINFOGNU) $(GNU_COMPINFO) $(FFLAGSMKL_GNU_OPENMPI) $(GFORTRAN_OPTIONS) $(FFLAGS_SUNDIALS) -mpich_gnu_polaris : LFLAGSMKL = $(LFLAGSMKL_GNU_OPENMPI) $(LFLAGS_SUNDIALS) -mpich_gnu_polaris : FCOMPL = ftn -mpich_gnu_polaris : FOPENMPFLAGS = -fopenmp -mpich_gnu_polaris : obj = fds_mpich_gnu_polaris -mpich_gnu_polaris : setup $(obj_mpi) - $(FCOMPL) $(FFLAGS) $(FOPENMPFLAGS) -o $(obj) $(obj_mpi) $(LFLAGSMKL) # *** Object Dependencies ***