The error message states: Given input size: (32x1x1). Calculated output size: (32x0x0) inside the ***MaxPooling.c file.
So the problem is that the input of the max pooling is too small. Since the number of channels is 32, it has to be after conv3 because only conv3 in your case output 32 channels. And there is a single pooling layer after conv3.