From 6e71c70b78ed60b924c9141e75bf2ba690eb77de Mon Sep 17 00:00:00 2001 From: Jean-Luc Fattebert Date: Sun, 24 Mar 2024 19:34:18 -0700 Subject: [PATCH] Fix a few things for llnl intel build --- CMakeLists.txt | 1 - scripts/build_llnl_2d | 13 +++---------- source/QuadraticFreeEnergyStrategyMultiOrder.h | 8 ++++---- ...cFreeEnergyStrategyMultiOrderTernaryThreePhase.h | 8 ++++---- source/TemperatureFreeEnergyStrategy.h | 6 +++--- source/fortran/2d/quatfacops.m4 | 5 ++--- 6 files changed, 16 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d30ab4e..b7635df7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,6 @@ endif() message(STATUS "MPIEXEC: ${MPIEXEC}\n") -set(HDF5_USE_STATIC_LIBRARIES ON) find_package(HDF5 COMPONENTS C HL REQUIRED) message(STATUS ${HDF5_VERSION} ) include_directories(${HDF5_INCLUDE_DIR}) diff --git a/scripts/build_llnl_2d b/scripts/build_llnl_2d index 5ae12191..38c8d7a9 100755 --- a/scripts/build_llnl_2d +++ b/scripts/build_llnl_2d @@ -1,13 +1,10 @@ #!/usr/bin/env bash -module load intel +module load intel/2022.1.0-magic module load hdf5-serial module load boost -module load netcdf +module load netcdf-cxx4-serial module load cmake -module load python/3.8.2 - -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/gapps/phasefield/lib/netcdf-cxx-intel/lib - +module load python/3.9.12 rm -rf CMakeCache.txt rm -rf CMakeFiles/ @@ -15,8 +12,6 @@ rm cmake_install.cmake rm Makefile rm -f ../source/fortran/2d/*.f -NETCDF_DIR=/usr/gapps/phasefield/lib/netcdf-cxx-intel - cmake -DCMAKE_CXX_COMPILER=mpic++ \ -DCMAKE_C_COMPILER=mpicc \ -DCMAKE_Fortran_COMPILER=mpif77 \ @@ -24,8 +19,6 @@ cmake -DCMAKE_CXX_COMPILER=mpic++ \ -DHYPRE_DIR=/usr/gapps/phasefield/hypre/hypre-2.21.0 \ -DSUNDIALS_DIR=/usr/gapps/phasefield/sundials/sundials-5.4.0 \ -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_PREFIX_PATH=$NETCDF_DIR \ -DNDIM="2" \ -DTHERMO4PFM_DIR=/usr/gapps/phasefield/Thermo4PFM \ .. diff --git a/source/QuadraticFreeEnergyStrategyMultiOrder.h b/source/QuadraticFreeEnergyStrategyMultiOrder.h index e751255c..3bca0665 100644 --- a/source/QuadraticFreeEnergyStrategyMultiOrder.h +++ b/source/QuadraticFreeEnergyStrategyMultiOrder.h @@ -52,11 +52,11 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy void addDrivingForce(const double time, hier::Patch& patch, const int temperature_id, const int phase_id, const int eta_id, const int conc_id, const int f_l_id, - const int f_a_id, const int f_b_id, const int rhs_id); + const int f_a_id, const int f_b_id, const int rhs_id)override; void computeSecondDerivativeEnergyPhaseL( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true) + std::vector& d2fdc2, const bool use_internal_units = true)override { (void)temperature; @@ -67,7 +67,7 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy } void computeSecondDerivativeEnergyPhaseA( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true) + std::vector& d2fdc2, const bool use_internal_units = true)override { (void)temperature; @@ -99,7 +99,7 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy } } - void preRunDiagnostics(const double temperature){}; + void preRunDiagnostics(const double temperature)override{}; private: diff --git a/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h b/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h index 8bb02b78..af921968 100644 --- a/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h +++ b/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h @@ -50,11 +50,11 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase void addDrivingForce(const double time, hier::Patch& patch, const int temperature_id, const int phase_id, const int eta_id, const int conc_id, const int f_l_id, - const int f_a_id, const int f_b_id, const int rhs_id); + const int f_a_id, const int f_b_id, const int rhs_id)override; void computeSecondDerivativeEnergyPhaseL( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true) + std::vector& d2fdc2, const bool use_internal_units = true)override { (void)temperature; @@ -65,7 +65,7 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase } void computeSecondDerivativeEnergyPhaseA( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true) + std::vector& d2fdc2, const bool use_internal_units = true)override { (void)temperature; @@ -114,7 +114,7 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase } } - void preRunDiagnostics(const double temperature){}; + void preRunDiagnostics(const double temperature)override{}; private: diff --git a/source/TemperatureFreeEnergyStrategy.h b/source/TemperatureFreeEnergyStrategy.h index af26f6f3..8bb11b6e 100644 --- a/source/TemperatureFreeEnergyStrategy.h +++ b/source/TemperatureFreeEnergyStrategy.h @@ -48,14 +48,14 @@ class TemperatureFreeEnergyStrategy : public FreeEnergyStrategy void computeSecondDerivativeEnergyPhaseL( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true); + std::vector& d2fdc2, const bool use_internal_units = true)override; void computeSecondDerivativeEnergyPhaseA( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true); + std::vector& d2fdc2, const bool use_internal_units = true)override; void computeSecondDerivativeEnergyPhaseB( const double temperature, const std::vector& c, std::vector& d2fdc2, const bool use_internal_units = true); - void preRunDiagnostics(const double temperature){}; + void preRunDiagnostics(const double temperature)override{}; private: double d_latent_heat; diff --git a/source/fortran/2d/quatfacops.m4 b/source/fortran/2d/quatfacops.m4 index 92803692..7ef5a544 100644 --- a/source/fortran/2d/quatfacops.m4 +++ b/source/fortran/2d/quatfacops.m4 @@ -27,6 +27,8 @@ c c implicit none c + integer lo0, hi0, lo1, hi1, + & depth c variables in 2d cell indexed integer ngp, ngt, nggq, ngf double precision phi(CELL2d(lo,hi,ngp)) @@ -40,9 +42,6 @@ c variables in 2d cell indexed character*(*) floor_type character*(*) avg_type - integer lo0, hi0, lo1, hi1, - & depth - double precision & gradient_floor, eps_q