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


	// Allocate device arrays

	double* dT;
	double* dP;
	double *dVV;
	double *dVVOut;

	unsigned char* dTPacked;
	unsigned char* dPPacked;
	unsigned char* dVVPacked;

	int *dMissingValuesCount;

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


	if (!opts.isConstantPressure)
	{
		if (opts.simplePackedP.HasData())
		{
			CUDA_CHECK(cudaFree(dPPacked));
		}
