Copy data from 4D array to 3D array

I’m working with a project where I have a number of volumes that I need to process one at the time. I upload all the volumes to the GPU and then I want to copy one volume at the time to another place on the GPU, something like this

int time_offset = t * DATA_W * DATA_H * DATA_D * sizeof(float);
float* d_volume_pointer = &d_Modified_Volumes[time_offset];
cutilSafeCall( cudaMemcpy(d_Compensated_Volume, d_volume_pointer, DATA_SIZE_VOLUME, cudaMemcpyDeviceToDevice) );

and also to a 3D texture

cudaMemcpy3DParms copyParams = {0};
copyParams.srcPtr = make_cudaPitchedPtr((void*)(d_volume_pointer), sizeof(float)*DATA_W , DATA_W, DATA_H);
copyParams.dstArray = d_Modified_Volume;
copyParams.extent = VOLUME_SIZE;
copyParams.kind = cudaMemcpyDeviceToDevice;
cutilSafeCall( cudaMemcpy3D(&copyParams) );
cutilCheckMsg(" ");

I however get the error

cutilCheckMsg cudaThreadSynchronize error: : unspecified launch failure.

if I try to run the code. If I upload one volume at the time to the GPU the code works fine but I want to upload them all at once in the beginning. Can anyone explain why I can’t copy data like this?

Ooops should remove sizeof(float) in the beginning…