Skip to content

Commit

Permalink
Fix a few things for llnl intel build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Luc Fattebert committed Mar 25, 2024
1 parent 2db2e26 commit 6e71c70
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 25 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
13 changes: 3 additions & 10 deletions scripts/build_llnl_2d
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
#!/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/
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 \
-DSAMRAI_DIR=/usr/gapps/phasefield/samrai/samrai-4.1.0 \
-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 \
..
Expand Down
8 changes: 4 additions & 4 deletions source/QuadraticFreeEnergyStrategyMultiOrder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true)
std::vector<double>& d2fdc2, const bool use_internal_units = true)override
{
(void)temperature;

Expand All @@ -67,7 +67,7 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy
}
void computeSecondDerivativeEnergyPhaseA(
const double temperature, const std::vector<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true)
std::vector<double>& d2fdc2, const bool use_internal_units = true)override
{
(void)temperature;

Expand Down Expand Up @@ -99,7 +99,7 @@ class QuadraticFreeEnergyStrategyMultiOrder : public FreeEnergyStrategy
}
}

void preRunDiagnostics(const double temperature){};
void preRunDiagnostics(const double temperature)override{};


private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true)
std::vector<double>& d2fdc2, const bool use_internal_units = true)override
{
(void)temperature;

Expand All @@ -65,7 +65,7 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase
}
void computeSecondDerivativeEnergyPhaseA(
const double temperature, const std::vector<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true)
std::vector<double>& d2fdc2, const bool use_internal_units = true)override
{
(void)temperature;

Expand Down Expand Up @@ -114,7 +114,7 @@ class QuadraticFreeEnergyStrategyMultiOrderTernaryThreePhase
}
}

void preRunDiagnostics(const double temperature){};
void preRunDiagnostics(const double temperature)override{};


private:
Expand Down
6 changes: 3 additions & 3 deletions source/TemperatureFreeEnergyStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class TemperatureFreeEnergyStrategy : public FreeEnergyStrategy

void computeSecondDerivativeEnergyPhaseL(
const double temperature, const std::vector<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true);
std::vector<double>& d2fdc2, const bool use_internal_units = true)override;
void computeSecondDerivativeEnergyPhaseA(
const double temperature, const std::vector<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true);
std::vector<double>& d2fdc2, const bool use_internal_units = true)override;
void computeSecondDerivativeEnergyPhaseB(
const double temperature, const std::vector<double>& c,
std::vector<double>& d2fdc2, const bool use_internal_units = true);
void preRunDiagnostics(const double temperature){};
void preRunDiagnostics(const double temperature)override{};

private:
double d_latent_heat;
Expand Down
5 changes: 2 additions & 3 deletions source/fortran/2d/quatfacops.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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

Expand Down

0 comments on commit 6e71c70

Please sign in to comment.