Skip to content

Commit d0f7a80

Browse files
committed
Explicitly link math and stdc++ libs in makefile.
1 parent 67f88ef commit d0f7a80

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

swm_AMReX/GNUmakefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AMREX_HOME defines the directory in which we will find all the AMReX code.
1+
# AMREX_HOME = the directory where you pulled the AMReX repo.
22
# I recommend adding this to your environment before running make. However if it is not defined then it will get set here:
33
AMREX_HOME ?= PROVIDE_YOUR_OWN_PATH_TO_AMREX_HERE
44

@@ -8,6 +8,8 @@ USE_OMP = FALSE
88
COMP = gnu
99
DIM = 2
1010

11+
LIBRARIES += -lstdc++ -lm
12+
1113
#USE_HDF5=TRUE
1214
#HDF5_HOME=/home/lalo/spack/opt/spack/linux-ubuntu24.04-skylake/gcc-13.3.0/hdf5-1.14.5-vm6rifl2savzhynhyx56ayutfhmycs3s/
1315

swm_AMReX/run_local.sh

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
#!/bin/bash
22

33
# Prerequisite
4-
# SWM_AMREX_ROOT must be set to the top level of the AMReX version of the mini-app.
4+
# AMREX_HOME = the directory where you pulled the AMReX repo.
5+
# SWM_AMREX_ROOT = the directory containing the AMReX version of the SWM mini-app.
6+
7+
##############################################################################
8+
# User Input
9+
##############################################################################
10+
# The exact executable name may vary depending on the compiler and build options you used.
11+
# You may need to change this to match what is produced by your build.
12+
13+
main_exe="$SWM_AMREX_ROOT"/main2d.gnu.ex
14+
15+
fcompare_exe="$AMREX_HOME"/Tools/Plotfile/fcompare.gnu.ex
16+
17+
##############################################################################
18+
# Setup
19+
##############################################################################
520

621
set -e
722
set -u
@@ -39,8 +54,7 @@ mkdir -p "$run_dir"
3954
cd "$run_dir"
4055

4156
# TODO: Make the executable name a variable so that we can run the MPI, OpenMP, and Cuda versions with the same script
42-
"$SWM_AMREX_ROOT"/main2d.gnu.ex "$SWM_AMREX_ROOT"/inputs
43-
#"$SWM_AMREX_ROOT"/main2d.gnu.MPI.ex "$SWM_AMREX_ROOT"/inputs
57+
$main_exe "$SWM_AMREX_ROOT"/inputs
4458

4559
##############################################################################
4660
# Solution Verification
@@ -52,7 +66,7 @@ set +e
5266

5367
# TODO: Make the plotfile name a so it automatically finds the plotfile for the last time step
5468
# TODO: Do a check to see if the corresponding reference plotfile exists step
55-
$AMREX_HOME/Tools/Plotfile/fcompare.gnu.ex plt04000 "$SWM_AMREX_ROOT"/plt04000_reference
69+
$fcompare_exe plt04000 "$SWM_AMREX_ROOT"/plt04000_reference
5670

5771
if [ $? -eq 0 ]; then
5872
echo -e "\nSolution Verification: PASS"

0 commit comments

Comments
 (0)