From 4253f9c4a613c59a39e85157e049e660cef7c0f0 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 12:06:55 -0500 Subject: [PATCH 01/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/Scripts/HYPRE/confmake.sh | 5 +- Build/Scripts/SUNDIALS/confmake.sh | 6 +- Build/Scripts/build_thirdparty_libs.bat | 15 +--- Build/Scripts/build_thirdparty_libs.sh | 5 +- Build/Scripts/set_compilers.bat | 39 ++++++++++ ...irdparty_compilers.sh => set_compilers.sh} | 60 ++++++++-------- 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 | 71 +++++++++---------- 13 files changed, 133 insertions(+), 122 deletions(-) create mode 100644 Build/Scripts/set_compilers.bat rename Build/Scripts/{set_thirdparty_compilers.sh => set_compilers.sh} (53%) diff --git a/Build/Scripts/HYPRE/confmake.sh b/Build/Scripts/HYPRE/confmake.sh index ec56159a5e4..74d700cfa90 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/confmake.sh b/Build/Scripts/SUNDIALS/confmake.sh index 3706c927f37..b6f0caf98c0 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 880ddcb5830..d27a9c6d65c 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\setup_intel_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 bf30aee8a37..bff16e750d9 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,5 +1,8 @@ # PARSE OPTIONS FOR CLEAN LIBRARY BUILDS #################################### +# Decide compilers +source ../Scripts/set_compilers.sh + # Set FIREMODELS environment variable if it is not already exists. if [ -z "${FIREMODELS}" ]; then export FIREMODELS="$(readlink -f "$(pwd)/../../../")" @@ -64,8 +67,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 00000000000..6e4b996da11 --- /dev/null +++ b/Build/Scripts/set_compilers.bat @@ -0,0 +1,39 @@ +@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% || echo Warning: %FIREMODELS_CC% is not available. Searching for an alternative. + set set_COMP_CC=1 +) +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. & exit /b 1 +) +:found_cc + +:: Check and set Fortran compiler +if defined FIREMODELS_FC ( + set COMP_FC=%FIREMODELS_FC% + where /q %COMP_FC% || echo Warning: %FIREMODELS_FC% is not available. Searching for an alternative. + set set_COMP_FC=1 +) +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. 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 9e20fe8c772..82862bd3c7a 100755 --- a/Build/Scripts/set_thirdparty_compilers.sh +++ b/Build/Scripts/set_compilers.sh @@ -1,10 +1,10 @@ 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 +18,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 +41,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 050bf75486d..2d6dda69408 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 ed0de466dc6..41f667dc474 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 4110afc2138..eac9bcc5fa7 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 70275cab254..c7061a593bd 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 4d8649e1e68..bcbd643edfb 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 ef84f8cea85..7ff48160f25 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 69cfdbccfb4..b4abb42ca5f 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 @@ -180,7 +173,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) @@ -188,7 +181,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) @@ -198,7 +191,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) @@ -206,7 +199,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) @@ -215,7 +208,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) @@ -223,7 +216,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) @@ -232,53 +225,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) @@ -289,7 +282,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) @@ -298,7 +291,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) @@ -306,7 +299,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) @@ -315,7 +308,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) @@ -323,7 +316,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) @@ -332,7 +325,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) @@ -341,7 +334,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) @@ -350,7 +343,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) @@ -358,7 +351,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) @@ -366,7 +359,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) @@ -374,7 +367,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) @@ -382,7 +375,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) @@ -390,7 +383,7 @@ 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) From f0a9c4804b2b2b1944fa8a978b445231abeb6b27 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 12:19:44 -0500 Subject: [PATCH 02/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/Scripts/HYPRE/build_hypre.bat | 29 +---------------------- Build/Scripts/SUNDIALS/build_sundials.bat | 28 ++-------------------- Build/Scripts/set_compilers.bat | 19 +++++++++++++++ 3 files changed, 22 insertions(+), 54 deletions(-) diff --git a/Build/Scripts/HYPRE/build_hypre.bat b/Build/Scripts/HYPRE/build_hypre.bat index a3aa14a5e52..f5cc32954bd 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/SUNDIALS/build_sundials.bat b/Build/Scripts/SUNDIALS/build_sundials.bat index 84b71c59efa..e0822b1cded 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/set_compilers.bat b/Build/Scripts/set_compilers.bat index 6e4b996da11..45d3f537416 100644 --- a/Build/Scripts/set_compilers.bat +++ b/Build/Scripts/set_compilers.bat @@ -37,3 +37,22 @@ 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. + + From 066ce68b81ca01a1b3e1d59dfcd92917b0883995 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 12:25:09 -0500 Subject: [PATCH 03/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/Scripts/build_thirdparty_libs.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Scripts/build_thirdparty_libs.bat b/Build/Scripts/build_thirdparty_libs.bat index d27a9c6d65c..ff0eac5bc57 100644 --- a/Build/Scripts/build_thirdparty_libs.bat +++ b/Build/Scripts/build_thirdparty_libs.bat @@ -1,7 +1,7 @@ @echo off :: Select the compilers -call ..\Scripts\setup_intel_compilers.bat +call ..\Scripts\setup_compilers.bat set clean_hypre= set clean_sundials= From 26b2fd7c560aceb115f2a7d78dddc99a4c6eb2b1 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 12:27:38 -0500 Subject: [PATCH 04/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/Scripts/build_thirdparty_libs.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Scripts/build_thirdparty_libs.bat b/Build/Scripts/build_thirdparty_libs.bat index ff0eac5bc57..ed3fd617043 100644 --- a/Build/Scripts/build_thirdparty_libs.bat +++ b/Build/Scripts/build_thirdparty_libs.bat @@ -1,7 +1,7 @@ @echo off :: Select the compilers -call ..\Scripts\setup_compilers.bat +call ..\Scripts\set_compilers.bat set clean_hypre= set clean_sundials= From 0b1a3a8fd82eadfb36664b770d80b5f9563be7eb Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 14:00:27 -0500 Subject: [PATCH 05/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/Scripts/set_compilers.bat | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Build/Scripts/set_compilers.bat b/Build/Scripts/set_compilers.bat index 45d3f537416..b2f50ae9f21 100644 --- a/Build/Scripts/set_compilers.bat +++ b/Build/Scripts/set_compilers.bat @@ -7,8 +7,11 @@ set set_COMP_FC=0 :: Check and set C compiler if defined FIREMODELS_CC ( set COMP_CC=%FIREMODELS_CC% - where /q %COMP_CC% || echo Warning: %FIREMODELS_CC% is not available. Searching for an alternative. - set set_COMP_CC=1 + 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 ( @@ -21,8 +24,11 @@ if %set_COMP_CC%==0 ( :: Check and set Fortran compiler if defined FIREMODELS_FC ( set COMP_FC=%FIREMODELS_FC% - where /q %COMP_FC% || echo Warning: %FIREMODELS_FC% is not available. Searching for an alternative. - set set_COMP_FC=1 + 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 ( From 314d90adcfa95aa7c566ca09e7ae8071249d6d0b Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 15:57:45 -0500 Subject: [PATCH 06/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Build/makefile b/Build/makefile index b4abb42ca5f..d5e24bbf6c8 100644 --- a/Build/makefile +++ b/Build/makefile @@ -389,14 +389,6 @@ 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 *** From cca3a87395dff460dc70eaefd797ca37a87e1ae0 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 19:37:16 -0500 Subject: [PATCH 07/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- Build/Scripts/set_compilers.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Scripts/set_compilers.bat b/Build/Scripts/set_compilers.bat index b2f50ae9f21..05c5269cc4c 100644 --- a/Build/Scripts/set_compilers.bat +++ b/Build/Scripts/set_compilers.bat @@ -17,7 +17,7 @@ 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. & exit /b 1 + echo Error: Neither icx nor icc is available. Thirdparty libs will not be built. ) :found_cc From cc218aed27b2f59984975759b460345276fecdbf Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 19:53:03 -0500 Subject: [PATCH 08/21] FDS Build: Make the FDS and Thirdparty fortran compiler same for FDS and Thirdparty --- .github/workflows/linux.yml | 2 -- .github/workflows/windows.yml | 2 -- Build/Scripts/build_thirdparty_libs.sh | 6 ++++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fe150485a81..b300a8dcedd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,14 +42,12 @@ 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 ./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 ./fds_impi_intel_linux diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index af55c7ffbad..404a535927c 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/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index bff16e750d9..d7677c59350 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,8 +1,10 @@ -# PARSE OPTIONS FOR CLEAN LIBRARY BUILDS #################################### - # Decide compilers source ../Scripts/set_compilers.sh + + +# PARSE OPTIONS FOR CLEAN LIBRARY BUILDS #################################### + # Set FIREMODELS environment variable if it is not already exists. if [ -z "${FIREMODELS}" ]; then export FIREMODELS="$(readlink -f "$(pwd)/../../../")" From f473756b75e94abf85c94973ed581757e7488603 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 20:09:19 -0500 Subject: [PATCH 09/21] Update make_fds.sh to fix actions --- Build/impi_intel_linux_db/make_fds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/impi_intel_linux_db/make_fds.sh b/Build/impi_intel_linux_db/make_fds.sh index 8013c473584..fe06efc8128 100755 --- a/Build/impi_intel_linux_db/make_fds.sh +++ b/Build/impi_intel_linux_db/make_fds.sh @@ -5,7 +5,7 @@ target=${dir##*/} # Compile third-party libraries export FDS_BUILD_TARGET=$target -source ../Scripts/build_thirdparty_libs.sh "$@" +sh ../Scripts/build_thirdparty_libs.sh "$@" # Build fds echo Building $target From 833baf66585ccff00aa95d35c85fd570e1b3bc83 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 20:22:41 -0500 Subject: [PATCH 10/21] Update build_thirdparty_libs.sh --- Build/Scripts/build_thirdparty_libs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index d7677c59350..97b910ad0d9 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,4 +1,5 @@ # Decide compilers +echo "Current directory: $(pwd)" source ../Scripts/set_compilers.sh From dc2dac9ccda19359b30925bf4cde3a854946c228 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 20:37:49 -0500 Subject: [PATCH 11/21] FDS Build: Add bash shell to github linux actions --- .github/workflows/linux.yml | 5 ++++- Build/Scripts/build_thirdparty_libs.sh | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b300a8dcedd..c1174b4e027 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -45,13 +45,14 @@ jobs: cd ./Build/impi_intel_linux_db sh ./make_fds.sh ./fds_impi_intel_linux_db + shell: bash - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux sh ./make_fds.sh ./fds_impi_intel_linux - + shell: bash # Setup python - uses: actions/setup-python@v5 with: @@ -91,9 +92,11 @@ jobs: cd ./Build/ompi_gnu_linux_db sh ./make_fds.sh ./fds_ompi_gnu_linux_db + shell: bash - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux sh ./make_fds.sh ./fds_ompi_gnu_linux + shell: bash diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index 97b910ad0d9..d7677c59350 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,5 +1,4 @@ # Decide compilers -echo "Current directory: $(pwd)" source ../Scripts/set_compilers.sh From 39c314e20fdc92959661868edd6e9bc067e90d03 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 20:46:34 -0500 Subject: [PATCH 12/21] FDS Build: Add bash shell to github linux actions --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c1174b4e027..ec9c791d383 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -52,7 +52,7 @@ jobs: cd ./Build/impi_intel_linux sh ./make_fds.sh ./fds_impi_intel_linux - shell: bash + shell: bash # Setup python - uses: actions/setup-python@v5 with: @@ -92,7 +92,7 @@ jobs: cd ./Build/ompi_gnu_linux_db sh ./make_fds.sh ./fds_ompi_gnu_linux_db - shell: bash + shell: bash - name: build fds release run: | source /opt/intel/oneapi/setvars.sh From b2e0a6ae1b565e8dfedbbf4f68b02366c3dd28c6 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 20:51:29 -0500 Subject: [PATCH 13/21] FDS Build: Remove sh to allow bash shell to github linux actions --- .github/workflows/linux.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ec9c791d383..81ec0093dd1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,16 +43,14 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux_db - sh ./make_fds.sh + ./make_fds.sh ./fds_impi_intel_linux_db - shell: bash - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux - sh ./make_fds.sh + ./make_fds.sh ./fds_impi_intel_linux - shell: bash # Setup python - uses: actions/setup-python@v5 with: @@ -90,13 +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 - shell: bash - 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 - shell: bash From df01ff85cefb87a515bca7dd61c86ffc495a4215 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 21:34:23 -0500 Subject: [PATCH 14/21] FDS Build: Remove sh to allow bash shell to github linux actions --- .github/workflows/linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 81ec0093dd1..4d9635a32c8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,13 +43,13 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux_db - ./make_fds.sh + bash ./make_fds.sh ./fds_impi_intel_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux - ./make_fds.sh + bash ./make_fds.sh ./fds_impi_intel_linux # Setup python - uses: actions/setup-python@v5 @@ -88,11 +88,11 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux_db - ./make_fds.sh + bash ./make_fds.sh ./fds_ompi_gnu_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux - ./make_fds.sh + bash ./make_fds.sh ./fds_ompi_gnu_linux From 2e3cb93f06d7d434b5ed54e19dc9552137d12d1e Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 21:43:06 -0500 Subject: [PATCH 15/21] FDS Build: Remove sh to allow bash shell to github linux actions --- Build/Scripts/build_thirdparty_libs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index d7677c59350..89d7599d9e9 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # Decide compilers source ../Scripts/set_compilers.sh From 7e2242820ebd584a4248aca1251afdd8c7cc5800 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 21:44:37 -0500 Subject: [PATCH 16/21] FDS Build: Remove sh to allow bash shell to github linux actions --- Build/Scripts/build_thirdparty_libs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index 89d7599d9e9..4074e972430 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,7 +1,7 @@ #!/bin/bash # Decide compilers -source ../Scripts/set_compilers.sh +. ../Scripts/set_compilers.sh From fc85b1144a8372687b902178fac97ba41c951678 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 21:47:32 -0500 Subject: [PATCH 17/21] FDS Build: Remove sh to allow bash shell to github linux actions --- Build/Scripts/build_thirdparty_libs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index 4074e972430..aca3e4194bb 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,7 +1,9 @@ #!/bin/bash +echo "Current shell: $SHELL" + # Decide compilers -. ../Scripts/set_compilers.sh +source ../Scripts/set_compilers.sh From 1e3a32e483290e72e6dae05e461f422f81380ef3 Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 21:54:15 -0500 Subject: [PATCH 18/21] FDS Build: Remove sh to allow bash shell to github linux actions --- .github/workflows/linux.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d9635a32c8..9dc760c04ac 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,13 +43,15 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux_db - bash ./make_fds.sh + bash + ./make_fds.sh ./fds_impi_intel_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux - bash ./make_fds.sh + bash + ./make_fds.sh ./fds_impi_intel_linux # Setup python - uses: actions/setup-python@v5 @@ -88,11 +90,13 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux_db - bash ./make_fds.sh + bash + ./make_fds.sh ./fds_ompi_gnu_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux - bash ./make_fds.sh + bash + ./make_fds.sh ./fds_ompi_gnu_linux From 1e0d8dac23939a44fffe469c3c9a31cfabea689a Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 22:06:13 -0500 Subject: [PATCH 19/21] FDS Build: Remove sh to allow bash shell to github linux actions --- Build/Scripts/build_thirdparty_libs.sh | 1 - Build/Scripts/set_compilers.sh | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index aca3e4194bb..b253d030912 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -6,7 +6,6 @@ echo "Current shell: $SHELL" source ../Scripts/set_compilers.sh - # PARSE OPTIONS FOR CLEAN LIBRARY BUILDS #################################### # Set FIREMODELS environment variable if it is not already exists. diff --git a/Build/Scripts/set_compilers.sh b/Build/Scripts/set_compilers.sh index 82862bd3c7a..5137d1bb7e3 100755 --- a/Build/Scripts/set_compilers.sh +++ b/Build/Scripts/set_compilers.sh @@ -1,3 +1,5 @@ +#!/bin/bash + echo "FDS build target = $FDS_BUILD_TARGET" # Initialize variables and check environment variables From dffeb6131a181f0bb4165bdf4cf297405011077c Mon Sep 17 00:00:00 2001 From: Chandan Paul Date: Mon, 25 Nov 2024 22:17:25 -0500 Subject: [PATCH 20/21] FDS Build: Remove sh to allow bash shell to github linux actions --- .github/workflows/linux.yml | 4 ---- Build/Scripts/build_thirdparty_libs.sh | 2 -- Build/impi_intel_linux_db/make_fds.sh | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9dc760c04ac..81ec0093dd1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,14 +43,12 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux_db - bash ./make_fds.sh ./fds_impi_intel_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/impi_intel_linux - bash ./make_fds.sh ./fds_impi_intel_linux # Setup python @@ -90,13 +88,11 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux_db - bash ./make_fds.sh ./fds_ompi_gnu_linux_db - name: build fds release run: | source /opt/intel/oneapi/setvars.sh cd ./Build/ompi_gnu_linux - bash ./make_fds.sh ./fds_ompi_gnu_linux diff --git a/Build/Scripts/build_thirdparty_libs.sh b/Build/Scripts/build_thirdparty_libs.sh index b253d030912..5b990f5ff06 100755 --- a/Build/Scripts/build_thirdparty_libs.sh +++ b/Build/Scripts/build_thirdparty_libs.sh @@ -1,7 +1,5 @@ #!/bin/bash -echo "Current shell: $SHELL" - # Decide compilers source ../Scripts/set_compilers.sh diff --git a/Build/impi_intel_linux_db/make_fds.sh b/Build/impi_intel_linux_db/make_fds.sh index fe06efc8128..8013c473584 100755 --- a/Build/impi_intel_linux_db/make_fds.sh +++ b/Build/impi_intel_linux_db/make_fds.sh @@ -5,7 +5,7 @@ target=${dir##*/} # Compile third-party libraries export FDS_BUILD_TARGET=$target -sh ../Scripts/build_thirdparty_libs.sh "$@" +source ../Scripts/build_thirdparty_libs.sh "$@" # Build fds echo Building $target From 61fca61ec4b03e223a4af90d0748ad1656cd0ec5 Mon Sep 17 00:00:00 2001 From: mcgratta Date: Tue, 26 Nov 2024 15:02:40 -0500 Subject: [PATCH 21/21] FDS Source: Issues #13805 and #13806. Clean up particle bookkeeping --- Source/dump.f90 | 6 +++--- Source/func.f90 | 5 ----- Source/main.f90 | 10 +++++----- Source/part.f90 | 18 +++++++++--------- Source/type.f90 | 9 +++------ 5 files changed, 20 insertions(+), 28 deletions(-) diff --git a/Source/dump.f90 b/Source/dump.f90 index 1fe69412445..4a9a188bf95 100644 --- a/Source/dump.f90 +++ b/Source/dump.f90 @@ -3197,9 +3197,9 @@ SUBROUTINE INITIALIZE_DIAGNOSTIC_FILE(DT) LPC => LAGRANGIAN_PARTICLE_CLASS(N) WRITE(LU_OUTPUT,'(/I4,1X,A)') N,TRIM(LPC%ID) WRITE(LU_OUTPUT,'(4X,A,A)') ' SURFace ID: ',TRIM(SURFACE(LPC%SURF_INDEX)%ID) - WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Reals: ',LPC%N_STORAGE_REALS - WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Integers: ',LPC%N_STORAGE_INTEGERS - WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Logicals: ',LPC%N_STORAGE_LOGICALS + WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Reals: ',LPC%N_REALS + WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Integers: ',LPC%N_INTEGERS + WRITE(LU_OUTPUT,'(4X,A,I0)') ' # Logicals: ',LPC%N_LOGICALS ENDDO PARTLOOP ! Print out information about all Devices diff --git a/Source/func.f90 b/Source/func.f90 index e17d1752e49..31d6331e61d 100644 --- a/Source/func.f90 +++ b/Source/func.f90 @@ -1058,8 +1058,6 @@ SUBROUTINE ALLOCATE_STORAGE(NM,LP_INDEX,LPC_INDEX,SURF_INDEX,WALL_INDEX,CFACE_IN LP%B2_INDEX = B2_INDEX LP%BR_INDEX = BR_INDEX - CALL PACK_PARTICLE(NM,OS_DUMMY,LP,LPC_INDEX,LP%N_REALS,LP%N_INTEGERS,LP%N_LOGICALS,UNPACK_IT=.FALSE.,COUNT_ONLY=.TRUE.) - ELSEIF (PRESENT(WALL_INDEX)) THEN SF => SURFACE(SURF_INDEX) @@ -1484,9 +1482,6 @@ SUBROUTINE PACK_PARTICLE(NM,OS,LP,LPC_INDEX,RC,IC,LC,UNPACK_IT,COUNT_ONLY) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%INIT_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%CFACE_INDEX,UNPACK_IT) IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%PROP_INDEX,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%N_REALS,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%N_INTEGERS,UNPACK_IT) -IC=IC+1 ; IF (.NOT.COUNT_ONLY) CALL EQUATE(OS%INTEGERS(IC),LP%N_LOGICALS,UNPACK_IT) ! Assign logical pointers and values diff --git a/Source/main.f90 b/Source/main.f90 index f151d64a0a4..5d9bd0b22d6 100644 --- a/Source/main.f90 +++ b/Source/main.f90 @@ -2037,11 +2037,11 @@ SUBROUTINE INITIALIZE_MESH_EXCHANGE_1(NM) CALL ALLOCATE_STORAGE(NM,LP_INDEX=1,LPC_INDEX=ILC,SURF_INDEX=LPC%SURF_INDEX) LP => M%LAGRANGIAN_PARTICLE(1) OS => LPC%PARTICLE_STORAGE - CALL PACK_PARTICLE(NM,OS,LP,ILC,LPC%N_STORAGE_REALS,LPC%N_STORAGE_INTEGERS,LPC%N_STORAGE_LOGICALS,& - UNPACK_IT=.FALSE.,COUNT_ONLY=.TRUE.) - IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%REALS)) ALLOCATE(LPC%PARTICLE_STORAGE%REALS(LPC%N_STORAGE_REALS)) - IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%INTEGERS)) ALLOCATE(LPC%PARTICLE_STORAGE%INTEGERS(LPC%N_STORAGE_INTEGERS)) - IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%LOGICALS)) ALLOCATE(LPC%PARTICLE_STORAGE%LOGICALS(LPC%N_STORAGE_LOGICALS)) + LPC%N_REALS=0 ; LPC%N_INTEGERS=0 ; LPC%N_LOGICALS=0 + CALL PACK_PARTICLE(NM,OS,LP,ILC,LPC%N_REALS,LPC%N_INTEGERS,LPC%N_LOGICALS,UNPACK_IT=.FALSE.,COUNT_ONLY=.TRUE.) + IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%REALS)) ALLOCATE(LPC%PARTICLE_STORAGE%REALS(LPC%N_REALS)) + IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%INTEGERS)) ALLOCATE(LPC%PARTICLE_STORAGE%INTEGERS(LPC%N_INTEGERS)) + IF (.NOT.ALLOCATED(LPC%PARTICLE_STORAGE%LOGICALS)) ALLOCATE(LPC%PARTICLE_STORAGE%LOGICALS(LPC%N_LOGICALS)) CALL NULLIFY_PARTICLE(NM,1) ENDDO diff --git a/Source/part.f90 b/Source/part.f90 index e644bb6bfe2..a0cc7c5d21e 100644 --- a/Source/part.f90 +++ b/Source/part.f90 @@ -4734,17 +4734,17 @@ SUBROUTINE ADD_TO_PARTICLE_SEND_BUFFER IF (NOM/=0 .AND. NOM/=NM) THEN OS => OMESH(NOM)%PARTICLE_SEND_BUFFER - IF (OS%N_REALS+LP%N_REALS>OS%N_REALS_DIM) THEN - CALL REALLOCATE_STORAGE_ARRAYS(OS,N_REALS=OS%N_REALS_DIM,N_REALS_NEW=OS%N_REALS_DIM+10*LP%N_REALS) - OS%N_REALS_DIM = OS%N_REALS_DIM + 10*LP%N_REALS + IF (OS%N_REALS+LPC%N_REALS>OS%N_REALS_DIM) THEN + CALL REALLOCATE_STORAGE_ARRAYS(OS,N_REALS=OS%N_REALS_DIM,N_REALS_NEW=OS%N_REALS_DIM+10*LPC%N_REALS) + OS%N_REALS_DIM = OS%N_REALS_DIM + 10*LPC%N_REALS ENDIF - IF (OS%N_INTEGERS+LP%N_INTEGERS>OS%N_INTEGERS_DIM) THEN - CALL REALLOCATE_STORAGE_ARRAYS(OS,N_INTEGERS=OS%N_INTEGERS_DIM,N_INTEGERS_NEW=OS%N_INTEGERS_DIM+10*LP%N_INTEGERS) - OS%N_INTEGERS_DIM = OS%N_INTEGERS_DIM + 10*LP%N_INTEGERS + IF (OS%N_INTEGERS+LPC%N_INTEGERS>OS%N_INTEGERS_DIM) THEN + CALL REALLOCATE_STORAGE_ARRAYS(OS,N_INTEGERS=OS%N_INTEGERS_DIM,N_INTEGERS_NEW=OS%N_INTEGERS_DIM+10*LPC%N_INTEGERS) + OS%N_INTEGERS_DIM = OS%N_INTEGERS_DIM + 10*LPC%N_INTEGERS ENDIF - IF (OS%N_LOGICALS+LP%N_LOGICALS>OS%N_LOGICALS_DIM) THEN - CALL REALLOCATE_STORAGE_ARRAYS(OS,N_LOGICALS=OS%N_LOGICALS_DIM,N_LOGICALS_NEW=OS%N_LOGICALS_DIM+10*LP%N_LOGICALS) - OS%N_LOGICALS_DIM = OS%N_LOGICALS_DIM + 10*LP%N_LOGICALS + IF (OS%N_LOGICALS+LPC%N_LOGICALS>OS%N_LOGICALS_DIM) THEN + CALL REALLOCATE_STORAGE_ARRAYS(OS,N_LOGICALS=OS%N_LOGICALS_DIM,N_LOGICALS_NEW=OS%N_LOGICALS_DIM+10*LPC%N_LOGICALS) + OS%N_LOGICALS_DIM = OS%N_LOGICALS_DIM + 10*LPC%N_LOGICALS ENDIF OS%N_ITEMS = OS%N_ITEMS + 1 diff --git a/Source/type.f90 b/Source/type.f90 index 371f9c06e83..7c8fff082ad 100644 --- a/Source/type.f90 +++ b/Source/type.f90 @@ -131,9 +131,9 @@ MODULE TYPES INTEGER :: NEAREST_RAD_ANGLE_INDEX=0 !< Index of the radiation angle nearest the given orientation vector INTEGER :: CNF_RAMP_INDEX=-1 !< Ramp index for Cumulative Number Fraction function INTEGER :: BREAKUP_CNF_RAMP_INDEX=-1 !< Ramp index for break-up Cumulative Number Fraction function - INTEGER :: N_STORAGE_REALS=0 !< Number of reals to store for this particle class - INTEGER :: N_STORAGE_INTEGERS=0 !< Number of integers to store for this particle class - INTEGER :: N_STORAGE_LOGICALS=0 !< Number of logicals to store for this particle class + INTEGER :: N_REALS=0 !< Number of reals to store for this particle class + INTEGER :: N_INTEGERS=0 !< Number of integers to store for this particle class + INTEGER :: N_LOGICALS=0 !< Number of logicals to store for this particle class INTEGER :: NEW_PARTICLE_INCREMENT=1000 !< Number of new storage slots to allocate when NPLDIM is exceeded INTEGER :: EVAP_MODEL !< Evaporation correlation @@ -392,9 +392,6 @@ MODULE TYPES INTEGER :: DUCT_CELL_INDEX=0 !< Index of duct cell INTEGER :: CFACE_INDEX=0 !< Index of immersed boundary CFACE that the droplet has attached to INTEGER :: PROP_INDEX=0 !< Index of the PROPERTY_TYPE assigned to the particle - INTEGER :: N_REALS=0 !< Number of reals to pack into restart or send/recv buffer - INTEGER :: N_INTEGERS=0 !< Number of integers to pack into restart or send/recv buffer - INTEGER :: N_LOGICALS=0 !< Number of logicals to pack into restart or send/recv buffer LOGICAL :: SHOW=.FALSE. !< Show the particle in Smokeview LOGICAL :: SPLAT=.FALSE. !< The liquid droplet has hit a solid