 
 	if (!opts.isConstantPressure)
 	{
+		CUDA_CHECK(cudaMalloc((void **) &dP, memSize));
+
 		if (opts.simplePackedP.HasData())
 		{
 			CUDA_CHECK(cudaMalloc((void **) &dPPacked, opts.simplePackedP.dataLength * sizeof(unsigned char)));

{

	int idx = blockIdx.x * blockDim.x + threadIdx.x;

	if (idx < opts.N)
	{
		if (opts.simplePackedT.HasData())


	// Allocate device arrays

	double* dT = NULL;
	double* dP = NULL;
	double* dVV = NULL;
	double* dVVOut = NULL;

	unsigned char* dTPacked = NULL;
	unsigned char* dPPacked = NULL;
	unsigned char* dVVPacked = NULL;

	int *dMissingValuesCount = NULL;

	CUDA_CHECK(cudaMalloc((void **) &dMissingValuesCount, sizeof(int)));
	CUDA_CHECK(cudaMalloc((void **) &dT, memSize));
