double likelihood_compose(double* results, int num_results)
{
    double prob_sum = 0.0;
    double bad_jacobians = 0.0;
    int i;
    for (i = 0; i < num_results; i++)
    {
        prob_sum += results[(2*i)];
        bad_jacobians += results[(2*i)+1];
    }
    prob_sum /= (total_number_stars - bad_jacobians);
    prob_sum *= -1;
    printf("[worker: %d] composed likelihood: %.10lf\n", get_mpi_rank(), prob_sum);
    return prob_sum;
}
예제 #2
0
int python_get_mpi_rank(){
    return get_mpi_rank();
}