mumax/3

error compiling mumax3

MKe2013 opened this issue · 3 comments

Hi,

I have tried to compile mumax3 on Ubuntu. I have followed the installation instructions of "https://github.com/mumax/3", but I have not been lucky:

`cgo-gcc-prolog: In function ‘_cgo_c21ce16ee817_Cfunc_cuDeviceComputeCapability’:
cgo-gcc-prolog:56:2: warning: ‘cuDeviceComputeCapability’ is deprecated [-Wdeprecated-declarations]
In file included from /home/mike/go/pkg/mod/github.com/mumax/3@v3.9.3+incompatible/cuda/cu/device.go:5:
/usr/local/cuda/include/cuda.h:4195:36: note: declared here
4195 | __CUDA_DEPRECATED CUresult CUDAAPI cuDeviceComputeCapability(int *major, int *minor, CUdevice dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_c21ce16ee817_Cfunc_cuDeviceGetProperties’:
cgo-gcc-prolog:159:2: warning: ‘cuDeviceGetProperties’ is deprecated [-Wdeprecated-declarations]
In file included from /home/mike/go/pkg/mod/github.com/mumax/3@v3.9.3+incompatible/cuda/cu/device.go:5:
/usr/local/cuda/include/cuda.h:4161:36: note: declared here
4161 | __CUDA_DEPRECATED CUresult CUDAAPI cuDeviceGetProperties(CUdevprop *prop, CUdevice dev);
| ^~~~~~~~~~~~~~~~~~~~~

github.com/mumax/3/cuda/curand

/home/mike/go/pkg/mod/github.com/mumax/3@v3.9.3+incompatible/cuda/curand/generator.go:46:102: identifier "_Ctype_ulonglong" may conflict with identifiers generated by cgo

github.com/mumax/3/cuda/cufft

/home/mike/go/pkg/mod/github.com/mumax/3@v3.9.3+incompatible/cuda/cufft/mode.go:17:52: could not determine kind of name for C.CUFFT_COMPATIBILITY_FFTW_ALL
/home/mike/go/pkg/mod/github.com/mumax/3@v3.9.3+incompatible/cuda/cufft/mode.go:16:52: could not determine kind of name for C.CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC
/home/mike/go/pkg/mod/github.com/mumax/3@v3.9.3+incompatible/cuda/cufft/mode.go:14:52: could not determine kind of name for C.CUFFT_COMPATIBILITY_NATIVE
`

I have Cuda 11.5 installed (diver version 495.29.05).

thanks

Hi, have you solved this issue? I'm having the same problem :/

I have fixed building with modern versions of go, check it out here https://github.com/Artemkth/3 . Warning, build procedure is slightly different from normal mumax3.

Kind regards,
Artem

It seems you have been attempting to compile some version "mumax3.9.3+incompatible", which understandably is giving 3 separate errors/warnings that mumax addressed in the 3.10 release:

  1. warning: cuDeviceComputeCapability is deprecated

    This occurred in CUDA 5.0 (fixed in baedc7b).

  2. identifier _Ctype_ulonglong may conflict with identifiers generated by cgo

    Since Go 1.12, mangled C names _Ctype_char were changed to documented cgo names C.char (fixed in 2cf5c9a).

  3. could not determine kind of name for C.CUFFT_COMPATIBILITY_FFTW_ALL (...)

    These compatibility modes were removed in cuFFT 8.0 (fixed in 3b2b240, ebeabb0).

Since these were all addressed in mumax3.10, I think these errors should no longer appear when compiling mumax3.10 or later.