Edit this page


Building and running examples from the pre-built library releases

The prebuilt ParaMonte C++ library releases (yet to be added to the current library prerelease) ship with all available examples for the C++ programming language environment.

To run a specific example in the prebuilt library,

  1. Download your target prebuilt library of your interest.

  2. Navigate to the example folder of your interest in the prebuilt library containing the main example file.

  3. Run the build script in the relevant terminal to build and run the example.

    1. In a Windows Batch terminal, try,
      build.bat
      
    2. In a Unix Bash or other Bash-compatible terminal, try,
      ./build.sh
      

      If the script is not executable, make it so by the following command,

      chmod +x build.sh && ./build.sh
      

Building and running examples from the library source

If you are building the ParaMonte library from the source code, you can also instruct the build scripts to build, run and postprocess the examples after the ParaMonte build is complete. To build and run the examples, you must specify the name of the example you want to run along with the ParaMonte build configuration flag --exam. For example,

  • In a Windows Batch command line (e.g., CMD), try in the root directory of the ParaMonte GitHub repository,
    install.bat --lang cpp --exam sampling
    
  • In a Unix Bash or ZSH command line, try in the root directory of the ParaMonte GitHub repository,
    ./install.sh --lang cpp --exam sampling
    

The above installation commands will be build the ParaMonte C++ library and subsequently run all ParaMonte C++ examples whose name or path, as appearing in the example directory of the ParaMonte GitHub repository, partially matches the specified pattern sampling.


If you have any questions about the topics discussed on this page, feel free to ask in the comment section below, or raise an issue on the GitHub page of the library, or reach out to the ParaMonte library authors.