{"id":18897777,"url":"https://github.com/zurutech/stand","last_synced_at":"2025-04-12T04:11:46.114Z","repository":{"id":102565496,"uuid":"448791371","full_name":"zurutech/stand","owner":"zurutech","description":"StAnD: A Dataset of Linear Static Analysis Problems","archived":false,"fork":false,"pushed_at":"2022-01-27T10:58:22.000Z","size":63,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T04:11:41.005Z","etag":null,"topics":["benchmark-suite","dataset","engineering","linear-solvers","static-analysis","structure"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zurutech.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}},"created_at":"2022-01-17T07:19:56.000Z","updated_at":"2024-12-11T07:45:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4f5bf6f-d624-4a40-92dc-a2179381a49e","html_url":"https://github.com/zurutech/stand","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fstand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fstand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fstand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurutech%2Fstand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurutech","download_url":"https://codeload.github.com/zurutech/stand/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514206,"owners_count":21116903,"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":["benchmark-suite","dataset","engineering","linear-solvers","static-analysis","structure"],"created_at":"2024-11-08T08:39:31.417Z","updated_at":"2025-04-12T04:11:46.089Z","avatar_url":"https://github.com/zurutech.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StAnD: A Dataset of Linear Static Analysis Problems\n\n[[Abstract](https://arxiv.org/abs/2201.05356)]\n[[Paper](https://arxiv.org/pdf/2201.05356.pdf)]\n\nStatic analysis of structures is a fundamental step for determining the stability of structures. Both linear and non-linear static analyses consist of the resolution of sparse linear systems obtained by the finite element method.\nThe development of fast and optimized solvers for sparse linear systems appearing in structural engineering requires data to compare existing approaches, tune algorithms or to evaluate new ideas.\nWe introduce the Static Analysis Dataset (StAnD) containing 303.000 static analysis problems obtained applying realistic loads to simulated frame structures. \nAlong with the dataset, we publish a detailed benchmark comparison of the running time of existing solvers both on CPU and GPU. We release the code used to generate the dataset and benchmark existing solvers on Github.\nTo the best of our knowledge, this is the largest dataset for static analysis problems and it is the first public dataset of sparse linear systems (containing both the matrix and a realistic constant term).\n\n---\n\n## How to download the dataset\n\nStAnD is publicly hosted on Google Cloud Storage in 3 separate .zip files:\none archive for every part of the dataset i.e. small, medium and large problems.\nEvery problem is saved in a separate `.npz` file.\nEvery `.zip` file contains 2 folders:\n- `stand_\u003csize\u003e_train`: training set composed of 100.000 `\u003csize\u003e` problems;\n- `stand_\u003csize\u003e_test`: test set composed of 1.000 `\u003csize\u003e` problems;\nwhere `\u003csize\u003e` is `small`, `medium` or `large`.\n\nThe dataset can be downloaded through `gsutil`\n```\ngsutil cp gs://zurutech-public-datasets/stand/stand_small.zip .\ngsutil cp gs://zurutech-public-datasets/stand/stand_medium.zip .\ngsutil cp gs://zurutech-public-datasets/stand/stand_large.zip .\n```\nor using the public URLs:\n- [StAnD (Small problems)](https://storage.googleapis.com/zurutech-public-datasets/stand/stand_small.zip);\n- [StAnD (Medium problems)](https://storage.googleapis.com/zurutech-public-datasets/stand/stand_medium.zip);\n- [StAnD (Large problems)](https://storage.googleapis.com/zurutech-public-datasets/stand/stand_large.zip).\n\nThe 3 parts of StAnD are also available on Kaggle:\n- https://www.kaggle.com/zurutech/stand-small-problems\n- https://www.kaggle.com/zurutech/stand-medium-problems\n- https://www.kaggle.com/zurutech/stand-large-problems\n\n## How to load a .npz file\n\nThe code below shows how to read correctly a `.npz` file whose path is stored in variable `path` to restore the linear system.\n\n```python\n# Read system file and build sparse stiffness matrix\nwith np.load(path) as system:\n    u = system[\"x\"]\n    f = system[\"b\"]\n    K = scipy.sparse.coo_matrix(\n        (system[\"A_values\"], list(system[\"A_indices\"])),\n        shape=(u.size, u.size)\n    )\n\n# Check K * u = f\nif(np.allclose(K.dot(u), f)):\n    print(\"Everything is correct!\")\nelse:\n    print(\"There is something wrong!\")\n```\n\n## Replicating benchmark results\n\nReplicating the results is essential. For this reason, we created a docker image ready to use.\n\n**NOTE**: the benchmarks require a NVIDIA GPU, therefore you need to configure the docker NVIDIA runtime.\n\n1. Pull the docker image\n\n```\nsudo docker pull europe-west3-docker.pkg.dev/machine-learning-199407/structures/stand:latest\n```\n\n2. Download a dataset in the `datasets` subdirectory of the repository.\n\n```bash\nmkdir datasets\ncd datasets\nwget https://storage.googleapis.com/zurutech-public-datasets/stand/stand_small.zip\nunzip stand_small.zip\ncd ..\n```\n\n3. Run an interactive shell mounting the repository (where this README is) in the `/home/aur/env` folder\n\n```bash\nsudo docker run -it \\\n           -v $(pwd):/home/aur/env \\\n           --runtime=nvidia \\\n           --device /dev/nvidia-caps \\\n           --device /dev/nvidia0 \\\n           --device /dev/nvidiactl \\\n           --device /dev/nvidia-modeset \\\n           --device /dev/nvidia-uvm \\\n           --device /dev/nvidia-uvm-tools \\\n           europe-west3-docker.pkg.dev/machine-learning-199407/structures/stand:latest\n```\n\n4. You're now inside the container. Please ensure the NVIDIA runtime is working correctly by calling `nvidia-smi`.\n\n5. If `nvidia-smi` shows your GPU info, then you are ready for building and executing the benchmarks. In the example below we run the benchmark on the test set of StAnD small problems.\n\n```bash\ncd /home/aur/env/solvers\n\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON ..\nmake -j$(nproc)\n\n# Run tests to check if everything is fine\nCTEST_OUTPUT_ON_FAILURE=1 make test\n\n# If there are no errors (otherwise check your docker configuration)\n# you can run the benchmarks\n./benchmark/solvers_benchmark --dataset=../../datasets/stand_small_test\n```\n\n## Troubleshooting\n\nIf you see this error while running the benchmarks\n\n```\n***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.\n```\n\nyou might want to disable the CPU frequency scaling while running the benchmark (on the **host** not inside the container):\n\n```bash\nsudo cpupower frequency-set --governor performance\n./benchmark/solvers_benchmark --dataset=\u003cdataset_directory\u003e\nsudo cpupower frequency-set --governor powersave\n```\n\n---\n\n## Citation\n\nIf you find the dataset or the code useful for your research, please cite:\n\n```\n@article{grementieri2022stand,\n    title={StAnD: A Dataset of Linear Static Analysis Problems}, \n    author={Grementieri, Luca and Finelli, Francesco},\n    journal={arXiv preprint arXiv:2201.05356},\n    year={2022}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurutech%2Fstand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurutech%2Fstand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurutech%2Fstand/lists"}