{"id":23832037,"url":"https://github.com/csdms/bmi-example-cxx","last_synced_at":"2026-02-28T17:32:09.833Z","repository":{"id":47395738,"uuid":"220350979","full_name":"csdms/bmi-example-cxx","owner":"csdms","description":"An example of wrapping a model written in C++ with a BMI","archived":false,"fork":false,"pushed_at":"2025-09-22T17:12:24.000Z","size":77,"stargazers_count":2,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-22T19:17:10.712Z","etag":null,"topics":["bmi","csdms","cxx"],"latest_commit_sha":null,"homepage":"https://bmi.csdms.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csdms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-07T23:57:25.000Z","updated_at":"2025-09-22T17:12:23.000Z","dependencies_parsed_at":"2022-08-27T21:00:09.846Z","dependency_job_id":"3ce8c244-c56f-47b8-9d08-5d3baa7f7a04","html_url":"https://github.com/csdms/bmi-example-cxx","commit_stats":{"total_commits":80,"total_committers":3,"mean_commits":"26.666666666666668","dds":0.35,"last_synced_commit":"07c3dd518ddcd7db50e22be0db6ff3fc067053fb"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/csdms/bmi-example-cxx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-cxx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-cxx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-cxx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-cxx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/bmi-example-cxx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-cxx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29944766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmi","csdms","cxx"],"created_at":"2025-01-02T14:17:02.758Z","updated_at":"2026-02-28T17:32:09.796Z","avatar_url":"https://github.com/csdms.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Basic Model Interface](https://img.shields.io/badge/CSDMS-Basic%20Model%20Interface-green.svg)](https://bmi.readthedocs.io/)\n[![Build/Test](https://github.com/csdms/bmi-example-cxx/actions/workflows/test.yml/badge.svg)](https://github.com/csdms/bmi-example-cxx/actions/workflows/test.yml)\n\n# bmi-example-cxx\n\nAn example of implementing the\n[C++ bindings](https://github.com/csdms/bmi-cxx)\nfor the CSDMS\n[Basic Model Interface](https://bmi.readthedocs.io) (BMI).\n\n\n## Overview\n\nThis is an example of implementing a BMI for a simple model\nthat solves the diffusion equation\non a uniform rectangular plate\nwith Dirichlet boundary conditions.\nThe model and its BMI are written in C++.\nTests of the BMI are provided.\n\nThis repository is organized with the following directories:\n\n\u003cdl\u003e\n    \u003cdt\u003eheat\u003c/dt\u003e\n\t\u003cdd\u003eHolds the model, the BMI for the model, and a sample main program\u003c/dd\u003e\n\t\u003cdt\u003etesting\u003c/dt\u003e\n\t\u003cdd\u003eTests that cover the BMI of the model\u003c/dd\u003e\n\u003c/dl\u003e\n\n## Build/Install\n\nThis example can be built on Linux, macOS, and Windows.\n\n**Prerequisites:**\n* A C++ compiler\n* CMake\n* pkg-config\n* The C++ BMI bindings. Follow the build and install directions\n  given in the\n  [README](https://github.com/csdms/bmi-cxx/blob/master/README.md)\n  in that repository. You can choose to install them from source or\n  through a conda binary.\n\n### Linux and macOS\n\nTo build and install this example from source with cmake,\nusing the current C++ BMI version, run\n\n    mkdir _build \u0026\u0026 cd _build\n    export PKG_CONFIG_PATH=\u003cpath-to-installation\u003e  # optional: only needed for non-standard install location\n    cmake .. -DCMAKE_INSTALL_PREFIX=\u003cpath-to-installation\u003e\n    make\n    make install\n\nwhere `\u003cpath-to-installation\u003e` is the base directory\nin which the C++ BMI bindings have been installed\n(`/usr/local` is the default).\nWhen installing into a conda environment,\nuse the `$CONDA_PREFIX` environment variable.\n\nThe installation will look like\n(on macOS, using v2.0 of the BMI specification):\n\n```bash\n.\n|-- bin\n|   `-- run_bmiheatcxx\n|-- include\n|   |-- bmi.hxx\n|   |-- heat.hxx\n|   `-- bmi_heat.hxx\n`-- lib\n    |-- libbmiheatcxx.dylib\n    |-- libheatcxx.dylib\n    `-- pkgconfig\n        |-- bmicxx.pc\n        |-- heatcxx.pc\n        `-- bmiheatcxx.pc\n\n4 directories, 9 files\n```\n\nFrom the build directory,\nrun unit tests on the sample implementation with\n\n    ctest\n\n### Windows\n\nAn additional prerequisite is needed for Windows:\n\n* Microsoft Visual Studio 2017 or Microsoft Build Tools for Visual Studio 2017\n\nTo configure this example from source with cmake\nusing the current C++ BMI version,\nrun the following in a [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)\n\n    mkdir _build \u0026\u0026 cd _build\n    set \"PKG_CONFIG_PATH=\u003cpath-to-installation\u003e\"  \u0026:: optional: only needed for non-standard install location\n    cmake .. ^\n\t  -G \"NMake Makefiles\" ^\n\t  -DCMAKE_INSTALL_PREFIX=\u003cpath-to-installation\u003e ^\n\t  -DCMAKE_BUILD_TYPE=Release\n\nwhere `\u003cpath-to-installation\u003e` is the base directory\nin which the C++ BMI bindings have been installed.\nThe default is `\"C:\\Program Files (x86)\"`.\nNote that quotes and an absolute path are needed.\nWhen using a conda environment, use `\"%CONDA_PREFIX%\\Library\"`.\n\nThen, to build and install:\n\n\tcmake --build . --target install --config Release\n\nFrom the build directory,\nrun unit tests on the sample implementation with\n\n    ctest\n\n\n## Use\n\nRun the heat model through its BMI with the `run_bmiheatcxx` program,\nwhich takes a model configuration file\n(see the [testing](./testing) directory for a sample)\nas a required parameter.\nIf `run_bmiheatcxx` is in your path, run it with\n\n    run_bmiheatcxx config.txt\n\nOutput from the model is written to the file **bmiheatcxx.out**\nin the current directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-example-cxx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fbmi-example-cxx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-example-cxx/lists"}