diff --git a/CHANGELOG.md b/CHANGELOG.md index e35a90102..0b04a7d95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,16 @@ Notable changes to Conduit are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project aspires to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## [0.8.7] - Released 2023-03-23 ### Added -- Added public default and copy constructor to DataAccessor. Enables more flexibility with initializing DataAccessors from Nodes. + #### General +- Added public default and copy constructor to DataAccessor. Enables more flexibility with initializing DataAccessors from Nodes. - Added Node.name(), Node.path(), Schema.name(), and Schema.path() to Python API. - Added Node.as_index_t_ptr() - Added `conduit::execution` namespace, which contains `for_all()` and `sort()` functions. +- Added DataType support to the Fortran API #### Blueprint - Added `conduit::blueprint::mpi::mesh::distribute`, which enables sending mesh domains to arbitrary MPI ranks (suppo @@ -20,6 +22,9 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s - Added `conduit::blueprint::examples::mesh::rz_cylinder` function that generates example 2D cylindrical (RZ) meshes. ### Fixed +#### General +- Fixed a logic issue undermining C++ type mapping when using CMake 3.26. + #### Blueprint - Performance improvements to Mesh Blueprint topology metadata, used by `generate_points`, `generate_sides`, etc. The class was rewritten and the old one was moved to `conduit::blueprint::mesh::utils::reference::TopologyMetadata`. The new implementation is faster, often about 6-20x depending on options. - Performance improvements to O2M Iterators. @@ -763,7 +768,8 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s ### Added - Initial Open Source Release on GitHub -[Unreleased]: https://github.com/llnl/conduit/compare/v0.8.6...HEAD +[Unreleased]: https://github.com/llnl/conduit/compare/v0.8.7...HEAD +[0.8.7]: https://github.com/llnl/conduit/compare/v0.8.6...v0.8.7 [0.8.6]: https://github.com/llnl/conduit/compare/v0.8.5...v0.8.6 [0.8.5]: https://github.com/llnl/conduit/compare/v0.8.4...v0.8.5 [0.8.4]: https://github.com/llnl/conduit/compare/v0.8.3...v0.8.4 @@ -782,3 +788,4 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s [0.3.0]: https://github.com/llnl/conduit/compare/v0.2.1...v0.3.0 [0.2.1]: https://github.com/llnl/conduit/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/llnl/conduit/compare/v0.1.0...v0.2.0 + diff --git a/host-configs/Darwin.cmake b/host-configs/Darwin.cmake deleted file mode 100644 index 0fea0c3e7..000000000 --- a/host-configs/Darwin.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit -# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and -# other details. No copyright assignment is required to contribute to Conduit. -############################################################################### -# -# CMake Cache Seed file for OSX -# -############################################################################### - -# use clang compilers -set(CMAKE_C_COMPILER "clang" CACHE PATH "") -set(CMAKE_CXX_COMPILER "clang++" CACHE PATH "") - diff --git a/host-configs/bgqos_0.cmake b/host-configs/bgqos_0.cmake deleted file mode 120000 index 7540cedd7..000000000 --- a/host-configs/bgqos_0.cmake +++ /dev/null @@ -1 +0,0 @@ -bgqos_0.gcc.4.8.4.cmake \ No newline at end of file diff --git a/host-configs/bgqos_0.gcc.4.8.4.cmake b/host-configs/bgqos_0.gcc.4.8.4.cmake deleted file mode 100644 index 0569f5d58..000000000 --- a/host-configs/bgqos_0.gcc.4.8.4.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit -# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and -# other details. No copyright assignment is required to contribute to Conduit. -############################################################################### -# -# CMake Cache Seed file for LLNL BG/Q Systems -# -############################################################################### - -set(BUILD_SHARED_LIBS OFF CACHE PATH "") -set(ENABLE_DOCS OFF CACHE PATH "") - -set(CMAKE_C_COMPILER "/usr/local/tools/toolchain-4.8.4/gnu-linux-4.8.4/bin/powerpc64-bgq-linux-gcc" CACHE PATH "") -set(CMAKE_CXX_COMPILER "/usr/local/tools/toolchain-4.8.4/gnu-linux-4.8.4/bin/powerpc64-bgq-linux-g++" CACHE PATH "") - -set(ENABLE_FORTRAN ON CACHE PATH "") -set(CMAKE_Fortran_COMPILER "/usr/local/tools/toolchain-4.8.4/gnu-linux-4.8.4/bin/powerpc64-bgq-linux-gfortran" CACHE PATH "") - -############################################################################### -# MPI Settings -############################################################################### -set(ENABLE_MPI ON CACHE PATH "") -# -# Explicitly set the mpi include paths and libs for BGQ. -# -# Note: We don't use compiler wrappers on BGQ, b/c CMake will try to link the -# shared variants of the mpi libs instead of the static ones -############################################################################### - -set(MPI_LIBS "/bgsys/drivers/V1R2M4/ppc64/comm/lib/libmpich-gcc.a;/bgsys/drivers/V1R2M4/ppc64/comm/lib/libopa-gcc.a;/bgsys/drivers/V1R2M4/ppc64/comm/lib/libmpl-gcc.a;/bgsys/drivers/V1R2M4/ppc64/comm/lib/libpami-gcc.a;/bgsys/drivers/V1R2M4/ppc64/spi/lib/libSPI.a;/bgsys/drivers/V1R2M4/ppc64/spi/lib/libSPI_cnk.a;rt;pthread;stdc++;pthread") - -set(MPI_INCLUDE_PATHS "/bgsys/drivers/V1R2M4/ppc64/comm/include;/bgsys/drivers/V1R2M4/ppc64/comm/lib/gnu;/bgsys/drivers/V1R2M4/ppc64;/bgsys/drivers/V1R2M4/ppc64/comm/sys/include;/bgsys/drivers/V1R2M4/ppc64/spi/include;/bgsys/drivers/V1R2M4/ppc64/spi/include/kernel/cnk" ) - -set(MPI_C_INCLUDE_PATH ${MPI_INCLUDE_PATHS} CACHE PATH "") -set(MPI_C_LIBRARIES ${MPI_LIBS} CACHE PATH "") - -set(MPI_CXX_INCLUDE_PATH ${MPI_INCLUDE_PATHS} CACHE PATH "") -set(MPI_CXX_LIBRARIES ${MPI_LIBS} CACHE PATH "") - - - diff --git a/host-configs/bgqos_0.xlc.cmake b/host-configs/bgqos_0.xlc.cmake deleted file mode 100644 index 4fe476fc5..000000000 --- a/host-configs/bgqos_0.xlc.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit -# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and -# other details. No copyright assignment is required to contribute to Conduit. -############################################################################### -# -# CMake Cache Seed file for LLNL BG/Q Systems -# -############################################################################### - -set(BUILD_SHARED_LIBS OFF CACHE PATH "") -set(ENABLE_DOCS OFF CACHE PATH "") - -set(CMAKE_C_COMPILER "/usr/local/bin/bgxlc_r" CACHE PATH "") -set(CMAKE_CXX_COMPILER "/usr/local/bin/bgxlc++_r" CACHE PATH "") - -set(ENABLE_FORTRAN ON CACHE PATH "") -set(CMAKE_Fortran_COMPILER "/usr/local/bin/bgxlf2003_r" CACHE PATH "") - -############################################################################### -# MPI Settings -############################################################################### -set(ENABLE_MPI ON CACHE PATH "") -# -# Explicitly set the mpi include paths and libs for BGQ. -# -# Note: We don't use compiler wrappers on BGQ, b/c CMake will try to link the -# shared variants of the mpi libs instead of the static ones -############################################################################### -set(MPI_INCLUDE_PATHS "/bgsys/drivers/V1R2M4/ppc64/comm/include;/bgsys/drivers/V1R2M4/ppc64/comm/lib/xl;/bgsys/drivers/V1R2M4/ppc64;/bgsys/drivers/V1R2M4/ppc64/comm/sys/include;/bgsys/drivers/V1R2M4/ppc64/spi/include;/bgsys/drivers/V1R2M4/ppc64/spi/include/kernel/cnk" ) - - -set(MPI_LIBS "/bgsys/drivers/V1R2M4/ppc64/comm/lib/libmpich-xl.a;/bgsys/drivers/V1R2M4/ppc64/comm/lib/libopa-xl.a;/bgsys/drivers/V1R2M4/ppc64/comm/lib/libmpl-xl.a;/bgsys/drivers/V1R2M4/ppc64/comm/lib/libpami-gcc.a;/bgsys/drivers/V1R2M4/ppc64/spi/lib/libSPI.a;/bgsys/drivers/V1R2M4/ppc64/spi/lib/libSPI_cnk.a;rt;pthread;stdc++;pthread") - - -set(MPI_C_INCLUDE_PATH ${MPI_INCLUDE_PATHS} CACHE PATH "") -set(MPI_C_LIBRARIES ${MPI_LIBS} CACHE PATH "") - -set(MPI_CXX_INCLUDE_PATH ${MPI_INCLUDE_PATHS} CACHE PATH "") -set(MPI_CXX_LIBRARIES ${MPI_LIBS} CACHE PATH "") - - diff --git a/host-configs/blueos_3_ppc64le_ib-xl@16.1.cmake b/host-configs/blueos_3_ppc64le_ib-xl@16.1.cmake deleted file mode 100644 index 03126c0de..000000000 --- a/host-configs/blueos_3_ppc64le_ib-xl@16.1.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(CMAKE_C_COMPILER "/usr/tce/packages/xl/xl-2018.05.18/xlC/16.1.0/bin/xlc" CACHE PATH "") -set(CMAKE_CXX_COMPILER "/usr/tce/packages/xl/xl-2018.05.18/xlC/16.1.0/bin/xlC" CACHE PATH "") -set(CMAKE_Fortran_COMPILER "/usr/tce/packages/xl/xl-2018.05.18/xlf/16.1.0/bin/xlf" CACHE PATH "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") diff --git a/host-configs/chaos_5_x86_64.cmake b/host-configs/chaos_5_x86_64.cmake deleted file mode 120000 index 0f95da821..000000000 --- a/host-configs/chaos_5_x86_64.cmake +++ /dev/null @@ -1 +0,0 @@ -chaos_5_x86_64_ib-gcc@4.9.3.cmake \ No newline at end of file diff --git a/host-configs/chaos_5_x86_64_ib-gcc@4.9.3.cmake b/host-configs/chaos_5_x86_64_ib-gcc@4.9.3.cmake deleted file mode 100644 index e2951f4fb..000000000 --- a/host-configs/chaos_5_x86_64_ib-gcc@4.9.3.cmake +++ /dev/null @@ -1,63 +0,0 @@ -################################## -# uberenv host-config -################################## -# chaos_5_x86_64_ib-gcc@4.9.3 -################################## - -# cmake from uberenv -# cmake exectuable path: /usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/cmake-3.3.1-3gc4unffj5rqcq35gecg4wv3roecpldt/bin/cmake - -####### -# using gcc@4.9.3 compiler spec -####### - -# c compiler used by spack -set(CMAKE_C_COMPILER "/usr/apps/gnu/4.9.3/bin/gcc" CACHE PATH "") - -# cpp compiler used by spack -set(CMAKE_CXX_COMPILER "/usr/apps/gnu/4.9.3/bin/g++" CACHE PATH "") - -# fortran compiler used by spack -set(ENABLE_FORTRAN ON CACHE PATH "") - -set(CMAKE_Fortran_COMPILER "/usr/apps/gnu/4.9.3/bin/gfortran" CACHE PATH "") - -# Enable python module builds -set(ENABLE_PYTHON ON CACHE PATH "") - -# python from uberenv -set(PYTHON_EXECUTABLE "/usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/python-2.7.11-eujx7frnxd5vpwolmye2fzq4tcylnbnv/bin/python" CACHE PATH "") - -# sphinx from uberenv -set(SPHINX_EXECUTABLE "/usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/python-2.7.11-eujx7frnxd5vpwolmye2fzq4tcylnbnv/bin/sphinx-build" CACHE PATH "") - -# python3 from uberenv -#set(PYTHON_EXECUTABLE "/usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/python3-3.5.1-bbbluvapi4elzb76vqqriuwq3y7ldqkk/bin/python3" CACHE PATH "") - -# sphinx from uberenv -#set(SPHINX_EXECUTABLE "/usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/python3-3.5.1-bbbluvapi4elzb76vqqriuwq3y7ldqkk/bin/sphinx-build" CACHE PATH "") - -# MPI Support -set(ENABLE_MPI ON CACHE PATH "") - -set(MPI_C_COMPILER "/usr/local/bin/mpicc" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/local/bin/mpif90" CACHE PATH "") - -# I/O Packages - -# hdf5 from uberenv -set(HDF5_DIR "/usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/hdf5-1.8.16-msbowehgkgvhlnl62fy6tb7bvefbr7h4" CACHE PATH "") - -# silo from uberenv -set(SILO_DIR "/usr/gapps/conduit/thirdparty_libs/stable/spack/opt/spack/chaos_5_x86_64_ib/gcc-4.9.3/silo-4.10.1-jnuhe4xm3vtwq4mevsobhahlriuqafrg" CACHE PATH "") - -################################## -# end uberenv host-config -################################## - -# Extra MPI Settings for Chaos -set(MPIEXEC /usr/bin/srun CACHE PATH "") -set(MPIEXEC_NUMPROC_FLAG -n CACHE PATH "") - - diff --git a/host-configs/chaos_5_x86_64_ib.cmake b/host-configs/chaos_5_x86_64_ib.cmake deleted file mode 120000 index 0f95da821..000000000 --- a/host-configs/chaos_5_x86_64_ib.cmake +++ /dev/null @@ -1 +0,0 @@ -chaos_5_x86_64_ib-gcc@4.9.3.cmake \ No newline at end of file diff --git a/host-configs/naples-darwin-x86_64-clang@3.4svn.cmake b/host-configs/naples-darwin-x86_64-clang@3.4svn.cmake deleted file mode 100644 index 4ead227d9..000000000 --- a/host-configs/naples-darwin-x86_64-clang@3.4svn.cmake +++ /dev/null @@ -1,62 +0,0 @@ -################################## -# uberenv host-config -################################## -# darwin-x86_64-clang@3.4svn -################################## - -# cmake from uberenv -# cmake exectuable path: /Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/cmake-3.3.1-derruj5rkiqrvcxmzh7bwiycyi2kidte/bin/cmake - -####### -# using clang@3.4svn compiler spec -####### - -# c compiler used by spack -set("CMAKE_C_COMPILER" "/usr/bin/clang" CACHE PATH "") - -# cpp compiler used by spack -set("CMAKE_CXX_COMPILER" "/usr/bin/clang++" CACHE PATH "") - -# fortran compiler used by spack -set("ENABLE_FORTRAN" "ON" CACHE PATH "") - -set("CMAKE_Fortran_COMPILER" "/usr/local/bin/gfortran" CACHE PATH "") - -# Python Support -# Enable python module builds -set("ENABLE_PYTHON" "ON" CACHE PATH "") - -# python from uberenv -set("PYTHON_EXECUTABLE" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/python-2.7.11-fmwboy225dowlzykfvloodfx2nuuskd5/bin/python" CACHE PATH "") - -# sphinx from uberenv -set("SPHINX_EXECUTABLE" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/python-2.7.11-fmwboy225dowlzykfvloodfx2nuuskd5/bin/sphinx-build" CACHE PATH "") - -# python3 from uberenv -#set("PYTHON_EXECUTABLE" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/python3-3.5.1-wgiw7dyijzienqtorbsmfyz7xgtvrsnz/bin/python3" CACHE PATH "") - -# sphinx from uberenv -#set("SPHINX_EXECUTABLE" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/python3-3.5.1-wgiw7dyijzienqtorbsmfyz7xgtvrsnz/bin/sphinx-build" CACHE PATH "") - -# MPI Support -set("ENABLE_MPI" "ON" CACHE PATH "") - -set("MPI_C_COMPILER" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/mpich-3.0.4-63ubtzf67gx6wcvrokynzxyokaudcj3m/bin/mpicc" CACHE PATH "") - -set("MPI_CXX_COMPILER" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/mpich-3.0.4-63ubtzf67gx6wcvrokynzxyokaudcj3m/bin/mpicc" CACHE PATH "") - -set("MPI_Fortran_COMPILER" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/mpich-3.0.4-63ubtzf67gx6wcvrokynzxyokaudcj3m/bin/mpif90" CACHE PATH "") - -set("MPIEXEC" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/mpich-3.0.4-63ubtzf67gx6wcvrokynzxyokaudcj3m/bin/mpiexec" CACHE PATH "") - -# I/O Packages - -# hdf5 from uberenv -set("HDF5_DIR" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/hdf5-1.8.17-pzxksxsggtm6ab72nbymwokfybp66boh" CACHE PATH "") - -# silo from uberenv -set("SILO_DIR" "/Users/harrison37/Work/conduit/uberenv_libs/spack/opt/spack/darwin-x86_64/clang-3.4svn/silo-4.10.1-5rka7esxmogsporir2fkg5dkrkgnywtj" CACHE PATH "") - -################################## -# end uberenv host-config -################################## diff --git a/setup.py b/setup.py index 9bb5ded0f..09a5b184b 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion -CONDUIT_VERSION = '0.8.6' +CONDUIT_VERSION = '0.8.7' class CMakeExtension(Extension): def __init__(self, name, sourcedir=''): diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4a85b8d77..963c30266 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,7 +15,7 @@ endif() # Conduit ################################ -project(conduit VERSION "0.8.6") +project(conduit VERSION "0.8.7") ################################ # Build Options diff --git a/src/docs/sphinx/blueprint_mesh.rst b/src/docs/sphinx/blueprint_mesh.rst index 5ebc2cfc5..e08abbe10 100644 --- a/src/docs/sphinx/blueprint_mesh.rst +++ b/src/docs/sphinx/blueprint_mesh.rst @@ -389,7 +389,7 @@ The following diagram illustrates a simple **polyhedral** topology: Mixed topologies with shapes/shape_map -++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++ The schema for a **mixed** shapes topology is as follows: @@ -1708,11 +1708,11 @@ them in ``<`` and ``>`` characters. An example expressions entry in the index is { "braid": { - ... + // ... }, "radial": { - ... + // ... }, "expressions": { @@ -1729,6 +1729,7 @@ them in ``<`` and ``>`` characters. An example expressions entry in the index is "definition": "{,recenter(,\"nodal\")}" } } + } .. Properties and Transforms .. --------------------------- diff --git a/src/docs/sphinx/blueprint_o2mrelation.rst b/src/docs/sphinx/blueprint_o2mrelation.rst index d71b357f1..31f10a9db 100644 --- a/src/docs/sphinx/blueprint_o2mrelation.rst +++ b/src/docs/sphinx/blueprint_o2mrelation.rst @@ -44,41 +44,44 @@ Properties, Queries, and Transforms Returns a ``std::vector`` object containing all of the data paths in the given **o2mrelation** node. - * Example: + * Example Input: .. code:: json - // Input // { - "values": [int64], - "sizes": [int64], - "offsets": [int32], - "other": [char8] + "values": // [int64], + "sizes": // [int64], + "offsets": // [int32], + "other": // [ char8] } - // Output // - ["values"] + * Example Output: + .. code:: json + + ["values"] * **conduit::blueprint::o2mrelation::compact_to(const Node &o2mrelation, Node &res)** Generates a data-compacted version of the given **o2mrelation** (first parameter) and stores it in the given output node (second parameter). - * Example: + * Example Input: .. code:: json - // Input // { - "values": [-1, 2, 3, -1, 0, 1, -1], - "sizes": [2, 2], + "values": [-1, 2, 3, -1, 0, 1, -1], + "sizes": [2, 2], "offsets": [4, 1] } - // Output // + * Example Output: + + .. code:: json + { - "values": [0, 1, 2, 3], - "sizes": [2, 2], + "values": [0, 1, 2, 3], + "sizes": [2, 2], "offsets": [0, 2] } diff --git a/src/docs/sphinx/building.rst b/src/docs/sphinx/building.rst index 62f834ea9..db5aa9228 100644 --- a/src/docs/sphinx/building.rst +++ b/src/docs/sphinx/building.rst @@ -188,14 +188,6 @@ To handle build options, third party library paths, etc we rely on CMake's initi We call these initial-cache files *host-config* files, since we typically create a file for each platform or specific hosts if necessary. -The ``config-build.sh`` script uses your machine's hostname, the SYS_TYPE environment variable, and your platform name (via *uname*) to look for an existing host config file in the ``host-configs`` directory at the root of the conduit repo. If found, it passes the host config file to CMake via the `-C` command line option. - -.. code:: bash - - cmake {other options} -C host-configs/{config_file}.cmake ../ - - -You can find example files in the ``host-configs`` directory. These files use standard CMake commands. To properly seed the cache, CMake *set* commands need to specify ``CACHE`` as follows: diff --git a/src/docs/sphinx/conf.py b/src/docs/sphinx/conf.py index 5f6731a72..ca647f781 100644 --- a/src/docs/sphinx/conf.py +++ b/src/docs/sphinx/conf.py @@ -69,9 +69,9 @@ # built documents. # # The short X.Y version. -version = '0.8.6' +version = '0.8.7' # The full version, including alpha/beta/rc tags. -release = '0.8.6' +release = '0.8.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/src/docs/sphinx/index.rst b/src/docs/sphinx/index.rst index 95fd0008e..49e104037 100644 --- a/src/docs/sphinx/index.rst +++ b/src/docs/sphinx/index.rst @@ -96,7 +96,6 @@ blueprint - Provides interfaces for common higher-level conventions and data exchange protocols (eg. describing a “mesh”) using Conduit. - *No optional dependencies* -See the :doc:`user` for more details on these libraries. Contributors ---------------- diff --git a/src/docs/sphinx/releases.rst b/src/docs/sphinx/releases.rst index 98ebb4675..d14d9a898 100644 --- a/src/docs/sphinx/releases.rst +++ b/src/docs/sphinx/releases.rst @@ -12,6 +12,67 @@ https://github.com/LLNL/conduit/releases .. note:: Conduit uses `BLT `__ as its core CMake build system. We leverage BLT as a git submodule, however github does not include submodule contents in its automatically created source tarballs. To avoid confusion, starting with v0.3.0 we provide our own source tarballs that include BLT. +v0.8.7 +--------------------------------- + +* `Source Tarball `__ + +Highlights +++++++++++++++++++++++++++++++++++++ + +(Extracted from Conduit's :download:`Changelog <../../../CHANGELOG.md>`) + + +Added +~~~~~ + + +* **General** + + * Added public default and copy constructor to DataAccessor. Enables more flexibility with initializing DataAccessors from Nodes. + * Added Node.name(), Node.path(), Schema.name(), and Schema.path() to Python API. + * Added Node.as_index_t_ptr() + * Added ``conduit::execution`` namespace, which contains ``for_all()`` and ``sort()`` functions. + * Added DataType support to the Fortran API + +* **Blueprint** + + * Added ``conduit::blueprint::mpi::mesh::distribute``, which enables sending mesh domains to arbitrary MPI ranks (suppo + * Added ``conduit::blueprint::mesh::utils::NDIndex`` class. Instantiate with shape, offset, and stride in array or conduit::Node. Get flatindex for N-D coordinates. + * Added ``conduit::blueprint::o2mrelation::O2MIndex`` class. Instantiate with O2M relation Node; get flatindex for a given one_index and many_index. Alternative to Java-style iterator. + * Added ``conduit::blueprint::examples::mesh::rz_cylinder`` function that generates example 2D cylindrical (RZ) meshes. + +Fixed +~~~~~ + + +* **General** + + * Fixed a logic issue undermining C++ type mapping when using CMake 3.26. + +* **Blueprint** + + * Performance improvements to Mesh Blueprint topology metadata, used by ``generate_points``, ``generate_sides``, etc. The class was rewritten and the old one was moved to ``conduit::blueprint::mesh::utils::reference::TopologyMetadata``. The new implementation is faster, often about 6-20x depending on options. + * Performance improvements to O2M Iterators. + * Performance improvements to functions that underpin centroid generation. + +* **Relay** + + * Fixed MPI baton logic error in ``conduit::relay::io::blueprint::save_mesh()`` that caused MPI tasks to serialize writes to files in the N domains to M files case. Fix restores parallel write performance. This bug did not impact cases where where N domains were written to N files (N to N) or N domains were written to a single file (N to 1). + +Changed +~~~~~~~ + + +* **General** + + * Changed diff of string types to respect null terminated strings instead of described length + * Improved diff_compatible of string types to look for substring match, to implement expected compatible semantics. + +* **Blueprint** + + * Changed the recommended axis order for 2D cylindrical meshes to be ``Z`` as the first axis, and ``R`` as the second. This choice aligns with expected visualization cases where ``Z`` varies with the horizontal axis and ``R`` varies with the vertical axis. + v0.8.6 --------------------------------- diff --git a/src/libs/blueprint/CMakeLists.txt b/src/libs/blueprint/CMakeLists.txt index 395251f0d..df540b69d 100644 --- a/src/libs/blueprint/CMakeLists.txt +++ b/src/libs/blueprint/CMakeLists.txt @@ -45,6 +45,7 @@ set(blueprint_headers conduit_blueprint_o2mrelation_iterator.hpp conduit_blueprint_o2mrelation_index.hpp conduit_blueprint_o2mrelation_examples.hpp + conduit_blueprint_ndarray_index.hpp conduit_blueprint_table.hpp conduit_blueprint_table_examples.hpp conduit_blueprint_zfparray.hpp @@ -87,6 +88,7 @@ set(blueprint_sources conduit_blueprint_o2mrelation_iterator.cpp conduit_blueprint_o2mrelation_index.cpp conduit_blueprint_o2mrelation_examples.cpp + conduit_blueprint_ndarray_index.cpp conduit_blueprint_table.cpp conduit_blueprint_table_examples.cpp conduit_blueprint_zfparray.cpp diff --git a/src/libs/blueprint/conduit_blueprint.hpp b/src/libs/blueprint/conduit_blueprint.hpp index bd56a875e..1bb10f683 100644 --- a/src/libs/blueprint/conduit_blueprint.hpp +++ b/src/libs/blueprint/conduit_blueprint.hpp @@ -27,6 +27,8 @@ #include "conduit_blueprint_o2mrelation_iterator.hpp" #include "conduit_blueprint_o2mrelation_index.hpp" +#include "conduit_blueprint_ndarray_index.hpp" + #include "conduit_blueprint_mcarray.hpp" #include "conduit_blueprint_mcarray_examples.hpp" diff --git a/src/libs/blueprint/conduit_blueprint_mesh.cpp b/src/libs/blueprint/conduit_blueprint_mesh.cpp index 82b345932..4d71872be 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh.cpp +++ b/src/libs/blueprint/conduit_blueprint_mesh.cpp @@ -81,7 +81,7 @@ struct ffloat64 // access conduit blueprint mesh utilities namespace bputils = conduit::blueprint::mesh::utils; // access one-to-many index types -namespace O2MIndex = conduit::blueprint::o2mrelation; +namespace o2mrelation = conduit::blueprint::o2mrelation; // typedefs for verbose but commonly used types typedef std::tuple DomMapsTuple; diff --git a/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp b/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp index e511cd8c4..474fdfc87 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp +++ b/src/libs/blueprint/conduit_blueprint_mesh_examples.cpp @@ -2039,8 +2039,8 @@ braid_mixed_2d(const int32 npts_x, 1, res["coordsets/coords"]); - const int32 nele_x = npts_x - 1; - const int32 nele_y = npts_y - 1; + const index_t nele_x = npts_x - 1; + const index_t nele_y = npts_y - 1; res["topologies/mesh/type"] = "unstructured"; res["topologies/mesh/coordset"] = "coords"; @@ -2056,10 +2056,10 @@ braid_mixed_2d(const int32 npts_x, * |/--|---|/--|---|/--|>>> */ - const int32 nele_x2 = nele_x / 2; - const int32 nquads = nele_y * nele_x2; - const int32 ntris = nele_y * 2 * (nele_x2 + nele_x % 2); - const int32 nele = nquads + ntris; + const index_t nele_x2 = nele_x / 2; + const index_t nquads = nele_y * nele_x2; + const index_t ntris = nele_y * 2 * (nele_x2 + nele_x % 2); + const index_t nele = nquads + ntris; Node &elements = res["topologies/mesh/elements"]; elements["shapes"].set(DataType::int32(nele)); @@ -2073,11 +2073,11 @@ braid_mixed_2d(const int32 npts_x, offsets[0] = 0; int32 *connectivity = elements["connectivity"].value(); - size_t idx_elem(0); - size_t idx(0); - for(int32 j = 0; j < nele_y ; ++j) + index_t idx_elem(0); + index_t idx(0); + for(index_t j = 0; j < nele_y ; ++j) { - for(int32 i = 0; i < nele_x; ++i) + for(index_t i = 0; i < nele_x; ++i) { if (i%2==0) { diff --git a/src/libs/blueprint/conduit_blueprint_mesh_matset_xforms.cpp b/src/libs/blueprint/conduit_blueprint_mesh_matset_xforms.cpp index 4c90279f8..87860b61c 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh_matset_xforms.cpp +++ b/src/libs/blueprint/conduit_blueprint_mesh_matset_xforms.cpp @@ -28,7 +28,7 @@ using namespace conduit; // access conduit blueprint mesh utilities namespace bputils = conduit::blueprint::mesh::utils; // access one-to-many index types -namespace O2MIndex = conduit::blueprint::o2mrelation; +namespace o2mrelation = conduit::blueprint::o2mrelation; //----------------------------------------------------------------------------- // -- begin conduit -- @@ -173,7 +173,7 @@ to_silo(const conduit::Node &field, } blueprint::o2mrelation::O2MIterator mat_iter(mat_vfs); - matset_num_elems = mat_iter.elements(O2MIndex::ONE); + matset_num_elems = mat_iter.elements(o2mrelation::ONE); } const index_t mset_num_elems = matset_num_elems; @@ -194,9 +194,9 @@ to_silo(const conduit::Node &field, } blueprint::o2mrelation::O2MIterator mat_iter(matset); - while(mat_iter.has_next(O2MIndex::DATA)) + while(mat_iter.has_next(o2mrelation::DATA)) { - const index_t elem_ind_index = mat_iter.next(O2MIndex::ONE); + const index_t elem_ind_index = mat_iter.next(o2mrelation::ONE); // -- get element id -- // // this is either "elem_ind_index" from the o2m, or @@ -212,11 +212,11 @@ to_silo(const conduit::Node &field, // we now have the element index, find all material indicies // using the o2m-many iter - mat_iter.to_front(O2MIndex::MANY); - while(mat_iter.has_next(O2MIndex::MANY)) + mat_iter.to_front(o2mrelation::MANY); + while(mat_iter.has_next(o2mrelation::MANY)) { - mat_iter.next(O2MIndex::MANY); - const index_t mat_ind_index = mat_iter.index(O2MIndex::DATA); + mat_iter.next(o2mrelation::MANY); + const index_t mat_ind_index = mat_iter.index(o2mrelation::DATA); // this index now allows us to fetch the // vol frac diff --git a/src/libs/blueprint/conduit_blueprint_mesh_topology_metadata.cpp b/src/libs/blueprint/conduit_blueprint_mesh_topology_metadata.cpp index 7351b2391..6462b6c92 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh_topology_metadata.cpp +++ b/src/libs/blueprint/conduit_blueprint_mesh_topology_metadata.cpp @@ -1355,7 +1355,7 @@ class TopologyMetadata::Implementation : public TopologyMetadataBase index_t child_entity_id = ents.first[j]; func(levels[level], localIdx); size_t nextLevel = level + 1; - if(nextLevel < static_cast(levels.size())) + if(nextLevel < levels.size()) { iterate_global_map_levels(child_entity_id, levels, nextLevel, localIdx, func); @@ -3257,7 +3257,7 @@ TopologyMetadata::Implementation::to_json() const { conduit::Node rep; make_node(rep); - return std::move(rep.to_json()); + return rep.to_json(); } //--------------------------------------------------------------------------- @@ -3494,7 +3494,7 @@ TopologyMetadata::make_node(conduit::Node &rep) const std::string TopologyMetadata::to_json() const { - return std::move(impl->to_json()); + return impl->to_json(); } //--------------------------------------------------------------------------- diff --git a/src/libs/blueprint/conduit_blueprint_mesh_utils.cpp b/src/libs/blueprint/conduit_blueprint_mesh_utils.cpp index fc73e3f26..da8c9387b 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh_utils.cpp +++ b/src/libs/blueprint/conduit_blueprint_mesh_utils.cpp @@ -30,7 +30,7 @@ #include "conduit_blueprint_mesh_utils.hpp" // access one-to-many index types -namespace O2MIndex = conduit::blueprint::o2mrelation; +namespace o2mrelation = conduit::blueprint::o2mrelation; //----------------------------------------------------------------------------- // -- begin conduit -- @@ -342,116 +342,6 @@ find_domain_id(const Node &node) return domain_id; } - -//----------------------------------------------------------------------------- -NDIndex::NDIndex(const Node& idx) : - NDIndex(&idx) -{ } - -//----------------------------------------------------------------------------- -NDIndex::NDIndex(const Node* idx) : - m_dim(0) -{ - // TODO: error if idx has no child "shape" - // TODO: error if shape, offset, and stride differ in length - - if (idx->has_child("shape")) - { - m_shape_acc = (*idx)["shape"].as_index_t_accessor(); - m_dim = m_shape_acc.number_of_elements(); - } - - if (idx->has_child("offset")) - { - m_offset_acc = (*idx)["offset"].as_index_t_accessor(); - } - - if (idx->has_child("stride")) - { - m_stride_acc = (*idx)["stride"].as_index_t_accessor(); - } -} - -//---------------------------------------------------------------------------// -NDIndex::NDIndex(const index_t dim, const index_t* shape, const index_t* offset, const index_t* stride) : - m_dim(dim) -{ - // TODO Error if dim < 1 - // TODO Error if shape is NULL - - m_shape_acc = index_t_accessor(shape, DataType::index_t(dim)); - - if (offset) - { - m_offset_acc = index_t_accessor(offset, DataType::index_t(dim)); - } - - if (stride) - { - m_stride_acc = index_t_accessor(stride, DataType::index_t(dim)); - } -} - -//---------------------------------------------------------------------------// -NDIndex::NDIndex(const NDIndex& idx) : - m_dim(idx.m_dim), - m_shape_acc(idx.m_shape_acc), - m_offset_acc(idx.m_offset_acc), - m_stride_acc(idx.m_stride_acc) -{ } - -//---------------------------------------------------------------------------// -NDIndex& -NDIndex::operator=(const NDIndex& idx) -{ - if (this != &idx) - { - this->m_shape_acc = idx.m_shape_acc; - this->m_offset_acc = idx.m_offset_acc; - this->m_stride_acc = idx.m_stride_acc; - this->m_dim = idx.m_dim; - } - return *this; -} - -void NDIndex::info(Node& res) const -{ - index_t dim = ndims(); - res["shape"].set(DataType::index_t(dim)); - res["offset"].set(DataType::index_t(dim)); - res["stride"].set(DataType::index_t(dim)); - - index_t* p_shape = res["shape"].as_index_t_ptr(); - index_t* p_offset = res["offset"].as_index_t_ptr(); - index_t* p_stride = res["stride"].as_index_t_ptr(); - for (index_t d = 0; d < dim; ++d) - { - p_shape[d] = shape(d); - p_offset[d] = offset(d); - p_stride[d] = stride(d); - } - - // shape is always required, so we don't report user_provided/shape - - if (m_offset_acc.number_of_elements() < 1) - { - res["user_provided/offset"] = "false"; - } - else - { - res["user_provided/offset"] = "true"; - } - - if (m_stride_acc.number_of_elements() < 1) - { - res["user_provided/stride"] = "false"; - } - else - { - res["user_provided/stride"] = "true"; - } -} - //----------------------------------------------------------------------------- // -- begin conduit::blueprint::mesh::utils::connectivity -- //----------------------------------------------------------------------------- @@ -1799,12 +1689,12 @@ topology::unstructured::points(const Node &n, index_t_accessor eidxs_vals = ntemp["elements/connectivity"].value(); o2mrelation::O2MIterator eiter(ntemp["elements"]); - eiter.to(ei, O2MIndex::ONE); - eiter.to_front(O2MIndex::MANY); - while(eiter.has_next(O2MIndex::MANY)) + eiter.to(ei, o2mrelation::ONE); + eiter.to_front(o2mrelation::MANY); + while(eiter.has_next(o2mrelation::MANY)) { - eiter.next(O2MIndex::MANY); - const index_t tmp = eidxs_vals[eiter.index(O2MIndex::DATA)]; + eiter.next(o2mrelation::MANY); + const index_t tmp = eidxs_vals[eiter.index(o2mrelation::DATA)]; eidxs.insert(tmp); } } @@ -1813,12 +1703,12 @@ topology::unstructured::points(const Node &n, o2mrelation::O2MIterator piter(enode); for(const index_t eidx : eidxs) { - piter.to(eidx, O2MIndex::ONE); - piter.to_front(O2MIndex::MANY); - while(piter.has_next(O2MIndex::MANY)) + piter.to(eidx, o2mrelation::ONE); + piter.to_front(o2mrelation::MANY); + while(piter.has_next(o2mrelation::MANY)) { - piter.next(O2MIndex::MANY); - const index_t tmp = pidxs_vals[piter.index(O2MIndex::DATA)]; + piter.next(o2mrelation::MANY); + const index_t tmp = pidxs_vals[piter.index(o2mrelation::DATA)]; pidxs.insert(tmp); } } diff --git a/src/libs/blueprint/conduit_blueprint_mesh_utils.hpp b/src/libs/blueprint/conduit_blueprint_mesh_utils.hpp index fb27d7448..425d6d74b 100644 --- a/src/libs/blueprint/conduit_blueprint_mesh_utils.hpp +++ b/src/libs/blueprint/conduit_blueprint_mesh_utils.hpp @@ -215,202 +215,6 @@ CONDUIT_BLUEPRINT_API const Node * find_reference_node(const Node &node, const s //----------------------------------------------------------------------------- index_t CONDUIT_BLUEPRINT_API find_domain_id(const Node &node); -//----------------------------------------------------------------------------- -/// -/// class: conduit::blueprint::mesh::utils::NDIndex -/// -/// description: -/// General purpose index for strided structured meshes. -/// -//----------------------------------------------------------------------------- -class CONDUIT_BLUEPRINT_API NDIndex -{ -public: - //----------------------------------------------------------------------------- - // - // -- conduit::blueprint::mesh::utils::NDIndex public members -- - // - //----------------------------------------------------------------------------- - - //----------------------------------------------------------------------------- - /// NDIndex Construction and Destruction - //----------------------------------------------------------------------------- - // Copy constructor. - NDIndex(const NDIndex& idx); - - /// Primary index constructor. - NDIndex(const Node* node); - - /// Primary index constructor. The argument node should contain numeric - /// children, all of length equal to the array's dimensionality: - /// - shape (required) specifies the shape of the array to index - /// - offset (optional) specifies where the data starts in the array - /// - stride (optional) specifies the extent of the array storing data - /// - /// The shape is required. It is an error if shape is omitted. - /// If offset is not specified, it defaults to 0 in each dimension. - /// If stride is not specified, it defaults to - /// \code - /// stride[0] = 1 - /// stride[i] = stride[i-1] * (offset[i-1] + shape[i-1]) - /// \endcode - /// Node that offset is specified in terms of logical index, not - /// flatindex, and stride is specified in terms of flatindex. Also note - /// that the default stride holds an assumption that the data is laid - /// out in C-style, with fastest-varying dimension left-most. Users may - /// specify a custom stride to index Fortran-style arrays, where the - /// fastest-varying index is right-most. - /// - /// Here are a few examples: - /// - /// - A 6x4 array - /// \code - /// shape: [6, 4] - /// \endcode - /// - A 6x4 array with two extra elements at the end of each row - /// \code - /// shape: [6, 4] - /// stride: [1, 8] - /// \endcode - /// - A 6x4 array with two elements of padding on the low end of a - /// dimension and one element of padding on the high end - /// \code - /// shape: [6, 4] - /// offset: [2, 2] - /// stride: [1, 9] - /// \endcode - /// - A 6x4x5 array with two elements of padding on the low end of each - /// dimension and one element of padding on the high end (adds third - /// dimension to previous) - /// \code - /// shape: [6, 4, 5] - /// offset: [2, 2, 2] - /// stride: [1, 9, 63] - /// \endcode - /// - A Fortran 6x4x5 array with two elements of padding on the low - /// end of each dimension and one element of padding on the high end - /// (previous example changed to column-major) - /// \code - /// shape: [6, 4, 5] - /// offset: [2, 2, 2] - /// stride: [63, 7, 1] - /// \endcode - NDIndex(const Node& node); - - /// Array constructor - NDIndex(const index_t dim, const index_t* shape, const index_t* offset = NULL, const index_t* stride = NULL); - - /// Destructor - ~NDIndex() { }; - - /// Assignment operator. - NDIndex& operator=(const NDIndex& itr); - - //----------------------------------------------------------------------------- - /// Retrieve a flat-index: public interface. - //----------------------------------------------------------------------------- - template - index_t index(T idx, Ts... idxs) const; - template - index_t index(T idx) const; - - /// Returns the number of dimensions - index_t ndims() const; - - /// Returns the extent of this NDIndex for dimension dim. - index_t shape(index_t dim) const; - - /// Returns the logical index in dimension dim where the data starts. - index_t offset(index_t dim) const; - - /// Returns the stride along dimension dim. - index_t stride(index_t dim) const; - - //----------------------------------------------------------------------------- - /// Human readable info about this iterator - //----------------------------------------------------------------------------- - void info(Node& res) const; - -private: - - //----------------------------------------------------------------------------- - // - // -- conduit::blueprint::mesh::utils::NDIndex private members -- - // - //----------------------------------------------------------------------------- - - /// Accessors for shape, offset, and stride - index_t_accessor m_shape_acc; - index_t_accessor m_offset_acc; - index_t_accessor m_stride_acc; - - /// Dimension (length of shape, offset, and stride nodes) - index_t m_dim; -}; - -template -index_t -NDIndex::index(T idx, Ts... idxs) const -{ - index_t depth = m_dim - sizeof...(idxs) - 1; - index_t component = (offset(depth) + idx) * stride(depth); - return component + index(idxs...); -} - -template -index_t -NDIndex::index(T idx) const -{ - index_t depth = m_dim - 1; - index_t component = (offset(depth) + idx) * stride(depth); - return component; -} - -inline -index_t -NDIndex::shape(index_t dim) const -{ - return m_shape_acc[dim]; -} - -inline -index_t -NDIndex::offset(index_t dim) const -{ - if (m_offset_acc.number_of_elements() < 1) - { - return 0; - } - return m_offset_acc[dim]; -} - -inline -index_t -NDIndex::stride(index_t dim) const -{ - if (m_stride_acc.number_of_elements() < 1) - { - index_t acc = 1; - for (int d = 0; d < dim && d < m_dim; ++d) - { - acc = acc * (m_shape_acc[d] + offset(d)); - } - return acc; - } - return m_stride_acc[dim]; -} - -inline -index_t -NDIndex::ndims() const -{ - return m_dim; -} - - -//----------------------------------------------------------------------------- -// -- end conduit::blueprint::mesh::utils::O2MIndex -- -//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // -- begin conduit::blueprint::mesh::utils::connectivity -- diff --git a/src/libs/blueprint/conduit_blueprint_mpi_mesh_parmetis.cpp b/src/libs/blueprint/conduit_blueprint_mpi_mesh_parmetis.cpp index 9558a893b..3a8a0ba37 100644 --- a/src/libs/blueprint/conduit_blueprint_mpi_mesh_parmetis.cpp +++ b/src/libs/blueprint/conduit_blueprint_mpi_mesh_parmetis.cpp @@ -679,7 +679,7 @@ void generate_partition_field(conduit::Node &mesh, // first lets get eldist setup: - // eldist[0] = 0,\ + // eldist[0] = 0 // eldist[1] == # of elements on rank 0- // eldist[2] == # of elemens on rank 0 + rank 1 // ... diff --git a/src/libs/blueprint/conduit_blueprint_ndarray_index.cpp b/src/libs/blueprint/conduit_blueprint_ndarray_index.cpp new file mode 100644 index 000000000..0ccfd590d --- /dev/null +++ b/src/libs/blueprint/conduit_blueprint_ndarray_index.cpp @@ -0,0 +1,180 @@ +// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit +// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and +// other details. No copyright assignment is required to contribute to Conduit. + +//----------------------------------------------------------------------------- +/// +/// file: conduit_blueprint_ndarray_index.cpp +/// +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// conduit includes +//----------------------------------------------------------------------------- +#include "conduit_blueprint_ndarray_index.hpp" + +//----------------------------------------------------------------------------- +// -- begin conduit -- +//----------------------------------------------------------------------------- +namespace conduit +{ + +//----------------------------------------------------------------------------- +// -- begin conduit::blueprint -- +//----------------------------------------------------------------------------- +namespace blueprint +{ + +//----------------------------------------------------------------------------- +// -- begin conduit::blueprint::ndarray -- +//----------------------------------------------------------------------------- +namespace ndarray +{ + +//----------------------------------------------------------------------------- +NDIndex::NDIndex() +: m_ndim(0) +{ +// empty // +} + +//----------------------------------------------------------------------------- +NDIndex::NDIndex(const Node& idx) +: NDIndex(&idx) +{ +// empty // +} + +//----------------------------------------------------------------------------- +NDIndex::NDIndex(const Node* idx) +: m_ndim(0), + m_shape_acc(), + m_offset_acc(), + m_stride_acc() +{ + // TODO: error if idx has no child "shape" + // TODO: error if shape, offset, and stride differ in length + + if (idx->has_child("shape")) + { + m_shape_acc = (*idx)["shape"].as_index_t_accessor(); + m_ndim = m_shape_acc.number_of_elements(); + } + + if (idx->has_child("offset")) + { + m_offset_acc = (*idx)["offset"].as_index_t_accessor(); + } + + if (idx->has_child("stride")) + { + m_stride_acc = (*idx)["stride"].as_index_t_accessor(); + } +} + +//---------------------------------------------------------------------------// +NDIndex::NDIndex(const index_t ndim, + const index_t* shape, + const index_t* offset, + const index_t* stride) +: m_ndim(ndim) +{ + // TODO Error if dim < 1 + // TODO Error if shape is NULL + + m_shape_acc = index_t_accessor(shape, DataType::index_t(ndim)); + + if (offset) + { + m_offset_acc = index_t_accessor(offset, DataType::index_t(ndim)); + } + + if (stride) + { + m_stride_acc = index_t_accessor(stride, DataType::index_t(ndim)); + } +} + +//---------------------------------------------------------------------------// +NDIndex::NDIndex(const NDIndex& idx) +: m_ndim(idx.m_ndim), + m_shape_acc(idx.m_shape_acc), + m_offset_acc(idx.m_offset_acc), + m_stride_acc(idx.m_stride_acc) +{ +// empty // +} + +//---------------------------------------------------------------------------// +NDIndex& +NDIndex::operator=(const NDIndex& idx) +{ + if (this != &idx) + { + this->m_ndim = idx.m_ndim; + this->m_shape_acc = idx.m_shape_acc; + this->m_offset_acc = idx.m_offset_acc; + this->m_stride_acc = idx.m_stride_acc; + } + return *this; +} + +//---------------------------------------------------------------------------// +void +NDIndex::info(Node& res) const +{ + index_t dim = ndims(); + res["shape"].set(DataType::index_t(dim)); + res["offset"].set(DataType::index_t(dim)); + res["stride"].set(DataType::index_t(dim)); + + index_t* p_shape = res["shape"].as_index_t_ptr(); + index_t* p_offset = res["offset"].as_index_t_ptr(); + index_t* p_stride = res["stride"].as_index_t_ptr(); + for (index_t d = 0; d < dim; ++d) + { + p_shape[d] = shape(d); + p_offset[d] = offset(d); + p_stride[d] = stride(d); + } + + // shape is always required, so we don't report user_provided/shape + + if (m_offset_acc.number_of_elements() < 1) + { + res["user_provided/offset"] = "false"; + } + else + { + res["user_provided/offset"] = "true"; + } + + if (m_stride_acc.number_of_elements() < 1) + { + res["user_provided/stride"] = "false"; + } + else + { + res["user_provided/stride"] = "true"; + } +} + +//----------------------------------------------------------------------------- +// -- end conduit::blueprint::ndarray::NDIndex +//----------------------------------------------------------------------------- + +} +//----------------------------------------------------------------------------- +// -- end conduit::blueprint::ndarray +//----------------------------------------------------------------------------- + +} +//----------------------------------------------------------------------------- +// -- end conduit::blueprint -- +//----------------------------------------------------------------------------- + +} +//----------------------------------------------------------------------------- +// -- end conduit:: -- +//----------------------------------------------------------------------------- + diff --git a/src/libs/blueprint/conduit_blueprint_ndarray_index.hpp b/src/libs/blueprint/conduit_blueprint_ndarray_index.hpp new file mode 100644 index 000000000..94e953a2d --- /dev/null +++ b/src/libs/blueprint/conduit_blueprint_ndarray_index.hpp @@ -0,0 +1,273 @@ +// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit +// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and +// other details. No copyright assignment is required to contribute to Conduit. + +//----------------------------------------------------------------------------- +/// +/// file: conduit_blueprint_ndarray_index.hpp +/// +//----------------------------------------------------------------------------- + +#ifndef CONDUIT_BLUEPRINT_NDARRAY_INDEX_HPP +#define CONDUIT_BLUEPRINT_NDARRAY_INDEX_HPP + +//----------------------------------------------------------------------------- +// std includes +//----------------------------------------------------------------------------- +#include +#include +#include +#include + +//----------------------------------------------------------------------------- +// conduit lib includes +//----------------------------------------------------------------------------- +#include "conduit.hpp" +#include "conduit_blueprint_exports.h" + +//----------------------------------------------------------------------------- +// -- begin conduit -- +//----------------------------------------------------------------------------- +namespace conduit +{ + +//----------------------------------------------------------------------------- +// -- begin conduit::blueprint -- +//----------------------------------------------------------------------------- +namespace blueprint +{ + +//----------------------------------------------------------------------------- +// -- begin conduit::blueprint::ndarray -- +//----------------------------------------------------------------------------- +namespace ndarray +{ + +//----------------------------------------------------------------------------- +/// +/// class: conduit::blueprint::ndarray::NDIndex +/// +/// description: +/// General purpose index for NDArrays +/// +//----------------------------------------------------------------------------- +class CONDUIT_BLUEPRINT_API NDIndex +{ +public: + //----------------------------------------------------------------------------- + // + // -- NDIndex public members -- + // + //----------------------------------------------------------------------------- + + //----------------------------------------------------------------------------- + /// NDIndex Construction and Destruction + //----------------------------------------------------------------------------- + NDIndex(); + + // Copy constructor. + NDIndex(const NDIndex& idx); + + /// Primary index constructor. + NDIndex(const Node* node); + + /// Primary index constructor. The argument node should contain numeric + /// children, all of length equal to the array's dimensionality: + /// - shape (required) specifies the shape of the array to index + /// - offset (optional) specifies where the data starts in the array + /// - stride (optional) specifies the extent of the array storing data + /// + /// The shape is required. It is an error if shape is omitted. + /// If offset is not specified, it defaults to 0 in each dimension. + /// If stride is not specified, it defaults to + /// \code + /// stride[0] = 1 + /// stride[i] = stride[i-1] * (offset[i-1] + shape[i-1]) + /// \endcode + /// Node that offset is specified in terms of logical index, not + /// flatindex, and stride is specified in terms of flatindex. Also note + /// that the default stride holds an assumption that the data is laid + /// out in C-style, with fastest-varying dimension left-most. Users may + /// specify a custom stride to index Fortran-style arrays, where the + /// fastest-varying index is right-most. + /// + /// Here are a few examples: + /// + /// - A 6x4 array + /// \code + /// shape: [6, 4] + /// \endcode + /// - A 6x4 array with two extra elements at the end of each row + /// \code + /// shape: [6, 4] + /// stride: [1, 8] + /// \endcode + /// - A 6x4 array with two elements of padding on the low end of a + /// dimension and one element of padding on the high end + /// \code + /// shape: [6, 4] + /// offset: [2, 2] + /// stride: [1, 9] + /// \endcode + /// - A 6x4x5 array with two elements of padding on the low end of each + /// dimension and one element of padding on the high end (adds third + /// dimension to previous) + /// \code + /// shape: [6, 4, 5] + /// offset: [2, 2, 2] + /// stride: [1, 9, 63] + /// \endcode + /// - A Fortran 6x4x5 array with two elements of padding on the low + /// end of each dimension and one element of padding on the high end + /// (previous example changed to column-major) + /// \code + /// shape: [6, 4, 5] + /// offset: [2, 2, 2] + /// stride: [63, 7, 1] + /// \endcode + NDIndex(const Node& node); + + /// Array constructor + NDIndex(const index_t ndim, + const index_t* shape, + const index_t* offset = NULL, + const index_t* stride = NULL); + + /// Destructor + ~NDIndex() { }; + + /// Assignment operator. + NDIndex& operator=(const NDIndex& itr); + + //----------------------------------------------------------------------------- + /// Retrieve a flat-index: public interface. + //----------------------------------------------------------------------------- + template + index_t index(T idx, Ts... idxs) const; + template + index_t index(T idx) const; + + /// Returns the number of dimensions + index_t ndims() const; + + /// Returns the extent of this NDIndex for dimension dim. + index_t shape(index_t dim) const; + + /// Returns the logical index in dimension dim where the data starts. + index_t offset(index_t dim) const; + + /// Returns the stride along dimension dim. + index_t stride(index_t dim) const; + + //----------------------------------------------------------------------------- + /// Human readable info about this iterator + //----------------------------------------------------------------------------- + void info(Node& res) const; + +private: + + //----------------------------------------------------------------------------- + // + // -- conduit::blueprint::mesh::utils::NDIndex private members -- + // + //----------------------------------------------------------------------------- + + /// Dimension (length of shape, offset, and stride nodes) + index_t m_ndim; + + /// Accessors for shape, offset, and stride + index_t_accessor m_shape_acc; + index_t_accessor m_offset_acc; + index_t_accessor m_stride_acc; + +}; + +//----------------------------------------------------------------------------- +template +index_t +NDIndex::index(T idx, Ts... idxs) const +{ + index_t depth = m_ndim - sizeof...(idxs) - 1; + index_t component = (offset(depth) + idx) * stride(depth); + return component + index(idxs...); +} + +//----------------------------------------------------------------------------- +template +index_t +NDIndex::index(T idx) const +{ + index_t depth = m_ndim - 1; + index_t component = (offset(depth) + idx) * stride(depth); + return component; +} + +//----------------------------------------------------------------------------- +inline +index_t +NDIndex::shape(index_t dim) const +{ + return m_shape_acc[dim]; +} + +//----------------------------------------------------------------------------- +inline +index_t +NDIndex::offset(index_t dim) const +{ + if (m_offset_acc.number_of_elements() < 1) + { + return 0; + } + return m_offset_acc[dim]; +} + +//----------------------------------------------------------------------------- +inline +index_t +NDIndex::stride(index_t dim) const +{ + if (m_stride_acc.number_of_elements() < 1) + { + index_t acc = 1; + for (int d = 0; d < dim && d < m_ndim; ++d) + { + acc = acc * (m_shape_acc[d] + offset(d)); + } + return acc; + } + return m_stride_acc[dim]; +} + +//----------------------------------------------------------------------------- +inline +index_t +NDIndex::ndims() const +{ + return m_ndim; +} + + +//----------------------------------------------------------------------------- +// -- end conduit::blueprint::ndarray::NDIndex -- +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +} +//----------------------------------------------------------------------------- +// -- end conduit::blueprint::ndarray -- +//----------------------------------------------------------------------------- + + +} +//----------------------------------------------------------------------------- +// -- end conduit::blueprint -- +//----------------------------------------------------------------------------- + +} +//----------------------------------------------------------------------------- +// -- end conduit:: -- +//----------------------------------------------------------------------------- + + +#endif diff --git a/src/libs/blueprint/conduit_blueprint_o2mrelation_index.cpp b/src/libs/blueprint/conduit_blueprint_o2mrelation_index.cpp index 2159e1d43..7ae519d2b 100644 --- a/src/libs/blueprint/conduit_blueprint_o2mrelation_index.cpp +++ b/src/libs/blueprint/conduit_blueprint_o2mrelation_index.cpp @@ -43,6 +43,11 @@ namespace o2mrelation // O2MIndex Construction and Destruction //----------------------------------------------------------------------------- +//---------------------------------------------------------------------------// +O2MIndex::O2MIndex() +{ +// empty // +} //---------------------------------------------------------------------------// O2MIndex::O2MIndex(const Node *node) diff --git a/src/libs/blueprint/conduit_blueprint_o2mrelation_index.hpp b/src/libs/blueprint/conduit_blueprint_o2mrelation_index.hpp index 003d8dbf4..8daf7e8e0 100644 --- a/src/libs/blueprint/conduit_blueprint_o2mrelation_index.hpp +++ b/src/libs/blueprint/conduit_blueprint_o2mrelation_index.hpp @@ -58,6 +58,9 @@ class CONDUIT_BLUEPRINT_API O2MIndex //----------------------------------------------------------------------------- /// O2MIndex Construction and Destruction //----------------------------------------------------------------------------- + /// Default constructor. + O2MIndex(); + /// Copy constructor. O2MIndex(const O2MIndex &idx); diff --git a/src/libs/conduit/conduit_execution_omp.hpp b/src/libs/conduit/conduit_execution_omp.hpp index 06ef53b87..8a1700d2e 100644 --- a/src/libs/conduit/conduit_execution_omp.hpp +++ b/src/libs/conduit/conduit_execution_omp.hpp @@ -45,12 +45,12 @@ struct for_policy inline void operator()(index_t begin, index_t end, Func &&func) { #if defined(_OPENMP) - #pragma message("omp::for_policy -> OMP") +// #pragma message("omp::for_policy -> OMP") #pragma omp parallel for for(index_t i = begin; i < end; i++) func(i); #else - #pragma message("omp::for_policy -> serial") +// #pragma message("omp::for_policy -> serial") for(index_t i = begin; i < end; i++) func(i); #endif @@ -63,7 +63,7 @@ struct sort_policy template inline void operator()(Iterator begin, Iterator end) { - #pragma message("omp::sort_policy -> serial") + // #pragma message("omp::sort_policy -> serial") // TODO: implement an OpenMP sort like in RAJA. std::sort(begin, end); // This is only allowed in C++14 or later. @@ -74,7 +74,7 @@ struct sort_policy inline void operator()(Iterator begin, Iterator end, Predicate &&predicate) { // TODO: implement an OpenMP sort like in RAJA. - #pragma message("omp::sort_policy -> serial") + // #pragma message("omp::sort_policy -> serial") std::sort(begin, end, predicate); } }; diff --git a/src/libs/relay/conduit_relay_io_blueprint.cpp b/src/libs/relay/conduit_relay_io_blueprint.cpp index b5834aea4..25d90cb9c 100644 --- a/src/libs/relay/conduit_relay_io_blueprint.cpp +++ b/src/libs/relay/conduit_relay_io_blueprint.cpp @@ -2073,6 +2073,12 @@ void read_mesh(const std::string &root_file_path, 0, mpi_comm); } +#else + // non MPI case, throw error + if(error == 1) + { + CONDUIT_ERROR(error_oss.str()); + } #endif // make sure we have a valid bp index diff --git a/src/tests/blueprint/CMakeLists.txt b/src/tests/blueprint/CMakeLists.txt index 74acf3b65..e915f90ae 100644 --- a/src/tests/blueprint/CMakeLists.txt +++ b/src/tests/blueprint/CMakeLists.txt @@ -14,10 +14,10 @@ set(BLUEPRINT_TESTS t_blueprint_smoke t_blueprint_mcarray_examples t_blueprint_o2mrelation_verify t_blueprint_o2mrelation_examples + t_blueprint_ndarray_index t_blueprint_mesh_verify t_blueprint_mesh_transform t_blueprint_mesh_partition - t_blueprint_mesh_index t_blueprint_mesh_query t_blueprint_mesh_relay t_blueprint_mesh_generate diff --git a/src/tests/blueprint/t_blueprint_mesh_examples.cpp b/src/tests/blueprint/t_blueprint_mesh_examples.cpp index 7f4e9ea8c..6b22c7137 100644 --- a/src/tests/blueprint/t_blueprint_mesh_examples.cpp +++ b/src/tests/blueprint/t_blueprint_mesh_examples.cpp @@ -1532,13 +1532,13 @@ TEST(conduit_blueprint_mesh_examples, rz_cylinder) res), conduit::Error); - EXPECT_THROW( conduit::blueprint::mesh::examples::rz_cylinder("garbage", + EXPECT_THROW( conduit::blueprint::mesh::examples::rz_cylinder("uniform", 0, 0, res), conduit::Error); - EXPECT_THROW( conduit::blueprint::mesh::examples::rz_cylinder("garbage", + EXPECT_THROW( conduit::blueprint::mesh::examples::rz_cylinder("uniform", -1, 10, res), diff --git a/src/tests/blueprint/t_blueprint_mesh_index.cpp b/src/tests/blueprint/t_blueprint_ndarray_index.cpp similarity index 84% rename from src/tests/blueprint/t_blueprint_mesh_index.cpp rename to src/tests/blueprint/t_blueprint_ndarray_index.cpp index 610d3b6c4..6cc687c32 100644 --- a/src/tests/blueprint/t_blueprint_mesh_index.cpp +++ b/src/tests/blueprint/t_blueprint_ndarray_index.cpp @@ -10,7 +10,7 @@ #include "conduit.hpp" #include "conduit_blueprint.hpp" -#include "conduit_blueprint_mesh_utils.hpp" +#include "conduit_blueprint_ndarray_index.hpp" // #include // #include @@ -19,13 +19,18 @@ #include "gtest/gtest.h" using namespace conduit; -namespace meshutils = conduit::blueprint::mesh::utils; +namespace ndarray = conduit::blueprint::ndarray; /// Index Tests /// //----------------------------------------------------------------------------- -int calcFlatIndex(index_t x, index_t y, index_t z, const index_t dim, - const index_t* shape, const index_t* offset, const index_t* stride) +int calcFlatIndex(index_t x, + index_t y, + index_t z, + const index_t dim, + const index_t* shape, + const index_t* offset, + const index_t* stride) { int retval = 0; retval += (offset[0] + x) * stride[0]; @@ -38,8 +43,10 @@ int calcFlatIndex(index_t x, index_t y, index_t z, const index_t dim, } //----------------------------------------------------------------------------- -void verify2DCoords(meshutils::NDIndex idx, - const index_t* shape, const index_t* offset, const index_t* stride) +void verify2DCoords(ndarray::NDIndex idx, + const index_t* shape, + const index_t* offset, + const index_t* stride) { const int DUMMY = -1; @@ -62,8 +69,10 @@ void verify2DCoords(meshutils::NDIndex idx, } //----------------------------------------------------------------------------- -void verify3DCoords(meshutils::NDIndex idx, - const index_t* shape, const index_t* offset, const index_t* stride) +void verify3DCoords(ndarray::NDIndex idx, + const index_t* shape, + const index_t* offset, + const index_t* stride) { int dim = 3; EXPECT_EQ(idx.ndims(), dim); @@ -86,7 +95,7 @@ void verify3DCoords(meshutils::NDIndex idx, EXPECT_EQ(idx.index(5, 2, 1), calcFlatIndex(5, 2, 1, dim, shape, offset, stride)); } -void verifyEquality(const meshutils::NDIndex& idx1, const meshutils::NDIndex& idx2) +void verifyEquality(const ndarray::NDIndex& idx1, const ndarray::NDIndex& idx2) { ASSERT_EQ(idx1.ndims(), idx2.ndims()); @@ -100,12 +109,15 @@ void verifyEquality(const meshutils::NDIndex& idx1, const meshutils::NDIndex& id } } -void verifyNodeCtors(Node& parms, const index_t dim, - const index_t* shape, const index_t* offset, const index_t* stride) +void verifyNodeCtors(Node& parms, + const index_t dim, + const index_t* shape, + const index_t* offset, + const index_t* stride) { { SCOPED_TRACE("Node reference"); - meshutils::NDIndex idx(parms); + ndarray::NDIndex idx(parms); Node info; idx.info(info); @@ -114,7 +126,7 @@ void verifyNodeCtors(Node& parms, const index_t dim, { SCOPED_TRACE("Copy ctor of Node reference"); - meshutils::NDIndex idx2(idx); + ndarray::NDIndex idx2(idx); verify3DCoords(idx2, shape, offset, stride); } @@ -122,7 +134,7 @@ void verifyNodeCtors(Node& parms, const index_t dim, { SCOPED_TRACE("Node pointer"); - meshutils::NDIndex idx(&parms); + ndarray::NDIndex idx(&parms); Node info; idx.info(info); @@ -132,7 +144,7 @@ void verifyNodeCtors(Node& parms, const index_t dim, } //----------------------------------------------------------------------------- -TEST(conduit_blueprint_mesh_index, copy_ctor) +TEST(conduit_blueprint_ndarray_index, copy_ctor) { constexpr index_t dim = 3; constexpr index_t dx = 7; @@ -150,14 +162,14 @@ TEST(conduit_blueprint_mesh_index, copy_ctor) shape[1] = dy; shape[2] = dz; - meshutils::NDIndex idx(parms); - meshutils::NDIndex idx2(idx); + ndarray::NDIndex idx(parms); + ndarray::NDIndex idx2(idx); verifyEquality(idx, idx2); } //----------------------------------------------------------------------------- -TEST(conduit_blueprint_mesh_index, ctor_shape) +TEST(conduit_blueprint_ndarray_index, ctor_shape) { constexpr index_t dim = 3; constexpr index_t dx = 7; @@ -180,7 +192,7 @@ TEST(conduit_blueprint_mesh_index, ctor_shape) { SCOPED_TRACE("Pointer"); - meshutils::NDIndex idx(dim, p_shape); + ndarray::NDIndex idx(dim, p_shape); Node info; idx.info(info); @@ -190,7 +202,7 @@ TEST(conduit_blueprint_mesh_index, ctor_shape) } //----------------------------------------------------------------------------- -TEST(conduit_blueprint_mesh_index, ctor_shape_stride) +TEST(conduit_blueprint_ndarray_index, ctor_shape_stride) { constexpr index_t dim = 3; constexpr index_t dx = 7; @@ -221,14 +233,14 @@ TEST(conduit_blueprint_mesh_index, ctor_shape_stride) { SCOPED_TRACE("Pointer"); - meshutils::NDIndex idx(dim, p_shape, NULL, p_stride); + ndarray::NDIndex idx(dim, p_shape, NULL, p_stride); verify3DCoords(idx, p_shape, p_offset, p_stride); } } //----------------------------------------------------------------------------- -TEST(conduit_blueprint_mesh_index, ctor_shape_offset) +TEST(conduit_blueprint_ndarray_index, ctor_shape_offset) { constexpr index_t dim = 3; constexpr index_t dx = 7; @@ -259,14 +271,14 @@ TEST(conduit_blueprint_mesh_index, ctor_shape_offset) { SCOPED_TRACE("Pointer"); - meshutils::NDIndex idx(dim, p_shape, p_offset, NULL); + ndarray::NDIndex idx(dim, p_shape, p_offset, NULL); verify3DCoords(idx, p_shape, p_offset, p_stride); } } //----------------------------------------------------------------------------- -TEST(conduit_blueprint_mesh_index, ctor_shape_offset_stride) +TEST(conduit_blueprint_ndarray_index, ctor_shape_offset_stride) { constexpr index_t dim = 3; constexpr index_t dx = 7; @@ -305,14 +317,14 @@ TEST(conduit_blueprint_mesh_index, ctor_shape_offset_stride) { SCOPED_TRACE("Pointer"); - meshutils::NDIndex idx(dim, p_shape, p_offset, p_stride); + ndarray::NDIndex idx(dim, p_shape, p_offset, p_stride); verify3DCoords(idx, p_shape, p_offset, p_stride); } } //----------------------------------------------------------------------------- -TEST(conduit_blueprint_mesh_index, twoD) +TEST(conduit_blueprint_ndarray_index, twoD) { constexpr index_t dim = 2; constexpr index_t dx = 7; @@ -324,12 +336,12 @@ TEST(conduit_blueprint_mesh_index, twoD) const index_t p_offset[dim]{ ox, oy }; const index_t p_stride[dim]{ 1, dx + ox }; - meshutils::NDIndex idx(dim, p_shape, p_offset); + ndarray::NDIndex idx(dim, p_shape, p_offset); verify2DCoords(idx, p_shape, p_offset, p_stride); } -TEST(conduit_blueprint_mesh_index, assignment) +TEST(conduit_blueprint_ndarray_index, assignment) { // First make a 2D index, with pointers. Verify it. Make a copy. constexpr index_t dim2 = 2; @@ -342,10 +354,10 @@ TEST(conduit_blueprint_mesh_index, assignment) const index_t p_offset2[dim2]{ ox2, oy2 }; const index_t p_stride2[dim2]{ 1, dx2 + ox2 }; - meshutils::NDIndex idxA(dim2, p_shape2, p_offset2); + ndarray::NDIndex idxA(dim2, p_shape2, p_offset2); verify2DCoords(idxA, p_shape2, p_offset2, p_stride2); - meshutils::NDIndex idxB(idxA); + ndarray::NDIndex idxB(idxA); verify2DCoords(idxB, p_shape2, p_offset2, p_stride2); // Then make a 3D index, with a node. Verify that. @@ -381,7 +393,7 @@ TEST(conduit_blueprint_mesh_index, assignment) stride[1] = sy; stride[2] = sz; - meshutils::NDIndex idxC(parms); + ndarray::NDIndex idxC(parms); verify3DCoords(idxC, p_shape, p_offset, p_stride); // Now assign the 3D index to the first 2D index. diff --git a/src/tests/conduit/fortran/t_f_conduit_node_datatype.f90 b/src/tests/conduit/fortran/t_f_conduit_node_datatype.f90 index 4b70a0906..46efdbd39 100644 --- a/src/tests/conduit/fortran/t_f_conduit_node_datatype.f90 +++ b/src/tests/conduit/fortran/t_f_conduit_node_datatype.f90 @@ -8,8 +8,6 @@ ! !------------------------------------------------------------------------------ -#include "conduit_fortran_bitwidth_style_types.inc" - !------------------------------------------------------------------------------ module t_f_conduit_node_datatype !------------------------------------------------------------------------------