{"id":21044346,"url":"https://github.com/trixi-framework/talk-2024-juliacon-libtrixi","last_synced_at":"2026-02-19T01:32:30.695Z","repository":{"id":248035485,"uuid":"823024149","full_name":"trixi-framework/talk-2024-juliacon-libtrixi","owner":"trixi-framework","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-11T23:49:12.000Z","size":5179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-10-24T10:09:23.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trixi-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-07-02T09:28:19.000Z","updated_at":"2024-07-11T23:49:15.000Z","dependencies_parsed_at":"2024-07-12T01:47:29.800Z","dependency_job_id":"d62a8c30-2a23-4d92-a14d-1e0a4bc5b97f","html_url":"https://github.com/trixi-framework/talk-2024-juliacon-libtrixi","commit_stats":null,"previous_names":["trixi-framework/talk-2024-juliacon-libtrixi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trixi-framework/talk-2024-juliacon-libtrixi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2024-juliacon-libtrixi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2024-juliacon-libtrixi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2024-juliacon-libtrixi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2024-juliacon-libtrixi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trixi-framework","download_url":"https://codeload.github.com/trixi-framework/talk-2024-juliacon-libtrixi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2024-juliacon-libtrixi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"ssl_error","status_checked_at":"2026-02-19T00:59:36.936Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-11-19T14:16:29.439Z","updated_at":"2026-02-19T01:32:30.661Z","avatar_url":"https://github.com/trixi-framework.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# libtrixi: Serving legacy Fortran codes with simulations in Julia\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)\n\nThis is the companion repository for the talk\n\n**Serving legacy Fortran codes with simulations in Julia**\n[*Gregor Gassner*](https://www.mi.uni-koeln.de/NumSim/gregor-gassner/),\n[*Benedict Geihe*](https://www.mi.uni-koeln.de/NumSim/dr-benedict-geihe/),\n[*Michael Schlottke-Lakemper*](https://lakemper.eu)\n\n[Juliacon2024](https://juliacon.org/2024), Eindhoven, the Netherlands, 9th to 13th July 2024\n\n## Abstract\nWith [libtrixi](https://github.com/trixi-framework/libtrixi) we present a blueprint for connecting established\nresearch codes to modern software packages written in Julia without sacrificing performance. Specifically,\n[libtrixi](https://github.com/trixi-framework/libtrixi) provides an API to [Trixi.jl](https://github.com/trixi-framework/Trixi.jl),\na Julia package for adaptive numerical simulations of conservation laws.\n\n## Slides\nThe slides can be downloaded [here](slides.pdf).\n\n## Reproducibility\n\nThe instructions are written based on the supercomputer\n[JUWELS](https://www.fz-juelich.de/en/ias/jsc/systems/supercomputers/juwels), operated at\nJülich Supercomputing Centre, on which the results presented on the poster were obtained.\n\n### Getting started\n\nThe following standard software packages need to be made available locally before installing\n[libtrixi](https://github.com/trixi-framework/libtrixi):\n* C compiler with support for C11 or later (e.g., [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/))\n  (we used GCC v12.3.0)\n* Fortran compiler with support for Fortran 2018 or later (e.g., [Gfortran](https://gcc.gnu.org/fortran/))\n  (we used Gfortran v12.3.0)\n* [CMake](https://cmake.org/)\n  (we used cmake v3.26.3)\n* MPI (e.g., [Open MPI](https://www.open-mpi.org/) or [MPICH](https://www.mpich.org/))\n  (we used Open MPI v4.1.5)\n* [HDF5](https://www.hdfgroup.org/solutions/hdf5/)\n  (we used parallel HDF5 v1.14.2)\n* [Julia](https://julialang.org/downloads/platform/)\n  (it is advised to use tarballs from the official website or the `juliaup` manager, we used v1.10.3)\n* [Paraview](https://paraview.org) for visualization\n  (we used v5.12.0)\n\nThe following software packages require manual compilation and installation. To simplify\nthe installation instructions, we assume that the environment variable `WORKDIR` was set to the\ndirectory, where all the code is downloaded to and compiled, and `PREFIX` was set to an installation\nprefix. For example,\n```shell\nexport WORKDIR=$HOME/repro-poster-2024-pasc-libtrixi\nexport PREFIX=$WORKDIR/install\n```\n\n\n#### t8code\n\nt8code is a meshing library which is used in `Trixi.jl`. The source code can be obtained from the official\n[website](https://github.com/DLR-AMR/t8code). Here is an example for compiling and installing it (we used v2.0.0):\n\n```shell\ncd $WORKDIR\ngit clone --branch 'v2.0.0' --depth 1 https://github.com/DLR-AMR/t8code.git\ncd t8code\ngit submodule init\ngit submodule update\n./bootstrap\n./configure --prefix=\"${PREFIX}/t8code\" \\\n            CFLAGS=\"-Wall -O2\" \\\n            CXXFLAGS=\"-Wall -O2\" \\\n            --enable-mpi \\\n            CXX=mpicxx \\\n            CC=mpicc \\\n            --enable-static \\\n            --without-blas \\\n            --without-lapack\nmake\nmake install\n```\n\n\n#### libtrixi\n\nHere is an example for compiling and installing `libtrixi` (we used v0.1.5):\n\n```shell\ncd $WORKDIR\ngit clone --branch 'v0.1.5' --depth 1 https://github.com/trixi-framework/libtrixi.git\ncd libtrixi\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release \\\n      -DCMAKE_INSTALL_PREFIX=${PREFIX}/libtrixi ..\nmake\nmake install\n```\n\nA separate Julia project for use with libtrixi has to be set up:\n\n```shell\nmkdir ${PREFIX}/libtrixi-julia\ncd ${PREFIX}/libtrixi-julia\n${PREFIX}/libtrixi/bin/libtrixi-init-julia \\\n  --t8code-library ${PREFIX}/t8code/lib/libt8.so \\\n  ${PREFIX}/libtrixi\n```\n\nTo exactly reproduce the results presented on the poster, the provided [Manifest.toml](Manifest.toml)\ncan be used to install the same package versions for all Julia dependencies:\n\n```shell\ncp Manifest.toml ${PREFIX}/libtrixi-julia/\ncd ${PREFIX}/libtrixi-julia\nJULIA_DEPOT_PATH=./julia-depot \\\n  julia --project=. -e 'import Pkg; Pkg.instantiate()'\n```\n\nAlternatively all packages can be updated to the most recent version on demand:\n\n```shell\ncd ${PREFIX}/libtrixi-julia\nJULIA_DEPOT_PATH=./julia-depot \\\n  julia --project=. -e 'import Pkg; Pkg.update()'\n```\n\n\n#### Trixi2Vtk\n\n[Trixi2Vtk](https://github.com/trixi-framework/Trixi2Vtk.jl)\nneeds to be installed for later post processing (we used v0.3.15):\n\n```shell\ncd ${PREFIX}/libtrixi-julia\nJULIA_DEPOT_PATH=./julia-depot \\\n  julia --project=. -e 'import Pkg; Pkg.add(name=\"Trixi2Vtk\", version=\"0.3.15\")'\n```\n\n\n### Running the baroclinic instability simulation\n\nThe julia scripts for setting up simulations (*libelixirs*) can be found in the examples folder:\n```shell\nexport EXAMPLES=$PREFIX/libtrixi/share/libtrixi/LibTrixi.jl/examples\n```\n\nFor the results on the poster the resolution of the computational mesh was increased. For\nthis, modify line 128 of\n`${EXAMPLES}/libelixir_p4est3d_euler_baroclinic_instability.jl`\nsuch that `initial_refinement_level = 1`.\n\nWe used the following SLURM script to launch the simulation on JUWELS:\n```shell\n#!/bin/bash -x\n#SBATCH --nodes=128\n#SBATCH --ntasks-per-node=48\n\nmodule purge\nmodule load GCC\nmodule load OpenMPI\nmodule load HDF5/1.14.2\n\nsrun -n \"${SLURM_NTASKS}\" \\\n  ${PREFIX}/libtrixi/bin/trixi_controller_simple_f \\\n  ${PREFIX}/libtrixi-julia \\\n  ${EXAMPLES}/libelixir_p4est3d_euler_baroclinic_instability.jl\n```\n\nOutput files will be written to `./out_baroclinic` and need to be post processed:\n\n```shell\ncd ${PREFIX}/libtrixi/out_bubble\nJULIA_DEPOT_PATH=${PREFIX}/libtrixi-julia/julia-depot \\\n   julia --project=${PREFIX}/libtrixi-julia -e 'using Trixi2Vtk; trixi2vtk(\"solution*.h5\")'\n```\n\nThe results can now be viewed using, e.g., paraview.\nWe used [slice_surface.pvsm](slice_surface.pvsm) to generate our results.\n\n\n## Authors\nThis repository was initiated by\n[Benedict Geihe](https://www.mi.uni-koeln.de/NumSim/dr-benedict-geihe/)\nand [Michael Schlottke-Lakemper](https://lakemper.eu).\n\n\n## License\nThe contents of this repository are licensed under the MIT license (see [LICENSE.md](LICENSE.md)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrixi-framework%2Ftalk-2024-juliacon-libtrixi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrixi-framework%2Ftalk-2024-juliacon-libtrixi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrixi-framework%2Ftalk-2024-juliacon-libtrixi/lists"}