{"id":26005383,"url":"https://github.com/precice/precice.jl","last_synced_at":"2025-08-03T23:05:51.606Z","repository":{"id":39922849,"uuid":"392340711","full_name":"precice/PreCICE.jl","owner":"precice","description":"Julia language bindings for preCICE","archived":false,"fork":false,"pushed_at":"2024-04-08T15:22:39.000Z","size":113,"stargazers_count":12,"open_issues_count":5,"forks_count":2,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-02-22T11:06:48.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/precice.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},"funding":{"custom":"https://precice.org/community-support-precice"}},"created_at":"2021-08-03T14:12:58.000Z","updated_at":"2025-01-17T13:08:10.000Z","dependencies_parsed_at":"2024-01-24T16:25:25.607Z","dependency_job_id":"dcb0056f-c927-4554-b3a5-50e83d3e2502","html_url":"https://github.com/precice/PreCICE.jl","commit_stats":{"total_commits":94,"total_committers":6,"mean_commits":"15.666666666666666","dds":0.5,"last_synced_commit":"95ee249138b0333fcfff07e06cddf7278ba98f4a"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2FPreCICE.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2FPreCICE.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2FPreCICE.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2FPreCICE.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precice","download_url":"https://codeload.github.com/precice/PreCICE.jl/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242103939,"owners_count":20072368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-03-05T20:53:45.950Z","updated_at":"2025-03-05T20:53:46.653Z","avatar_url":"https://github.com/precice.png","language":"Julia","funding_links":["https://precice.org/community-support-precice"],"categories":[],"sub_categories":[],"readme":"# PreCICE.jl\n\n\u003ca style=\"text-decoration: none\" href=\"https://github.com/precice/julia-bindings/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/precice/julia-bindings.svg\" alt=\"GNU GPL license\"\u003e\n\u003c/a\u003e\n\nThis package provides Julia language bindings for the C++ library [preCICE](https://github.com/precice/precice). It is a Julia package that wraps the API of preCICE.\n\nNote that the first two digits of the version number of the bindings indicate the preCICE major and minor version that the bindings support. The last digit represents the version of the bindings. Example: `v2.5.1` and `v2.5.2` of the bindings represent versions `1` and `2` of the bindings that are compatible with preCICE `v2.5.0`.\n\nTechnical information about the initial design of these bindings can be found in the [Bachelor thesis of Pavel Kharitenko](http://dx.doi.org/10.18419/opus-11836).\n\n## Adding and using the package\n\nThe Julia bindings for preCICE can be used by either by adding them as a package in a Julia environment or also directly including the package in a Julia script. For both type of usages preCICE needs to be installed on the system. For preCICE installation, have a look at the [installation documentation](https://precice.org/installation-overview.html).\n\n### Adding the package\n\nAdd the Julia bindings to the Julia environment in the following way:\n\n```julia\njulia\u003e ]\npkg\u003e add PreCICE \nThen exit the package mode with 🔙 or Ctrl + c\njulia\u003e using PreCICE\n```\n\nAlternatively you can also include the package in a Julia script in the following way:\n\n```julia\nimport Pkg; Pkg.add(\"PreCICE\")\nusing PreCICE\n```\n\n### Adding the package from a local folder\n\nIf you have cloned or downloaded the Julia bindings on your local machine, add the Julia bindings to your Julia environment in the following way:\n\n```julia-repl\njulia\u003e ]\npkg\u003e add \u003cpath-to-repository\u003e\nThen exit the package mode with 🔙 or Ctrl + c\njulia\u003e using PreCICE\n```\n\nAlternatively, you can install a specific branch of this repository with the following command:\n\n```julia-repl\npkg\u003e add https://github.com/precice/PreCICE.jl#\u003cbranch-name\u003e\n```\n\n## Troubleshooting\n\n### Custom preCICE installation path\n\nIf preCICE is installed at a custom path, errors of the form ```ERROR: could not load library \"/...\"``` can occur after adding the Julia bindings package. Make sure the preCICE library is in the system library path through `echo $LD_LIBRARY_PATH` and otherwise update the variable with the correct path.\n\n```bash\n~$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\u003cpath-to-precice.so\u003e\n```\n\nA different way to fix this error is to set the custom path of the preCICE installation through the environment variable `PRECICE_JL_BINARY`. Afterwards you need to rebuild this package:\n\n```julia-repl\n~$ export PRECICE_JL_BINARY=/usr/lib/x86_64-linux-gnu/\n~$ julia (--project)\njulia\u003e ]\npkg\u003e build PreCICE\njulia\u003e using PreCICE\n...\n```\n\n### Incompatible version of libstdc++\n\nIf you get an error message like:\n\n```julia-repl\nERROR: LoadError: could not load library \"libprecice\"\n/usr/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/local/lib/libprecice.so)\n```\n\nIt is caused by an incompatible version of `libstdc++` as described [in the issue](https://github.com/precice/PreCICE.jl/issues/44#issuecomment-1259655654). Julia ships its own libraries, which are older than the ones shipped by the system or the ones used to compile preCICE.\n\nAs a first solution, consider updating your julia version. The versions used in Julia are fairly up to date and should work with older systems. The problem is also known to the developers of Julia and they are [working on a solution](https://github.com/JuliaGL/GLFW.jl/issues/198). From Julia `v1.8.3` on, the problem [should be fixed](https://github.com/JuliaLang/julia/pull/46976).\n\nIf you cannot update your julia version, or the problem persists, you can try preloading the system `libstdc++`:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\nPreload the system `libstdc++` with\n\n```bash\nLD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 julia\n```\n\nYou may have to [compile preCICE from source](https://precice.org/installation-source-preparation.html) for this to work.\n\nOn newer systems, preloading only the system `libstdc++` may not be sufficient. Errors of the form\n\n```julia-repl\nERROR: ERROR: LoadError: LoadError: could not load library \"libprecice\"\n/path/to/julia-1.8.1/bin/../lib/julia/libcurl.so: version `CURL_OPENSSL_4' not found (required by /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103)could not load library \"libprecice\"\n/path/to/julia-1.8.1/bin/../lib/julia/libcurl.so: version `CURL_OPENSSL_4' not found (required by /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103)\n```\n\ncan be resolved by preloading the system `libcurl`:\n\n```bash\nLD_PRELOAD=\"/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libcurl.so.4\" julia\n```\n\nAgain, you may have to [compile preCICE from source](https://precice.org/installation-source-preparation.html).\n\nAdding the following lines to your `~/.bashrc` will help to avoid this error in the future:\n\n```bash\nalias julia='LD_PRELOAD=\"/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libcurl.so.4\" julia'\n```\n\nYou could instead move the julia libraries out of the way and create a symlink to the system libraries:\n\n```bash\nmv /path/to/julia/lib/julia/libstdc++.so.6 /path/to/julia/lib/julia/libstdc++.so.6.bak\nln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /path/to/julia/lib/julia/libstdc++.so.6\n```\n\nIf the above approaches do not work, you may have to [compile preCICE from source](https://precice.org/installation-source-preparation.html) using the version of `libstdc++` that is shipped with Julia.\n\u003c/details\u003e\n\n## Usage\n\nThe [solverdummy](https://github.com/precice/julia-bindings/tree/main/solverdummy) shows an example of how to use the Julia bindings for preCICE.\n\n## Testing PreCICE.jl\n\nTo test the bindings, run:\n\n```julia-repl\njulia\u003e ]\npkg\u003e test PreCICE\n```\n\nThis checks if the preCICE bindings can be found and accessed correctly.\nYou can also test the full functionality of PreCICE.jl. If not set up, the output of the previous test shows an info on what command you need to execute. It will be along the lines of:\n\n```bash\ncd /home/\u003cuser\u003e/.julia/packages/PreCICE/\u003ccode\u003e/test \u0026\u0026 make\n```\n\nAfter this, you can run the tests again, resulting individual 22 tests being executed.\n\n## Dependencies\n\nThis package works with official Julia binaries listed below. See the [Platform Specific Instructions for official Binaries](https://julialang.org/downloads/platform/)  or [Julia's documentation](https://docs.julialang.org/en/v1/manual/getting-started/) if you are not sure how to download them.\n\n## Supported versions\n\nThe package is actively tested for Julia versions `1.8.0`, `1.9.0`, and `1.10.0`. Julia versions prior to `1.6.0` are not supported.\n\n[Unofficial Julia binaries](https://julialang.org/downloads/platform/#platform_specific_instructions_for_unofficial_binaries) may not be compatible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fprecice.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecice%2Fprecice.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fprecice.jl/lists"}