ParaMonte C 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return a non-zero value (1
) if the procedure fails to fully accomplish the task of generating a Monte Carlo sample of the specified input mathematical objective function, otherwise, return 0
.
More...
Functions | |
int32_t | runParaDRAML (long double(*getLogFunc)(long double state[], int32_t ndim), const int32_t ndim, const char *input) |
int32_t | runParaDRAMD (double(*getLogFunc)(double state[], int32_t ndim), const int32_t ndim, const char *input) |
int32_t | runParaDRAMF (float(*getLogFunc)(float state[], int32_t ndim), const int32_t ndim, const char *input) |
Generate and return a non-zero value (1
) if the procedure fails to fully accomplish the task of generating a Monte Carlo sample of the specified input mathematical objective function, otherwise, return 0
.
This interface group is the entry point to all C-style interfaces to the ParaDRAM samplers of mathematical density functions.
Although the procedures of this generic interface return a single scalar of type int32_t
, the procedures generate massive amounts of information about each simulation which are stored in appropriate external hard drive files.
See,
[in] | getLogFunc | : The input user-specified procedure pointer to the natural logarithm of the target density function. On input, the function must take an input vector state of size ndim of type floating-point of kind float , double , or long double representing a state (point) from within the domain of the user-specified target density function whose function value must be returned.On output, the user-specified procedure getLogFunc() must return the function value corresponding to the input state[ndim] .The following illustrate the generic interface of input function pointer getLogFunc(state, ndim) , REAL getLogFunc(REAL[] state, int32_t ndim);
REAL can be a floating-point type of kind float , double , or long double for the corresponding varying-precision sampler interfaces: |
[in] | ndim | : The input scalar constant of type int32_t representing the number of dimensions of the domain of the objective function. |
[in] | input | : The input scalar pointer of type char representing the null-terminated C string that contains either,
(optional. It is considered as missing if set to NULL .) |
stat
: The output scalar of type int32_t
that is 0
if and only if the sampler succeeds in sampling the specified density function.
Possible calling interfaces ⛓
long double
is compiler and platform dependent making the use of long double
with precompiled ParaMonte libraries problematic and non-functional.0 < ndim
must hold for the corresponding input arguments.CHECK_ENABLED=1
.
Example usage ⛓
input.nml
⛓
Example usage ⛓
input.nml
⛓ ifx
version 2024.0.0 20231017 ifx
This interface yields a segmentation fault error for all real
types supported when linked with the ParaMonte library built with Intel LLVM Fortran Compiler ifx
. ifort
will be used.ifort
version 2021.11.0 20231010 runParaDRAML
interface for long double
yields a segmentation fault error. long double
interface fail with Intel LLVM Fortran Compiler ifx
and Intel LLVM C/C++ Compiler icx
compilers.long double
and c_long_double
storage.long double
appears to yield incorrect values in some calculations, e.g., in isFailedGeomCyclicFit()
of the ParaMonte library.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
int32_t runParaDRAMD | ( | double(*)(double state[], int32_t ndim) | getLogFunc, |
const int32_t | ndim, | ||
const char * | input | ||
) |
int32_t runParaDRAMF | ( | float(*)(float state[], int32_t ndim) | getLogFunc, |
const int32_t | ndim, | ||
const char * | input | ||
) |
int32_t runParaDRAML | ( | long double(*)(long double state[], int32_t ndim) | getLogFunc, |
const int32_t | ndim, | ||
const char * | input | ||
) |