-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support different I/O types for history and restart output #2754
Changes from all commits
7be0f75
107da5a
efcc246
c3cc055
9f822b2
ceb4336
282405d
bdc0c19
67aff45
fa6c6e8
6b407d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1472,6 +1472,10 @@ | |
<env name="OMP_PROC_BIND">spread</env> | ||
<env name="OMP_PLACES">threads</env> | ||
</environment_variables> | ||
|
||
<environment_variables compiler="crayclang-scream" mpilib="mpich"> | ||
<env name="ADIOS2_ROOT">$SHELL{if [ -z "$ADIOS2_ROOT" ]; then echo /lustre/orion/cli115/world-shared/frontier/3rdparty/adios2/2.9.1/cray-mpich-8.1.26/crayclang-scream-14.0.0; else echo "$ADIOS2_ROOT"; fi}</env> | ||
</environment_variables> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A CIME config change |
||
</machine> | ||
|
||
<!-- Skylake nodes of Stampede2 at TACC --> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
<template>template.case.test</template> | ||
<prereq>$BUILD_COMPLETE and $TEST</prereq> | ||
</job> | ||
<job name="case.post_run_io"> | ||
<!--job name="case.post_run_io"> | ||
<template>template.post_run_io</template> | ||
<dependency>case.run</dependency> | ||
<prereq>case.get_value("PIO_TYPENAME_ATM") == 'adios' or \ | ||
|
@@ -53,11 +53,12 @@ | |
<runtime_parameters> | ||
<walltime>0:30:00</walltime> | ||
</runtime_parameters> | ||
</job> | ||
</job--> | ||
<job name="case.st_archive"> | ||
<template>template.st_archive</template> | ||
<!-- If DOUT_S is true and case.run (or case.test) exits successfully then run st_archive--> | ||
<dependency>(case.run and case.post_run_io) or case.test</dependency> | ||
<!--dependency>(case.run and case.post_run_io) or case.test</dependency--> | ||
<dependency>case.run or case.test</dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A CIME config change We will need to add a way to disable it via XML changes in E3SM. |
||
<prereq>$DOUT_S</prereq> | ||
<runtime_parameters> | ||
<task_count>1</task_count> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) | ||
common_setup() | ||
|
||
include (${EKAT_MACH_FILES_PATH}/kokkos/openmp.cmake) | ||
include (${EKAT_MACH_FILES_PATH}/mpi/other.cmake) | ||
|
||
# Remove this if you are using a resource manager (slurm etc) | ||
set (EKAT_TEST_LAUNCHER_MANAGE_RESOURCES True CACHE BOOL "") | ||
|
||
# EKAT MPI settings | ||
set (EKAT_MPIRUN_EXE "mpiexec" CACHE STRING "mpiexec") | ||
set (EKAT_MPI_NP_FLAG "-n" CACHE STRING "-n") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,17 @@ macro (CreateScorpioTargets) | |
option (PIO_ENABLE_FORTRAN "Enable the Fortran library builds" ON) | ||
|
||
add_subdirectory (${E3SM_EXTERNALS_DIR}/scorpio ${CMAKE_BINARY_DIR}/externals/scorpio) | ||
|
||
set (SCORPIO_Fortran_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/externals/scorpio/src/flib CACHE INTERNAL "SCORPIO Fortran include dirs") | ||
set (C_INCLUDE_DIRS "${E3SM_EXTERNALS_DIR}/scorpio/src/clib") | ||
list(APPEND C_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/externals/scorpio/src/clib") | ||
set (SCORPIO_C_INCLUDE_DIRS "${C_INCLUDE_DIRS}" CACHE INTERNAL "SCORPIO C include dirs") | ||
|
||
# Add GPTL from SCORPIO | ||
if (NOT GPTL_PATH) | ||
set (GPTL_PATH ${E3SM_EXTERNALS_DIR}/scorpio/src/gptl CACHE INTERNAL "Path to GPTL library") | ||
endif () | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't you just add these to the clib/flib/gptl targets? Like
It seems more CMake3.0 style, and less invaisve (only need to take care of this in this cmake script, rather than throughout the project) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, eventually we will move to just using find_library(scorpio...) mode. The basic pieces are there in SCORPIO now, we will start using it in E3SM/EAMXX in upcoming PRs. (PS: Note that this hack is needed due to the way EAMXX currently adds SCORPIO source for standalone builds) |
||
EkatDisableAllWarning(pioc) | ||
EkatDisableAllWarning(piof) | ||
EkatDisableAllWarning(gptl) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ using scream::Int; | |
extern "C" { | ||
|
||
// Fortran routines to be called from C++ | ||
void register_file_c2f(const char*&& filename, const int& mode); | ||
void register_file_c2f(const char*&& filename, const int& mode, const int& iotype); | ||
int get_file_mode_c2f(const char*&& filename); | ||
void set_decomp_c2f(const char*&& filename); | ||
void set_dof_c2f(const char*&& filename,const char*&& varname,const Int dof_len,const std::int64_t *x_dof); | ||
|
@@ -94,8 +94,8 @@ void eam_pio_finalize() { | |
eam_pio_finalize_c2f(); | ||
} | ||
/* ----------------------------------------------------------------- */ | ||
void register_file(const std::string& filename, const FileMode mode) { | ||
register_file_c2f(filename.c_str(),mode); | ||
void register_file(const std::string& filename, const FileMode mode, const int iotype) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Up to you, but since you often call this with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think its a good idea to add the default value here (On the other hand forcing users to specify the args can prevent copy-paste errors :) ). I will make that change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it's not an obvious choice. As I said, up to you. If you think in the vast majority of cases the "default" value is fine, then adding defaults to the signature makes sense. But if the cost of using default when you shouldn't is very high, then we can just force users to always pass it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will modify the code to use default args since there are many instances where the default io type is used (including tests etc) |
||
register_file_c2f(filename.c_str(),mode,iotype); | ||
} | ||
/* ----------------------------------------------------------------- */ | ||
void eam_pio_closefile(const std::string& filename) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A CIME config change.
This change is not in E3SM master yet, but we will be adding this change there soon