Check for -m32 command line options in the makefile. Also, I presume you have CUDA 3.1 on your mac? That is capable of producing 64-bit builds - and they are the default if -m32 or -m64 is not on the command line.
> I took out the CUERR macro call and the run proceeded; so there was a
> conflict of that error check on the Mac
An "invalid argument" error indicates that the kernel is not even running - hence the garbage output. Perhaps you should check the arguments specified in the CUDA call just prior to the CUERR check and determine which one of them is invalid.
If you're convinced the naive implementation is doing the right thing
on your Mac, save off that output file, and use that as your reference.
(at least, that's what I did for lab 2b)