From fb2b26d7933c4af96669e919f91f60c75fa35435 Mon Sep 17 00:00:00 2001 From: Jean-Luc Fattebert Date: Sun, 24 Mar 2024 19:34:18 -0700 Subject: [PATCH 1/2] 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 +++--- 5 files changed, 14 insertions(+), 22 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 da47acc7..55eecaf7 100644 --- a/source/QuadraticFreeEnergyStrategyMultiOrder.h +++ b/source/QuadraticFreeEnergyStrategyMultiOrder.h @@ -53,11 +53,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; @@ -68,7 +68,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; @@ -100,7 +100,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 7efb6d45..b653976a 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 7082bc81..b5c2a217 100644 --- a/source/TemperatureFreeEnergyStrategy.h +++ b/source/TemperatureFreeEnergyStrategy.h @@ -47,14 +47,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; From ef48678b0730b714f860f4db0288ad605189dff5 Mon Sep 17 00:00:00 2001 From: Jean-Luc Fattebert Date: Mon, 25 Mar 2024 10:11:50 -0400 Subject: [PATCH 2/2] Format code --- source/QuadraticFreeEnergyStrategyMultiOrder.h | 11 +++++++---- ...ticFreeEnergyStrategyMultiOrderTernaryThreePhase.h | 11 +++++++---- source/TemperatureFreeEnergyStrategy.h | 8 +++++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/source/QuadraticFreeEnergyStrategyMultiOrder.h b/source/QuadraticFreeEnergyStrategyMultiOrder.h index 55eecaf7..09d6230e 100644 --- a/source/QuadraticFreeEnergyStrategyMultiOrder.h +++ b/source/QuadraticFreeEnergyStrategyMultiOrder.h @@ -53,11 +53,13 @@ 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)override; + 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)override + std::vector& d2fdc2, + const bool use_internal_units = true) override { (void)temperature; @@ -68,7 +70,8 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy } void computeSecondDerivativeEnergyPhaseA( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true)override + std::vector& d2fdc2, + const bool use_internal_units = true) override { (void)temperature; @@ -100,7 +103,7 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy } } - void preRunDiagnostics(const double temperature)override{}; + void preRunDiagnostics(const double temperature) override{}; private: diff --git a/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h b/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h index b653976a..9e01650a 100644 --- a/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h +++ b/source/QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase.h @@ -50,11 +50,13 @@ 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)override; + 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)override + std::vector& d2fdc2, + const bool use_internal_units = true) override { (void)temperature; @@ -65,7 +67,8 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase } void computeSecondDerivativeEnergyPhaseA( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true)override + std::vector& d2fdc2, + const bool use_internal_units = true) override { (void)temperature; @@ -114,7 +117,7 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase } } - void preRunDiagnostics(const double temperature)override{}; + void preRunDiagnostics(const double temperature) override{}; private: diff --git a/source/TemperatureFreeEnergyStrategy.h b/source/TemperatureFreeEnergyStrategy.h index b5c2a217..bf79c378 100644 --- a/source/TemperatureFreeEnergyStrategy.h +++ b/source/TemperatureFreeEnergyStrategy.h @@ -47,14 +47,16 @@ class TemperatureFreeEnergyStrategy : public FreeEnergyStrategy void computeSecondDerivativeEnergyPhaseL( const double temperature, const std::vector& c, - std::vector& d2fdc2, const bool use_internal_units = true)override; + 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)override; + 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)override{}; + void preRunDiagnostics(const double temperature) override{}; private: double d_latent_heat;