cuda.h and curand.h missing while compiling mumax in linux

464 views
Skip to first unread message

Joao Paulo Sinnecker

unread,
Mar 28, 2015, 7:47:13 PM3/28/15
to mum...@googlegroups.com
Hi,


I am trying to compile mumax in Linux (Ubuntu 14.04).
After some struggle I a mange to install go1.4.2.


Than I downloaded mumax3 source with


go get -u -v github.com/mumax/3/cmd/mumax3

And there were this erros:


cuda/cu/context.go:5:18: fatal error: cuda.h: No such file or directory
//#include <cuda.h>
^
compilation terminated.
github.com/barnex/matrix

# github.com/mumax/3/cuda/curand
cuda/curand/generator.go:3:20: fatal error: curand.h: No such file or directory
//#include <curand.h>
^
compilation terminated.


The files cuda.h and curand.h are located at
/usr/local/cuda-6.5/include

There is a LD_LIBRARY_PATH variable set to /usr/local/cuda-6.5/lib64

I have cuda 6.5 installed as reported by nvcc

nvcc: NVIDIA (R) Cuda compiler driver 
Copyright (c) 2005-2014 NVIDIA Corporation 
Built on Thu_Jul_17_21:41:27_CDT_2014 
Cuda compilation tools, release 6.5, V6.5.12

Any hints?

Thanks.




Mykola Dvornik

unread,
Mar 29, 2015, 1:35:50 AM3/29/15
to mum...@googlegroups.com
The easiest way would be to use the precompiled binaries @ https://github.com/mumax/3/releases/tag/v3.6.2

-Mykola

From: Joao Paulo Sinnecker
Sent: ‎2015-‎03-‎29 00:47
To: mum...@googlegroups.com
Subject: [mumax2] cuda.h and curand.h missing while compiling mumax in linux

--
You received this message because you are subscribed to the Google Groups "mumax2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pkwgarcias

unread,
Mar 29, 2015, 5:50:37 AM3/29/15
to mum...@googlegroups.com
Hi Joao Paulo, the problem I think is that the flags used in cgoflags.go stop at version 6.0. Before that is extended I think that doing manually a symbolic link between cuda6.5 and cuda will solve the situation. I recommend you to try to do:

sudo ln -s /usr/local/cuda-6.5 /usr/local/cuda

and try again.

Regards,
Felipe

Joao Paulo Sinnecker

unread,
Mar 29, 2015, 8:21:09 AM3/29/15
to mum...@googlegroups.com
Hi Felipe,

It worked... partially. Indeed solve the cuda.h and curand.h problems.
However, at the end of the process another error poped, not related to cuda anymore.

timedep3Region.mx3 : OK

timedep.mx3 : OK

timedepRegion.mx3 : OK

topologicalcharge-skyrmion.mx3 : script line 20: expect("Skyrmion number" , ext_topologicalcharge,  1.0, tol): undefined: ext_topologicalcharge

topologicalcharge-uniform.mx3 : script line 21: expect("Skyrmion number" , ext_topologicalcharge,  0.0, tol): undefined: ext_topologicalcharge

topologicalcharge-vortex.mx3 : script line 17: expect("Skyrmion number" , ext_topologicalcharge,  0.5, tol): undefined: ext_topologicalcharge

uniaxialanisotropy.mx3 : OK

uniaxial_full.mx3 : OK

unsafe_dmibulk.mx3 : OK

unsafe_dmi.mx3 : OK

vector.mx3 : OK

zeemanenergy.mx3 : OK

zhangliPBC.mx3 : OK

exit status 1

make: *** [all] Error 1


Thanks!

pkwgarcias

unread,
Mar 29, 2015, 8:29:06 AM3/29/15
to mum...@googlegroups.com
Hi Joao Paulo, these are the tests, which I think are from a previous version. Remove or comment the lines  in the make.bash file.

Anyway, the tests are after building the executable, which means that you have an updated executable in the bin directory. I mean if you arrived to that step it means it worked for you. You can check it renaming the commands in the bin directory and compiling again you will see the new created commands.

Regards,
Felipe

pkwgarcias

unread,
Mar 29, 2015, 8:47:03 AM3/29/15
to mum...@googlegroups.com
Just to explain you a bit what I said. The tests correspond to the new version but the executable that is in your path is not the newest version but the old that you did not compile. Then when it tries to run the test I think it finds the older mumax3 and then the new examples are not defined. It fails in the skyrmion part not in the classical uniaxialanisotropy module. Anyway, it worked for you apparently.

Regards,
Felipe

On Sun, Mar 29, 2015 at 2:21 PM, Joao Paulo Sinnecker <jpsin...@gmail.com> wrote:

Joao Paulo Sinnecker

unread,
Mar 29, 2015, 8:47:49 AM3/29/15
to mum...@googlegroups.com
Hi,

You are right! It worked !!!. 
Just after I wrote the last message, I went to the bin directory and all binaries are there and working. 
Than I received your feedback again.

I just tested for version 3.7 and it worked also! Cool.

We are really interested in the topological charge for skyrmion stability tests. The ext_topologicalcharge is absent in version 3.6.2, but in version 3.7 I can output it in the table using tableadd, despite the error message at the end of the compilation. 

I am using the binaries of version 3.6.2 as regular "serious" calculations. It was more like a challenge to compile the thing and worked out all the compiling steps. It was fun! 

Thanks for the CUDA symbolic link hint anyway!

JPS

Joao Paulo Sinnecker

unread,
Mar 29, 2015, 2:48:09 PM3/29/15
to mum...@googlegroups.com
OK, Thanks.
JPS
Reply all
Reply to author
Forward
0 new messages