Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates in OmegaBuild.cmake #198

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions components/omega/OmegaBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ macro(read_cime_config)
set(NEWCASE_COMMAND "${NEWCASE_COMMAND} --project ${OMEGA_CIME_PROJECT}")
endif()

run_bash_command("${NEWCASE_COMMAND}" NEWCASE_OUTPUT)
if(NOT IS_DIRECTORY "${CASEROOT}")
run_bash_command("${NEWCASE_COMMAND}" NEWCASE_OUTPUT)
endif()
run_bash_command("cd ${CASEROOT} && ./case.setup" CASESETUP_OUTPUT)
run_bash_command("source ${CASEROOT}/.env_mach_specific.sh && env" ENV_OUTPUT)

Expand Down Expand Up @@ -301,7 +303,7 @@ macro(init_standalone_build)
file(WRITE ${_RunScript} "#!/usr/bin/env bash\n\n")
file(APPEND ${_RunScript} "source ./omega_env.sh\n\n")
list(JOIN OMEGA_MPI_ARGS " " OMEGA_MPI_ARGS_STR)
file(APPEND ${_RunScript} "${OMEGA_MPI_EXEC} ${OMEGA_MPI_ARGS_STR} -n 8 -- ./src/omega.exe\n\n")
file(APPEND ${_RunScript} "cd test; ${OMEGA_MPI_EXEC} ${OMEGA_MPI_ARGS_STR} -n 8 -- ../src/omega.exe\n\n")

# create a ctest script
set(_CtestScript ${OMEGA_BUILD_DIR}/omega_ctest.sh)
Expand Down Expand Up @@ -664,8 +666,12 @@ macro(update_variables)

add_definitions(-DOMEGA_ENABLE_${OMEGA_ARCH})

if(OMEGA_MPI_ON_DEVICE AND OMEGA_TARGET_DEVICE AND "${MPILIB_NAME}" STREQUAL "mpich")
file(APPEND ${_EnvScript} "export MPICH_GPU_SUPPORT_ENABLED=1\n\n")
if("${MPILIB_NAME}" STREQUAL "mpich")
if(OMEGA_MPI_ON_DEVICE AND OMEGA_TARGET_DEVICE)
file(APPEND ${_EnvScript} "export MPICH_GPU_SUPPORT_ENABLED=1\n\n")
else()
file(APPEND ${_EnvScript} "export MPICH_GPU_SUPPORT_ENABLED=0\n\n")
endif()
endif()

if(OMEGA_TARGET_DEVICE)
Expand Down
Loading