Hi, Arnaud, I think you have located the issue, here is what I did: I activated the virtual env in cmd, then ran "g++ test.c -o test", here is the error message:
C:/Program Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find C:/Program:No such file or directory C:/Program Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o: No such file or directory collect2.exe: error: ld returned 1 exit status What do you suggest that I do now? Do I have to remove Anaconda and install at C root? Thanks! On Monday, April 16, 2018 at 12:46:02 PM UTC-5, Arnaud Bergeron wrote: > > Create a new file and call it whatever (like test.c), then try to compile > it. This is just to check if the compiler works outside of Theano. > > I’ve added sample content so that the file has valid C code. > > Le 11 avr. 2018 à 17:07, Qinpeng Wang <wqp.g...@gmail.com <javascript:>> > a écrit : > > Hi, Arnaud, > > Thanks for your reply! I believe currently I rely on the gcc from > m2w64-toolchain package, installed via conda. > Where can I find this file "test.c", and how can I compile with your code? > > Thanks! > > On Wednesday, April 11, 2018 at 12:18:56 PM UTC-5, Arnaud Bergeron wrote: >> >> It seems like the gcc in anaconda has trouble when installed in a path >> with spaces: >> >> Can you copy this to 'test.c': >> >> int main() { >> return 1; >> } >> >> and try to compile with: >> >> g++ test.c -o test >> >> >> Le 10 avr. 2018 à 17:19, Qinpeng Wang <wqp.g...@gmail.com> a écrit : >> >> Hi, Arnaud, >> >> Thanks for your reply! I reinstalled CUDA, copied cudnn files in the cuda >> directory, and removed the two parameters. However, I got the same errors >> from my first post: >> >> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled >> Traceback (most recent call last): >> File "C:\Program >> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line >> 227, in <module> >> use(config.device) >> File "C:\Program >> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line >> 214, in use >> init_dev(device, preallocate=preallocate) >> File "C:\Program >> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line >> 121, in init_dev >> dnn.dnn_available.msg) >> RuntimeError: You enabled cuDNN, but we aren't able to use it: cannot >> compile with cuDNN. We got this error: >> b'C:/Program >> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: >> cannot find C:/Program: No such file or directory >> C:/Program >> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: >> cannot find >> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o: >> No such file or directory >> collect2.exe: error: ld returned 1 exit status' >> >> >> Any other suggestion you have? >> >> Thanks! >> >> >> On Tuesday, April 10, 2018 at 12:45:59 PM UTC-5, Arnaud Bergeron wrote: >>> >>> >>> >>> Le 3 avr. 2018 à 12:01, Qinpeng Wang <wqp.g...@gmail.com> a écrit : >>> >>> Hi Pascal, >>> >>> I have CUDA installed a while ago when I was still using the old GPU >>> backend at C:\Program Files\NVIDIA GPU Computing Toolkit, then I copied >>> the CUDA folder to C root. >>> >>> >>> This most likely broke DLL registrations. Please don't do that. >>> >>> If you reinstall cuda in its original location, put the cudnn files in >>> the cuda directory and remove these two parameters in your theanorc file: >>> >>> include_path=C:/CUDA/v7.5/include >>> library_path=C:/CUDA/v7.5/lib/x64 >>> >>> It should work again. >>> >>> --- >>> >>> I you really want to try with the current setup, you can try to set this >>> >>> base_path=C:/CUDA/v7.5 >>> >>> Instead of the two above, but I'm pretty sure that will still break on >>> the cuda DLLs. >>> >>> >>> >>> Then I installed cuDNN by copying unzipped files into corresponding >>> folders inside CUDA folder. I'm using CUDA 7.5 and cuDNN 6.0 >>> (Windows7). See my theanoc file in my original post to make sure I have >>> pointed theano to the right location. >>> Yes this error is not related to Idflags. >>> >>> Thanks! >>> >>> On Tuesday, April 3, 2018 at 9:59:38 AM UTC-5, Pascal Lamblin wrote: >>>> >>>> This is a completely different error message. >>>> This one has to do with cuDNN, not BLAS or MKL. >>>> >>>> Where have you installed cuDNN? >>>> Does _that_ error still happen when you do not ldflags? >>>> >>>> On 2018-04-03 10:46 AM, Qinpeng Wang wrote: >>>> > Hi Pascal, >>>> > >>>> > Thanks for your reply! >>>> > I have "mkl-service" package installed via conda (I have versions of >>>> > installed libraries in my original post), but somehow theano is unable >>>> >>>> > to locate the BLAS library automatically, hence the warning message. >>>> > Since the "gcc-v" output seems reasonable, could you please help me >>>> > figure out how to get rid of the error message in my original post? I >>>> >>>> > attach it here again for your convenience. >>>> > >>>> > When I run: >>>> > |python -c "import theano"| >>>> > >>>> > I get this message: >>>> > >>>> > |ERROR (theano.gpuarray): Could not initialize pygpu, support disabled >>>> >>>> > Traceback (most recent call last): File "C:\Program >>>> > >>>> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", >>>> >>>> > line 227, in <module> use(config.device) File "C:\Program >>>> > >>>> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", >>>> >>>> > line 214, in use init_dev(device, preallocate=preallocate) File >>>> > "C:\Program >>>> > >>>> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", >>>> >>>> > line 121, in init_dev dnn.dnn_available.msg) RuntimeError: You enabled >>>> >>>> > cuDNN, but we aren't able to use it: cannot compile with cuDNN. We got >>>> >>>> > this error: b'C:/Program >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: >>>> >>>> > cannot find C:/Program: No such file or directory C:/Program >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: >>>> >>>> > cannot find >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o: >>>> >>>> > No such file or directory collect2.exe: error: ld returned 1 exit >>>> status' | >>>> > >>>> > >>>> > Thanks! >>>> > >>>> > >>>> > On Tuesday, April 3, 2018 at 9:28:37 AM UTC-5, Pascal Lamblin wrote: >>>> > >>>> > On 2018-03-30 11:16 PM, Qinpeng Wang wrote: >>>> > > Hi Pascal, >>>> > > >>>> > > Thanks for your reply!! Indeed I wasn't really sure how to set >>>> the >>>> > > ldflags parameter, but if I don't have this line, I get this >>>> warning >>>> > > message: >>>> > > >>>> > > WARNING (theano.tensor.blas): Using NumPy C-API based >>>> > implementation for >>>> > > BLAS functions. >>>> > >>>> > This is just a warning, the worse issue would be a slight slow >>>> down in >>>> > some CPU operations. >>>> > >>>> > > After inspecting theano/tensor/blas_headers.py >>>> > > >>>> > < >>>> https://github.com/Theano/Theano/blob/82a3ec977b7c8630d92871e70d62e5a2c52cea62/theano/tensor/blas_headers.py >>>> >>>> > < >>>> https://github.com/Theano/Theano/blob/82a3ec977b7c8630d92871e70d62e5a2c52cea62/theano/tensor/blas_headers.py >>>> >>, >>>> > >>>> > > I found the following: >>>> > > >>>> > > |if not config.blas.ldflags: logger.warning('Using NumPy C-API >>>> based >>>> > > implementation for BLAS functions.')| >>>> > > >>>> > > So I realize I may have to have ldflags in the theaorc file to >>>> >>>> > get rid >>>> > > of this warning message. *How to set ldflags correctly?* >>>> > >>>> > These flags are for specifying where an optimized BLAS library >>>> is, when >>>> > it is not found automatically. >>>> > If you do not have an optimized BLAS library installed, then it >>>> should >>>> > stay empty. >>>> > >>>> > Did you install the "mkl-service" package in conda? >>>> > This is usually the easiest way to install an optimized BLAS that >>>> will >>>> > be automatically found. >>>> > >>>> > > I was asking around what the correct output of "gcc -v" would >>>> > look like, >>>> > > but have not got any reply yet, here it is: >>>> > >>>> > This seems reasonable. >>>> > >>>> > > >>>> > > |Using built-in specs. COLLECT_GCC=gcc >>>> > COLLECT_LTO_WRAPPER=C:/Program\ >>>> > > >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe >>>> >>>> > >>>> > > Target: x86_64-w64-mingw32 Configured with: >>>> ../gcc-5.3.0/configure >>>> > > --prefix=/mingw64 --with-local-prefix=/mingw64/local >>>> > > --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 >>>> > > --target=x86_64-w64-mingw32 >>>> > > >>>> --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include >>>> > > --libexecdir=/mingw64/lib >>>> > > --with-gxx-include-dir=/mingw64/include/c++/5.3.0 >>>> --enable-bootstrap >>>> > > --with-arch=x86-64 --with-tune=generic >>>> > > --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada >>>> > --enable-shared >>>> > > --enable-static --enable-libatomic --enable-threads=posix >>>> > > --enable-graphite --enable-fully-dynamic-string >>>> > > --enable-libstdcxx-time=yes --disable-libstdcxx-pch >>>> > > --disable-libstdcxx-debug >>>> --enable-version-specific-runtime-libs >>>> > > --disable-isl-version-check --enable-lto --enable-libgomp >>>> > > --disable-multilib --enable-checking=release --disable-rpath >>>> > > --disable-win32-registry --disable-nls --disable-werror >>>> > > --disable-symvers --with-libiconv --with-system-zlib >>>> > --with-gmp=/mingw64 >>>> > > --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 >>>> > > --with-pkgversion='Rev5, Built by MSYS2 project' >>>> > > --with-bugurl=https://sourceforge.net/projects/msys2 >>>> > <https://sourceforge.net/projects/msys2> --with-gnu-as >>>> > > --with-gnu-ld Thread model: posix gcc version 5.3.0 (Rev5, >>>> Built by >>>> > > MSYS2 project)| >>>> > > >>>> > > >>>> > > Lastly, I have restarted the computer, the error message stayed >>>> >>>> > the same. >>>> > > >>>> > > Thank you so much! >>>> > > >>>> > > On Friday, March 30, 2018 at 9:38:11 PM UTC-5, Pascal Lamblin >>>> wrote: >>>> > > >>>> > > Your "ldflags" option in the "[blas]" section is not >>>> correct, >>>> > it should >>>> > > at least start with -I or -l, and there should be quotation >>>> >>>> > marks >>>> > > around >>>> > > the path since there is a space in "Program Files". >>>> > > >>>> > > What happens if you do not include this line in the >>>> .theanorc? >>>> > > >>>> > > Are you able to run `gcc -v` from inside the conda env, and >>>> >>>> > what is the >>>> > > output? >>>> > > >>>> > > Also, it may seem stupid, but have you restarted your >>>> > computer, or at >>>> > > least the terminal, since you installed m2w64-toolchain? >>>> > > >>>> > > On 2018-03-30 01:27 PM, Qinpeng Wang wrote: >>>> > > > Hi, all, >>>> > > > >>>> > > > >>>> > > > I'm trying to setup theano 1.0.1 with CUDA 7.5 and >>>> cuDNN 6.0 >>>> > > (Windows7). >>>> > > > I created a new virtual environment with conda and >>>> installed >>>> > > required >>>> > > > libraries like this: >>>> > > > >>>> > > > |conda install numpy scipy mkl-service libpython >>>> > m2w64-toolchain >>>> > > conda >>>> > > > install theano pygpu | >>>> > > > >>>> > > > Here are versions of major relavant libraries: >>>> > > > >>>> > > > |theano 1.0.1 python 3.5.5 numpy 1.14.2 scipy 1.0.0 >>>> > > m2w64-toolchain 5.3.0 >>>> > > > mkl-service 1.1.2 pygpu 0.7.5 libgpuarray 0.7.5 >>>> libpython >>>> > 2.1 mkl >>>> > > 2018.0.2 | >>>> > > > >>>> > > > The way I installed cuDNN is to copy files into >>>> corresponding >>>> > > folders >>>> > > > inside CUDA folder. Originally I installed CUDA at >>>> C:\Program >>>> > > > Files\NVIDIA GPU Computing Toolkit, then I copied the >>>> CUDA >>>> > folder >>>> > > to C root. >>>> > > > >>>> > > > When I run: >>>> > > > |python -c "import theano"| >>>> > > > >>>> > > > I get this message: >>>> > > > >>>> > > > |ERROR (theano.gpuarray): Could not initialize pygpu, >>>> support >>>> > > disabled >>>> > > > Traceback (most recent call last): File "C:\Program >>>> > > > >>>> > > >>>> > >>>> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", >>>> >>>> > > > line 227, in <module> use(config.device) File >>>> "C:\Program >>>> > > > >>>> > > >>>> > >>>> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", >>>> >>>> > > > line 214, in use init_dev(device, >>>> preallocate=preallocate) >>>> > File >>>> > > > "C:\Program >>>> > > > >>>> > > >>>> > >>>> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", >>>> >>>> > > > line 121, in init_dev dnn.dnn_available.msg) >>>> RuntimeError: >>>> > You >>>> > > enabled >>>> > > > cuDNN, but we aren't able to use it: cannot compile with >>>> >>>> > cuDNN. >>>> > > We got >>>> > > > this error: b'C:/Program >>>> > > > >>>> > > >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: >>>> >>>> > >>>> > > >>>> > > > cannot find C:/Program: No such file or directory >>>> C:/Program >>>> > > > >>>> > > >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: >>>> >>>> > >>>> > > >>>> > > > cannot find >>>> > > > >>>> > > >>>> > >>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o: >>>> >>>> > >>>> > > >>>> > > > No such file or directory collect2.exe: error: ld >>>> returned >>>> > 1 exit >>>> > > status' | >>>> > > > >>>> > > > My theanoc file: >>>> > > > >>>> > > > |[global] floatX = float32 device = cuda [dnn] enabled >>>> = True >>>> > > > include_path=C:/CUDA/v7.5/include >>>> > library_path=C:/CUDA/v7.5/lib/x64 >>>> > > > [blas] ldflags = C:/Program >>>> > Files/Anaconda3/envs/t/Library/bin >>>> > > mkl_rt | >>>> > > > >>>> > > > Can somebody help please? >>>> > > > >>>> > > > >>>> > > > Thanks! >>>> > > > >>>> > > > -- >>>> > > > >>>> > > > --- >>>> > > > 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 >>>> <javascript:> >>>> > > > <mailto:theano-users+unsubscr...@googlegroups.com >>>> > <javascript:> <javascript:>>. >>>> > > > For more options, visit >>>> https://groups.google.com/d/optout >>>> > <https://groups.google.com/d/optout> >>>> > > <https://groups.google.com/d/optout >>>> > <https://groups.google.com/d/optout>>. >>>> > > >>>> > > -- >>>> > > Pascal Lamblin >>>> > > >>>> > > -- >>>> > > >>>> > > --- >>>> > > 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 <javascript:> >>>> > > <mailto:theano-users+unsubscr...@googlegroups.com >>>> <javascript:>>. >>>> > > For more options, visit https://groups.google.com/d/optout >>>> > <https://groups.google.com/d/optout>. >>>> > >>>> > -- >>>> > Pascal Lamblin >>>> > >>>> > -- >>>> > >>>> > --- >>>> > 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 >>>> > <mailto:theano-users+unsubscr...@googlegroups.com>. >>>> > For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- >>>> Pascal Lamblin >>>> >>> >>> -- >>> >>> --- >>> 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. >>> For more options, visit https://groups.google.com/d/optout. >>> >>> >>> >> -- >> >> --- >> 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. >> For more options, visit https://groups.google.com/d/optout. >> >> >> > -- > > --- > 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 <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > > -- --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.