Skip to content

Commit

Permalink
Merge fe767fc into 9fcf062
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Oct 21, 2020
2 parents 9fcf062 + fe767fc commit 6a0125b
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -49,6 +49,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Updated to newer BLT to resolve BLT/FindMPI issues with rpath linking commands when using OpenMPI.
- Fixed internal object name string for the Python Iterator object. It used to report `Schema`, which triggered both puzzling and concerned emotions.
- Fixed a bug with `Node.set` in the Python API that undermined setting NumPy arrays with sliced views and complex striding. General slices should now work with `set`. No changes to the `set_external` case, which requires 1-D effective striding and throws an exception when more complex strides are presented.



#### Relay
Expand All @@ -66,6 +67,8 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- The string return variants of `about` methods now return yaml strings instead of json strings.
- Sphinx Docs code examples and outputs are now included using start-after and end-before style includes.
- Schema to_json() and to_json_stream() methods were expanded to support indent, depth, pad and end-of-element args.
- In Python, conduit.Node() repr now returns the YAML string representation of the Node. Perviously verbose `conduit_json` was used, which was overwhelming.
- conduit.about() now reports the git tag if found, and `version` was changed to add git sha and status (dirty) info to avoid confusion between release and development installs.

#### Relay
- Provide more context when a Conduit Node cannot be written to a HDF5 file because it is incompatible with the existing HDF5 tree. Error messages now provide the full path and details about the incompatibility.
Expand Down
1 change: 1 addition & 0 deletions scripts/uberenv/project.json
Expand Up @@ -3,6 +3,7 @@
"uberenv_package_name" : "uberenv-conduit",
"spack_url": "https://github.com/alpine-DAV/spack",
"spack_branch": "task/2019_11_update_ascent",
"mirror_url": "https://www.ascent-dav.org/mirror/conduit/latest/",
"spack_activate" : {"py-numpy" : ["+python"],
"py-sphinx": ["+python","+doc"],
"py-mpi4py" : ["+python", "+mpi"],
Expand Down
2 changes: 2 additions & 0 deletions scripts/uberenv/uberenv.py
Expand Up @@ -350,6 +350,8 @@ def main():
uberenv_pkg_name = project_opts["package_name"]
else:
uberenv_pkg_name = project_opts["uberenv_package_name"]
if "mirror_url" in project_opts.keys():
opts["mirror"] = project_opts["mirror_url"]
print("[uberenv project settings: {}]".format(str(project_opts)))
print("[uberenv options: {}]".format(str(opts)))
if "darwin" in platform.system().lower():
Expand Down
43 changes: 36 additions & 7 deletions src/cmake/CMakeBasics.cmake
Expand Up @@ -117,13 +117,42 @@ endif()
##############################################################################
find_package(Git)
if(GIT_FOUND)
message(STATUS "git executable: ${GIT_EXECUTABLE}")
execute_process(COMMAND
"${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=40 --dirty
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE CONDUIT_GIT_SHA1
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Repo SHA1:" ${CONDUIT_GIT_SHA1})
message(STATUS "git executable: ${GIT_EXECUTABLE}")
# try to get sha1
execute_process(COMMAND
"${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=40 --dirty
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE CONDUIT_GIT_SHA1
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

if("${CONDUIT_GIT_SHA1}" STREQUAL "")
set(CONDUIT_GIT_SHA1 "unknown")
endif()
message(STATUS "git SHA1: " ${CONDUIT_GIT_SHA1})

execute_process(COMMAND
"${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=5 --dirty
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE CONDUIT_GIT_SHA1_ABBREV
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

if("${CONDUIT_GIT_SHA1_ABBREV}" STREQUAL "")
set(CONDUIT_GIT_SHA1_ABBREV "unknown")
endif()
message(STATUS "git SHA1-abbrev: " ${CONDUIT_GIT_SHA1_ABBREV})

# try to get tag
execute_process(COMMAND
"${GIT_EXECUTABLE}" describe --exact-match --tags
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE CONDUIT_GIT_TAG
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

if("${CONDUIT_GIT_TAG}" STREQUAL "")
set(CONDUIT_GIT_TAG "unknown")
endif()
message(STATUS "git tag: " ${CONDUIT_GIT_TAG})

endif()


Expand Down
2 changes: 2 additions & 0 deletions src/libs/conduit/conduit_config.h.in
Expand Up @@ -30,6 +30,8 @@
#define CONDUIT_VERSION "@PROJECT_VERSION@"

#cmakedefine CONDUIT_GIT_SHA1 "${CONDUIT_GIT_SHA1}"
#cmakedefine CONDUIT_GIT_SHA1_ABBREV "${CONDUIT_GIT_SHA1_ABBREV}"
#cmakedefine CONDUIT_GIT_TAG "${CONDUIT_GIT_TAG}"

#define CONDUIT_SYSTEM_TYPE "@CMAKE_SYSTEM@"

Expand Down
23 changes: 22 additions & 1 deletion src/libs/conduit/conduit_core.cpp
Expand Up @@ -43,8 +43,29 @@ about(Node &n)

#ifdef CONDUIT_GIT_SHA1
n["git_sha1"] = CONDUIT_GIT_SHA1;
#else
n["git_sha1"] = "unknown";
#endif


#ifdef CONDUIT_GIT_SHA1_ABBREV
n["git_sha1_abbrev"] = CONDUIT_GIT_SHA1_ABBREV;
#else
n["git_sha1_abbrev"] = "unknown";
#endif

#ifdef CONDUIT_GIT_TAG
n["git_tag"] = CONDUIT_GIT_TAG;
#else
n["git_tag"] = "unknown";
#endif

if(n["git_tag"].as_string() == "unknown" &&
n["git_sha1_abbrev"].as_string() != "unknown")
{
n["version"] = n["version"].as_string()
+ "-" + n["git_sha1_abbrev"].as_string();
}

n["compilers/cpp"] = CONDUIT_CPP_COMPILER;
#ifdef CONDUIT_FORTRAN_COMPILER
n["compilers/fortran"] = CONDUIT_FORTRAN_COMPILER;
Expand Down
4 changes: 1 addition & 3 deletions src/libs/conduit/python/conduit_python.cpp
Expand Up @@ -4177,9 +4177,7 @@ PyConduit_Node_str(PyConduit_Node* self)
static PyObject *
PyConduit_Node_repr(PyConduit_Node* self)
{
std::ostringstream oss;
self->node->to_json_stream(oss,"conduit_json");
return (Py_BuildValue("s", oss.str().c_str()));
return PyConduit_Node_str(self);
}

//---------------------------------------------------------------------------//
Expand Down
11 changes: 9 additions & 2 deletions src/libs/relay/conduit_relay_io_blueprint.cpp
Expand Up @@ -1427,8 +1427,15 @@ void read_mesh(const std::string &root_file_path,
{
std::string entry_name = itr.name();
std::string entry_path = entry["path"].as_string();
hnd.read(utils::join_path(tree_path, entry_path),
mesh_out[outer_name][entry_name]);
std::string fetch_path = utils::join_path(tree_path,
entry_path);
// some parts may not exist in all domains
// only read if they are there
if(hnd.has_path(fetch_path))
{
hnd.read(fetch_path,
mesh_out[outer_name][entry_name]);
}
}
}
}
Expand Down

0 comments on commit 6a0125b

Please sign in to comment.