 
 // Pointer to the current value of theta. This is stored in constant memory so that all the threads on the GPU
 // can access the same theta quickly.
-static __constant__ double c_theta[6];
+static __constant__ double c_theta[dim_theta];
 
 // Constants used for the model SED
 static __constant__ double c_nu0 = 2.3e11;  // nu0 = 230 GHz

    
    int n = 2000; // # of data points
	int m = 5; // # of features per data point (i.e., # of points in the SED for the i^th source)
    int p = 3; // # of characteristics per data point.
    int dim_theta = 2 * p;
    
    double mu_norm = 8.5 * log(10);  // Average value of the natural logarithm of the SED normalization
    double sig_norm = 0.5 * log(10);  // Standard deviation in the SED normalization

    
    // Cholesky factor of proposal distribution for each data point, used by the Metropolis algorithm. The proposal
    // covariance matrix for each data point is Covar_i = PropChol_i * transpose(PropChol_i).
    dim_cholfactor = p * p - ((p - 1) * p) / 2; // cholesky factor is a lower-diagonal matrix
    thrust::host_vector<double> h_prop_cholfact(n * dim_chol_factor);
    thrust::fill(h_prop_cholfact.begin(), h_prop_cholfact.end(), 0.0);
    
