Edit this page


One API for usage from all programming languages

We have taken special care to develop a highly similar (if not the same) Application Programming Interface (API) for the ParaMonte library routines across all supported programming languages. In particular, every simulation performed via the ParaDRAM routine requires the user to supply only two mandatory pieces of information:

  1. A user-supplied density function getLogFunc() that the sampler must explore.
  2. The number of dimensions ndim of the domain of the user-supplied density function getLogFunc().

Calling the ParaDRAM sampler

Calling the ParaDRAM sampler from C

The simulation specifications are all automatically set to the appropriate default values. However, to assign non-default values to the simulation specifications from the C language, the user must provide all or any simulation specifications as an external input file in the format described on this page. The benefits of using an external file to specify the properties of a ParaMonte simulation are also detailed here.

For a complete descriptive example of ParaDRAM usage from within C, see the ParaMonte C documentation.

Calling the ParaDRAM sampler from C++

The simulation specifications are all automatically set to the appropriate default values. However, to assign non-default values to the simulation specifications from the C++ language, the user must provide all or any simulation specifications as an external input file in the format described on this page. The benefits of using an external file to specify the properties of a ParaMonte simulation are also detailed here.

For a complete descriptive example of ParaDRAM usage from within C++, see the ParaMonte C++ documentation.

Calling the ParaDRAM sampler from Fortran

The simulation specifications are all automatically set to the appropriate default values. However, if needed, there are two ways to assign non-default values to the simulation specifications from the Fortran language:

  1. via the sampler argument in the generic interface of the ParaDRAM sampler routine getErrSampling. The simulation specifications specified would have to be set as components of the derived type paradram_type.
  2. via an external input file passed to the ParaDRAM sampler routine getErrSampling.

For a complete descriptive example of ParaDRAM usage from within Fortran, see the ParaMonte Fortran documentation.


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.