Skip to content

Add priors support #5

@cmontemuino

Description

@cmontemuino

Priors is not currently supported by msparsm, meaning that tbs arguments cannot be used.

In original mspar, priors data is processed by means of a scanf on the input file in the main method:

for( i = 1; i<argc ; i++)
    if( strcmp( argv[i],"tbs") == 0 )  argv[i] = tbsparamstrs[ ntbs++] ;

count=0;

if( ntbs > 0 )  for( k=0; k<ntbs; k++)  scanf(" %s", tbsparamstrs[k] );

In msparsm we cannot do this kind of processing. All workers are receiving a number of samples to be generated, and we need to pass them tbs arguments needed to generate a specific sample.

What master process needs to do is reading one line from the priors file per each sample, and then change the way parameters are read from command line in getpars function. Argument's order (theta, rho, etc.) is not enforced by default, hence a mechanism to assign the proper value from prior's file to the tbs argument must be provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions