Skip to content

Unit required error for Sod problem #152

@StenSipma

Description

@StenSipma

I am attempting to compile and run AthenaPK on my laptop (for testing purposes) but am running into an unexpected error when running the Sod shock tube problem (see below). I compile the system with the following

MACHINE_CFG=Local.cmake cmake -S. -Bbuild-native
cd build-native
make -j 4
./bin/athenaPK -i ../inputs/sod.in                 

Output:

### PARTHENON ERROR
  Message:     Temperature ceiling requires units and gas composition. Either set a 'units' block and the 'hydro/He_mass_fraction' in input file or use a pressure floor (defined code units) instead.
  File:        /home/sten/Documents/PhD/AthenaPK/athenapk/src/hydro/hydro.cpp
  Line number: 530
Temperature ceiling requires units and gas composition. Either set a 'units' block and the 'hydro/He_mass_fraction' in input file or use a pressure floor (defined code units) instead.
Backtrace:
[0x55fcc7437215] 
[0x55fcc7422711] 
[0x55fcc6e5af62] 
[0x55fcc6ed6758] 
[0x55fcc6ed7413] 
[0x55fcc6e34b9e] 
[0x55fcc73dd382] 
[0x55fcc6e276c4] 
[0x7faebba27675] 
[0x7faebba27729] __libc_start_main
[0x55fcc6e343a5] 
[Auriga:262056] *** Process received signal ***
[Auriga:262056] Signal: Aborted (6)
[Auriga:262056] Signal code:  (-6)
[Auriga:262056] [ 0] /usr/lib/libc.so.6(+0x3e540) [0x7faebba3e540]
[Auriga:262056] [ 1] /usr/lib/libc.so.6(+0x9894c) [0x7faebba9894c]
[Auriga:262056] [ 2] /usr/lib/libc.so.6(gsignal+0x20) [0x7faebba3e410]
[Auriga:262056] [ 3] /usr/lib/libc.so.6(abort+0x26) [0x7faebba2557a]
[Auriga:262056] [ 4] ./bin/athenaPK(+0x65571e) [0x55fcc742271e]
[Auriga:262056] [ 5] ./bin/athenaPK(+0x8df62) [0x55fcc6e5af62]
[Auriga:262056] [ 6] ./bin/athenaPK(+0x109758) [0x55fcc6ed6758]
[Auriga:262056] [ 7] ./bin/athenaPK(+0x10a413) [0x55fcc6ed7413]
[Auriga:262056] [ 8] ./bin/athenaPK(+0x67b9e) [0x55fcc6e34b9e]
[Auriga:262056] [ 9] ./bin/athenaPK(+0x610382) [0x55fcc73dd382]
[Auriga:262056] [10] ./bin/athenaPK(+0x5a6c4) [0x55fcc6e276c4]
[Auriga:262056] [11] /usr/lib/libc.so.6(+0x27675) [0x7faebba27675]
[Auriga:262056] [12] /usr/lib/libc.so.6(__libc_start_main+0x89) [0x7faebba27729]
[Auriga:262056] [13] ./bin/athenaPK(+0x673a5) [0x55fcc6e343a5]
[Auriga:262056] *** End of error message ***
zsh: IOT instruction (core dumped)  ./bin/athenaPK -i ../inputs/sod.in

I compile with my own Local.cmake, derived from one of the other example variants, but please if you have improvements let me know. I find it difficult to figure out what parameters are actually necessary to make things work:

message(STATUS "WIP machine config file for my local laptop.\n"
)

# common options
# set(Kokkos_ARCH_SPR ON CACHE BOOL "CPU architecture")
set(Kokkos_ARCH_NATIVE ON CACHE BOOL "CPU architecture")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Default release build")
set(MACHINE_VARIANT "cpu-mpi" CACHE STRING "Default build for just CPU")
# Options for above
# - cuda: build with CUDA only
# - cuda-mpi: build with CUDA and MPI
# - cpu-mpi: build with CPU and MPI
# - cpu: build with CPU only

# variants
if (${MACHINE_VARIANT} MATCHES "cuda")
    set(Kokkos_ARCH_PASCAL61 ON CACHE BOOL "GPU architecture") # For my own GPU
  set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Enable Cuda")
  set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_SOURCE_DIR}/external/Kokkos/bin/nvcc_wrapper CACHE STRING "Use nvcc_wrapper")
else()
  set(CMAKE_CXX_COMPILER g++ CACHE STRING "Use g++")
  set(CMAKE_CXX_FLAGS "-fopenmp-simd -ffast-math -fprefetch-loop-arrays" CACHE STRING "Default opt flags")
endif()

# Setting launcher options independent of parallel or serial test as the launcher always
# needs to be called from the batch node (so that the tests are actually run on the
# compute nodes.

# TODO: check if the below flags work for my system...
set(TEST_MPIEXEC mpirun CACHE STRING "Command to launch MPI applications")
set(TEST_NUMPROC_FLAG "-np" CACHE STRING "Flag to set number of processes")
# set(NUM_GPU_DEVICES_PER_NODE "6" CACHE STRING "6x V100 per node")
set(PARTHENON_ENABLE_GPU_MPI_CHECKS OFF CACHE BOOL "Disable check by default")

if (${MACHINE_VARIANT} MATCHES "mpi")
    set(PARTHENON_DISABLE_HDF5 ON CACHE BOOL "Disable HDF5 (does not work for parallel)")

  # Use a single resource set on a node that includes all cores and GPUs.
  # GPUs are automatically assigned round robin when run with more than one rank.
  list(APPEND TEST_MPIOPTS "-n" "1" "-g" "6" "-c" "42" "-r" "1" "-d" "packed" "-b" "packed:7" "--smpiargs='-gpu'")
else()
  set(PARTHENON_DISABLE_MPI ON CACHE BOOL "Disable MPI")
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions