On windows using GpuConv : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

2,884 views
Skip to first unread message

Francis Quintal Lauzon

unread,
Apr 4, 2014, 4:14:53 PM4/4/14
to theano...@googlegroups.com
Hi,

I get the error message below when calling theano.function() on my model.  This issue only happens on windows but not on linux.  The error message also included a full print out of what seems mod.cu which I have pasted in the "full_error_message.txt" file attached to this message.

According to a stackoverflow post, this seems to be an issue with MSCV, but not sure it applies here because nvcc is used. 
http://stackoverflow.com/questions/12970293/why-microsoft-visual-studio-cannot-find-stdint-h/12970619#12970619

Anyway, any kind of help would be appreciated.

Regards,

Francis


mod.cu(40) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

['nvcc', '-shared', '-g', '-O3', '-use_fast_math', '-arch=sm_20', '-Xlinker', '/DEBUG', '-m64', '-Xcompiler', '-DTHEANO_KERN_
WID=7,-DCUDA_NDARRAY_CUH=d67f7c8a21306c67152a70a88a837011,/Zi,/MD', '-IC:\\Users\\lab.vision\\AppData\\Local\\Theano\\compile
dir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_44_Stepping_2_GenuineIntel-2.7.6-64\\cuda_ndarray', '-INone\\include', '-IC
:\\Anaconda\\lib\\site-packages\\numpy\\core\\include', '-IC:\\Anaconda\\include', '-IC:\\Anaconda\\lib\\site-packages\\thean
o\\sandbox\\cuda', '-o', 'C:\\Users\\lab.vision\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_M
odel_44_Stepping_2_GenuineIntel-2.7.6-64\\tmp8xj33i\\e675ef3d08bfdab6deba56c0b19e0864.pyd', 'mod.cu', '-LC:\\Anaconda\\libs',
 '-LC:\\Users\\lab.vision\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_44_Stepping_2_Gen
uineIntel-2.7.6-64\\cuda_ndarray', '-LNone\\lib', '-LNone\\lib', '-LNone\\lib64', '-LC:\\Anaconda', '-lpython27', '-lcudart',
 '-lcublas', '-lcuda_ndarray']
Traceback (most recent call last):
  File "emneuron_002.py", line 405, in <module>
    experiment(args.path, args.database_path)
  File "emneuron_002.py", line 53, in __init__
    self.segmentation = segmentation(self.hp, out)
  File "emneuron_002.py", line 236, in __init__
    self.pred_fn = th.function(inputs = [self.input], outputs = self.prediction_logistic.pred)
  File "C:\Anaconda\lib\site-packages\theano\compile\function.py", line 223, in function
    profile=profile)
  File "C:\Anaconda\lib\site-packages\theano\compile\pfunc.py", line 512, in pfunc
    on_unused_input=on_unused_input)
  File "C:\Anaconda\lib\site-packages\theano\compile\function_module.py", line 1312, in orig_function
    defaults)
  File "C:\Anaconda\lib\site-packages\theano\compile\function_module.py", line 1181, in create
    _fn, _i, _o = self.linker.make_thunk(input_storage=input_storage_lists)
  File "C:\Anaconda\lib\site-packages\theano\gof\link.py", line 434, in make_thunk
    output_storage=output_storage)[:3]
  File "C:\Anaconda\lib\site-packages\theano\gof\vm.py", line 847, in make_all
    no_recycling))
  File "C:\Anaconda\lib\site-packages\theano\sandbox\cuda\blas.py", line 661, in make_thunk
    compute_map, no_recycling)
  File "C:\Anaconda\lib\site-packages\theano\sandbox\cuda\__init__.py", line 237, in make_thunk
    compute_map, no_recycling)
  File "C:\Anaconda\lib\site-packages\theano\gof\op.py", line 606, in make_thunk
    output_storage=node_output_storage)
  File "C:\Anaconda\lib\site-packages\theano\gof\cc.py", line 948, in make_thunk
    keep_lock=keep_lock)
  File "C:\Anaconda\lib\site-packages\theano\gof\cc.py", line 891, in __compile__
    keep_lock=keep_lock)
  File "C:\Anaconda\lib\site-packages\theano\gof\cc.py", line 1322, in cthunk_factory
    key=key, fn=self.compile_cmodule_by_step, keep_lock=keep_lock)
  File "C:\Anaconda\lib\site-packages\theano\gof\cmodule.py", line 996, in module_from_key
    module = next(compile_steps)
  File "C:\Anaconda\lib\site-packages\theano\gof\cc.py", line 1237, in compile_cmodule_by_step
    preargs=preargs)
  File "C:\Anaconda\lib\site-packages\theano\sandbox\cuda\nvcc_compiler.py", line 433, in compile_str
    'for cmd', ' '.join(cmd))
Exception: ('The following error happened while compiling the node', GpuConv{valid, (1, 1), None, (7, 7), True, None, (7, 7)}
(GpuElemwise{Composite{[true_div(sub(i0, i1), i2)]}}[(0, 0)].0, pca), '\n', 'nvcc return status', 2, 'for cmd', 'nvcc -shared
 -g -O3 -use_fast_math -arch=sm_20 -Xlinker /DEBUG -m64 -Xcompiler -DTHEANO_KERN_WID=7,-DCUDA_NDARRAY_CUH=d67f7c8a21306c67152
a70a88a837011,/Zi,/MD -IC:\\Users\\lab.vision\\AppData\\Local\\Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Mod
el_44_Stepping_2_GenuineIntel-2.7.6-64\\cuda_ndarray -INone\\include -IC:\\Anaconda\\lib\\site-packages\\numpy\\core\\include
 -IC:\\Anaconda\\include -IC:\\Anaconda\\lib\\site-packages\\theano\\sandbox\\cuda -o C:\\Users\\lab.vision\\AppData\\Local\\
Theano\\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_44_Stepping_2_GenuineIntel-2.7.6-64\\tmp8xj33i\\e675ef3d08bf
dab6deba56c0b19e0864.pyd mod.cu -LC:\\Anaconda\\libs -LC:\\Users\\lab.vision\\AppData\\Local\\Theano\\compiledir_Windows-7-6.
1.7601-SP1-Intel64_Family_6_Model_44_Stepping_2_GenuineIntel-2.7.6-64\\cuda_ndarray -LNone\\lib -LNone\\lib -LNone\\lib64 -LC
:\\Anaconda -lpython27 -lcudart -lcublas -lcuda_ndarray', '[GpuConv{valid, (1, 1), None, (7, 7), True, None, (7, 7)}(<CudaNda
rrayType(float32, 4D)>, pca)]')
full_error_message.txt
Message has been deleted

Hyuk-joon Kwon

unread,
Apr 7, 2014, 3:59:10 AM4/7/14
to theano...@googlegroups.com
You probably uses Visual Studio under 2008.
These version don't have stdint.h which defines standard type.

You could get stdint.h file from somewhere in internet or \Program Files\Nsight Visual Studio Edition\Host\Samples\NsightSamples\Common\C99 directory so that copying into \Program Files\Microsoft Visual Studio 10.0\VC\include.



Thanks.


2014년 4월 5일 토요일 오전 5시 14분 53초 UTC+9, Francis Quintal Lauzon 님의 말:

Francis Quintal Lauzon

unread,
Apr 10, 2014, 2:30:23 PM4/10/14
to theano...@googlegroups.com
Thanks Hyuk-joon.  In case other people also encounter this problem here's the solution I found. 

I ended up installing visual studio 2012 to get "stdint.h" following Hyuk-joon's advice.  However, that wasn't enough though.  Indeed, it seems that theano does not specify visual studio's include directory as a search directory to nvcc in its call.

Therefore since I am using the Anaconda distribution and that the anaconda include directory is specified as a search directories in the nvcc call, I copied stdint.h from
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
into
    C:\Anaconda\include
and the problem was solved.

Regards,

Francis


--

---
You received this message because you are subscribed to a topic in the Google Groups "theano-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/theano-users/JReP5_Ligu4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to theano-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Olivier Delalleau

unread,
Apr 10, 2014, 6:34:48 PM4/10/14
to theano...@googlegroups.com
Thanks for sharing!
Note there are also theano config flags you can set to provide compile args to nvcc, so you should theoretically be able to make it work without copying files.

-=- Olivier
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages