{"id":20683249,"url":"https://github.com/tudasc/simanmo","last_synced_at":"2025-10-24T10:36:41.453Z","repository":{"id":110365028,"uuid":"290442787","full_name":"tudasc/SimAnMo","owner":"tudasc","description":"The SIMulated ANnealing MOdeler","archived":false,"fork":false,"pushed_at":"2021-09-30T06:32:11.000Z","size":44051,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-17T15:52:46.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/tudasc.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":"2020-08-26T08:40:26.000Z","updated_at":"2021-09-30T06:28:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a52472a-24a5-4d3a-8f31-2980d1fe0c61","html_url":"https://github.com/tudasc/SimAnMo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudasc%2FSimAnMo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudasc%2FSimAnMo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudasc%2FSimAnMo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudasc%2FSimAnMo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tudasc","download_url":"https://codeload.github.com/tudasc/SimAnMo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242933845,"owners_count":20208910,"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":"2024-11-16T22:16:03.063Z","updated_at":"2025-10-24T10:36:41.371Z","avatar_url":"https://github.com/tudasc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimAnMo: Simulated Annealing Modeler V. 2.0\n\n## Introduction\nSimAnMo (SIMulated Anealing Modeler) is a C++-software to generate runtime performance models for programs. It is based on principles of [Extra-P](https://www.scalasca.org/software/extra-p/download.html) and was presented in [BUR18]. Besides models for programs with polynomial runtime behavior, meaning that the runtime increases polynomially with the size of an input parameter *p*, SiMaNo is also able to model exponential runtime behavior where the runtime grows exponentially or even factorial in *p*. The models and data to analyze their quality are exported as LaTeX documents.\n\nThe model generation process is based on an SMP-parallelized simulated annealing procedure. Training data is required in files of the following format:\n\n    (\tp_1\t;\tval_1\t)\n    (\tp_2\t;\tval_2\t)\n    (\tp_3\t;\tval_3\t)\n    ...\n    (\tp_l\t;\tval_l\t)\n\nThe first value p_i in the brackets is the value of the input parameter p for the respective mesaurement. val_i gives the runtime in our case.\nYou can also add additional *k* measurements for evaluation. Then, you have to add them in the following way after the *l* training point with *ADDPOINTS* as mandatory indicator for the software:\n\n    #ADDPOINTS\n    (\tp_(l+1)\t;\tval_(l+1)\t)\n    ....\n    (\tp_(l+k)\t;\tval_(l+k)\t)\n\nComments can be added by using a *#*, e.g.,\n\n    (\tp_1\t;\tval_1\t)\n    #(\tp_2\t;\tval_2\t)\n    (\tp_3\t;\tval_3\t)\n\nwhich will ignore the second point for the model generation.\nExample files are given in the *inputs* directory.\n\n## Compilation\n### Prerequistes\n* Microsoft Visual Studio 2017 (or higher) or gcc/g++ 6.0 (or higher, -std=c++-17 must be supported)\n* [Eigen Library](http://eigen.tuxfamily.org/index.php?title=Main_Page)\n* Optional (deprecated): [NAG Library](https://www.nag.com/content/nag-library)\n*  `pdflatex` command must be available\n\n### Included Libaries\nThe following libaries are integrated in the shipped code.\n* [ALGLIB 3.17.0](https://www.alglib.net/)\n* [FADBAD++](http://www.imm.dtu.dk/~kajm/FADBAD/)\n\n### Windows\nSimAnMo has successfully been tested with Visual Studio 2017/2019, Eigen 3.3 and NAG C-library 24/25/26.\n\nOpen the Visual Studio and build the Release (x64) configuration. Debug (x64) is also supported. The path to Eigen must be integrated into Windows' %INCLUDE% system variable or has to be added to the addional include directories in the VS project settings.\n\nThe Release (x64) binaries are generated in the main project directory in the subfolder *bin*. Debug configuration is built in the directory set in the VS project properties.\n\nIf you prefer to employ the NAG library instead of Eigen you have to:\n* Add the path to the NAG headers to %INCLUDE% or in the VS project settings\n* Add the path to the NAG libraries to %LIB% or in the VS project settings\n* Add *nagc_nag_MT.lib* and *legacy_stdio_definitions.lib* as additional dependencies to the linker in the VS project settings\n* Define the preprocessor macro `USE_NAG` in the VS project settings\n\n### Linux\nSiMaNo has successfully been tested with GCC  8.3, 8.4, 9.0 and 10.1 with Eigen 3.3.\n\nMake sure that the Eigen-headers are included in $CPATH environment variable or addpend the path to the `INC` variable in the `Makefile`. Then type `make` while being in the Makefile directory. The binary is generated in the main project directory in the subfolder *bin*.\n\n\n## Usage\nFirst, we describe all calling parameter and second, the code changes regquired to change the model type and the cost metric which is minimized related to the training data.\n\n### Execution and Parameter\nThe application is highly configurable. The main usage (depending on the OS) is:\n\n`(./) SiMaNo(.exe) [options]  --inputfile PATH_AND_NAME_OF_INPUTFILE --gl --outpath PATH_WHERE_TO_PLACE_OUTPUT --texfile NAME_OF_TEX_AND_PDF_FILES`\n\nThere are many command line parameter which influence the behavior. These are:\n#### General and Annealing Process\n* `--help` / -h Print the help\n* `--inputfile / -i + PATH_TO_INPUT_FILE/FILNAME` MANDATORY. The path and name to/of the input file\n* `--outfile / -o + PATH_TO_OUT_FILE` The path to the output files (default=folder of executable)\n* `--texfile / -t + NAME_OF_FILES`  MANDATORY. The name of output tex and pdf files\n* `--number_of_threads / --nt + INT` How many threads anneal in parallel (default=1)\n* `--number_of_trials / --tr + INT`  How many repetitions of the annealing process (default=1)\n* `--ann_target_temp / --att + FLOAT` Target temperature for annealing (default=1e-9)\n* `--ann_cooling_rate / --acr + FLOAT` Temperature degredation per iteration (default=0.99)\n* `--ann_steps / --as + INT` How many steps are performed per temperature (default=15)\n* `--ann_steps_wo_mod / --awm + INT` Heuristic: Stop if no improvement after this number of steps (default=200000)\n* `--ann_steps_backtrack / --abt + INT`Heuristic: Backtrack per thread after this number of steps (default=20000)\n\n#### Model and Cost Calculation Configuration\n\n* `--costcalc_type / --cct + STRING` Decides whether to use RSS (STRING=\"rsscost\") or raRSD (STRING=\"rarsdcost\") as cost metric to minimize (default=\"rsscost\")\n* `--paramest_type / --pet + STRING` (deprecated) Decides whether to use RSS (STRING=\"rssest\") or raRSD (STRING=\"rarsdest\") as cost metric to minimize within the parameter estimation if raRSD cost estimator is chosen BEFORE. (default=\"rsscost\")\n\n#### LaTeX Printing\n* `--genlatex / --gl` Activate the LaTeX report generation (default=false)\n* `--openpdf / --op` Generated pdf file is automatically opened with pdfxchange at --pathtopdfxchange (default=false)\n* `--pathtopdfxchange` If --openpdf is set, pdf file is automatically opened with pdfxchange at this path\n* `--logy` The y-axis in the prediction graph is scaled logarithmically\n* `--print_confidence / --pc` Print the confidence interval in the predictiion (default=false)\n* `--confidence_interval / --ci + FLOAT` Set size of confidence interval when printing it (default=0.0)\n* `--print_cost_details / --pcd` Print details of cost development during annealing (default=false)\n\n#### Parameter Depending on Model Type Employed\n##### Polynomial-logarithmic (pol-log) Model Configuration [Extra-P Standard Model]\n*`--max_log_range / --melog + FLOAT` Maximum exponent for lorarithms (default=4.00)\n*`--max_pol_range / --mepol + FLOAT` Maximum exponent for polynoms (default=6.00)\n\n##### Linear-logarithmic (lin-log) Model Configuration [Linear Regression]\n*`--create_lin_log / --ll` Create a lin-log model if set (default=false)\n*`--base_lin_log / --bll + INT` Basis that is used for lin-log-model (default=2)\n\n##### Exponential (exp) Model Configuration [Extended Extra-P Model]\n* `--max_exp_range / --meexp + INT` Maximum coefficient in exponent (default=4.00)\n\n##### Exponential-polynomial (exp-pol) Model Configuration [Introduced in [BUR20]]\n* `--exp_pol_min_coeff / --epmic + FLOAT` Minimum coefficient in the exponent of exp-pol models (default=0.01)\n* `-exp_pol_max_coeff / --epmac + FLOAT` Maximum coefficient in the exponent of exp-pol models (default=2.0)\n* `--exp_pol_min_exp / --epmie + FLOAT` Minimum exponent in the exponent of exp-pol models (default=0.5)\n* `--exp_pol_max_exp / --epmae + FLOAT` Maximum exponent in the exponent of exp-pol models (default=3.0)\n\n##### Factorial (fac) Model Configuration [Introduced in [BUR21]]\n* `--fac_pol_min_coeff / --fpmic + FLOAT` Minimum coefficient in the exponent of the polynomial part of the fac models (default=-0.5)\n* `--fac_pol_max_coeff / --fpmac + FLOAT` Maximum coefficient in the exponent of the polynomial part of the fac models (default=3.0)\n* `--fac_log_min_coeff  / --flmic + FLOAT` Minimum coefficient in the exponent of the logarithmic part of the fac models (default=1e-3)\n* `--fac_log_max_coeff  / --flmac + FLOAT` Maximum coefficient in the exponent of the logarithmic part of the fac models (default=1.5)\n\n### Different Models and Metrics\n#### Changing the Models\nSimAnMo supports the four types presented in the parameter section. If you want to create a model of that shape for your training data you have to edit the *SimulatedAnnealingExtraP.cpp*. There, go to the end of the `main`-function, which is the end of the file, and change the template parameter for the call of `annealingManager`. You can use:\n* `ExtraPSolution`: Extra-P model as employed in [BUR18]\n* `ExponentialSolution`: Extended Extra-P model\n* `ExponentialPolynomSolution`: The exponential-polynomial model presented in [BUR20]\n\nLin-log models can be created automatically by using the `--create_lin_log / --ll` calling parameter.\n\n#### Canging the Metric\nSimAnMo supports two different metrics in its current version *RSS* and the relative average Residual Sum of Differences *raRSD* as defined in [Bur20]. To exchange the metric employed, you have to edit the function `annealingManager` in *SimulatedAnnealingExtraP.cpp*. There, search the call of `doAnnealing` an change the second template parameter. Use `nnrRSSCostCalculator` for *raRSD* and *SSCostCalculator* for *RSS*.\n\n\n## Reproducing Paper Results\nTo reproduce the results presented in [BUR20], execute the respective script (*bat* for Windows, *sh* for Linux) in the *script* folder. It will generate the pdf-files in *outputs* directory (it overwrites the example files shipped with the code). These scripts can also be employed for a general test of functionality.\n\n## References\n\u003ctable style=\"border:0px\"\u003e\n\u003ctr\u003e\n    \u003ctd valign=\"top\"\u003e\u003ca name=\"ref-MACH20\"\u003e\u003c/a\u003e[BUR18]\u003c/td\u003e\n    \u003ctd\u003eBurger, Michael ; Bischof, Christian ; Calotoiu, Alexandru ; Wunderer, Thomas ; Wolf, Felix:\n       \u003ca href=https://apps.fz-juelich.de/jsc-pubsystem/pub-webpages/general/get_attach.php?pubid=1861\u003eExploring the Performance Envelope of the LLL Algorithm.\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd valign=\"top\"\u003e\u003ca name=\"ref-MACH20\"\u003e\u003c/a\u003e[BUR20]\u003c/td\u003e\n    \u003ctd\u003eBurger, Michael ; Bischof, Christian ; Nguyen, Giang Nam :\n       Developing Models for the Runtime of Programs\nWith Exponential Runtime Behavior.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd valign=\"top\"\u003e\u003ca name=\"ref-MACH20\"\u003e\u003c/a\u003e[BUR21]\u003c/td\u003e\n    \u003ctd\u003eBurger, Michael ; Bischof, Christian ; Nguyen, Giang Nam :\n       SimAnMo: A Parallelized Runtime Model Generator.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Contact\nmichael.burger@tu-darmstadt.de\ngiang_nam.nguyen@tu-darmstadt.de\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudasc%2Fsimanmo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftudasc%2Fsimanmo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudasc%2Fsimanmo/lists"}