Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error on macOS #60

Open
fasiha opened this issue Aug 30, 2017 · 2 comments
Open

Compilation error on macOS #60

fasiha opened this issue Aug 30, 2017 · 2 comments

Comments

@fasiha
Copy link

fasiha commented Aug 30, 2017

Fails at 57% on:

/.../gpuNUFFT/CUDA/inc/matlab_helper.h:113:37: error:
      cannot pass object of non-POD type 'IndType2' through variadic function;
      call will abort at runtime [-Wnon-pod-varargs]
        mexPrintf("%s: %d, ", name, (*data)[i]);
                                    ^
/.../gpuNUFFT/CUDA/inc/matlab_helper.h:140:3: note:
      in instantiation of function template specialization
      'readMatlabInputArray<IndType2>' requested here
  readMatlabInputArray<TType>(prhs, input_index, highest_varying_dim, name,
  ^
/.../gpuNUFFT/CUDA/inc/matlab_helper.h:166:3: note:
      in instantiation of function template specialization
      'readMatlabInputArray<IndType2>' requested here
  readMatlabInputArray<TType>(prhs, input_index, highest_varying_dim, name,
  ^
/.../gpuNUFFT/CUDA/src/gpu/matlab/gpuNUFFT_forw.cpp:88:7: note:
      in instantiation of function template specialization
      'readAndCreateArray<IndType2>' requested here
      readAndCreateArray<IndType2>(prhs, pcount++, 0,
      ^
In file included from /.../gpuNUFFT/CUDA/src/gpu/matlab/gpuNUFFT_forw.cpp:1:
/.../gpuNUFFT/CUDA/inc/matlab_helper.h:115:37: error:
      cannot pass object of non-POD type 'IndType2' through variadic function;
      call will abort at runtime [-Wnon-pod-varargs]
        mexPrintf("%s: %f, ", name, (*data)[i]);
                                    ^
2 errors generated.

I’m building on macOS with latest CUDA 8.0 and Apple LLVM 8.0.0 and HEAD of your repo. If this is a macOS thing, feel free to close—I’m building it here just to do some basic testing, I will find a Linux box with a more modern GPU and test there.

@andyschwarzl
Copy link
Owner

Hello,

I'm sorry, but I do not have access to a macOS system, but you could try to remove the mexPrintf calls since they are just used for debugging issues.

HTH

@acurc
Copy link

acurc commented Mar 21, 2018

Ran into the same issue on Ubuntu 16.04. Removing the following if statement from matlab_helper.h (starts at line 112) solved the issue.
if (is_int) mexPrintf("%s: %d, ", name, (*data)[i]); else mexPrintf("%s: %f, ", name, (*data)[i]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants