E3SM-Project / scorpio

A high-level Parallel I/O Library for structured grid applications
18 stars 16 forks source link

build issue for homme standalone on Perlmutter / NERSC #586

Open whannah1 opened 1 month ago

whannah1 commented 1 month ago

When trying to build homme_tool on Perlmutter I hit hundreds of lines of linker errors. After some trial and error I confirmed that adding -lstdc++ to the linker line fixed the problem.

Commands I used to clone master and reproduce the linker error:

e3sm_root=${SCRATCH}/e3sm_scratch/tmp_clone

mkdir -p ${e3sm_root}
cd ${e3sm_root}
git clone -b jayeshkrishna/homme/port_to_scorpio_1.6.2 git@github.com:E3SM-Project/E3SM.git ./
git submodule sync ; git submodule update --init --recursive

cd ${e3sm_root}/components/homme
eval $(${e3sm_root}/cime/CIME/Tools/get_case_env)

mach_file=${e3sm_root}/components/homme/cmake/machineFiles/perlmutter-gnu.cmake

cmake -C ${mach_file} \
-DBUILD_HOMME_WITHOUT_PIOLIBRARY=FALSE \
-DHOMME_ENABLE_COMPOSE=FALSE \
-DBUILD_HOMME_THETA_KOKKOS=FALSE \
-DBUILD_HOMME_PREQX_KOKKOS=FALSE \
-DHOMME_BUILD_EXECS=FALSE \
-DBUILD_HOMME_TOOL=TRUE \
${e3sm_root}/components/homme

make -j4 homme_tool
jayeshkrishna commented 1 month ago

FYI, See https://acme-climate.atlassian.net/wiki/spaces/DOC/pages/2735079654/Standalone+HOMME for general instructions to build standalone homme

whannah1 commented 1 month ago

My build process is slightly different for homme_tool because I'm only focused on using it to smooth topography on new grids.