You will need a src/Makevars.win to get a .cu file to compile. It is not a known extension: see §1.1.4 of 'Writing R Extensions'

Most likely you need something like

cudasize.dll:
        nvcc -m32 --shared -o $@ cuda4.cu

in Makevars.win.

Also, heed the advice about trying R CMD INSTALL before R CMD check.


On 18/07/2013 13:45, Hodgess, Erin wrote:
Now let's try again.  I set up the CYGWIN environment command as kindly 
suggested by Prof. Ripley.

Here are my next steps:

R CMD build cudasize
* checking for file 'cudasize/DESCRIPTION' ... OK
* preparing 'cudasize':
* checking DESCRIPTION meta-information ... OK
* cleaning src
Warning: 
C:/Users/erin/AppData/Local/Temp/RtmpOWOS4q/Rbuilda8820822194/cudasize/man/f1.Rd:33:
 unexpected '{'
Warning: 
C:/Users/erin/AppData/Local/Temp/RtmpOWOS4q/Rbuilda8820822194/cudasize/man/f1.Rd:37:
 unexpected '}'
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'cudasize_1.0.tar.gz'


c:\PROGRA~1\R\R-3.0.1\bin\i386>R CMD check cudasize_1.0.tar.gz
R CMD check cudasize_1.0.tar.gz
* using log directory 'c:/PROGRA~1/R/R-3.0.1/bin/i386/cudasize.Rcheck'
* using R version 3.0.1 (2013-05-16)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'cudasize/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'cudasize' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... WARNING
Subdirectory 'src' contains:
   cuda4.cu
These are unlikely file names for src files.
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'cudasize' can be installed ... ERROR
Installation failed.
See 'c:/PROGRA~1/R/R-3.0.1/bin/i386/cudasize.Rcheck/00install.out' for details.

And the 00install.out file is:
* installing *source* package 'cudasize' ...
** libs

*** arch - i386
ERROR: compilation failed for package 'cudasize'
* removing 'c:/PROGRA~1/R/R-3.0.1/bin/i386/cudasize.Rcheck/cudasize'

So it doesn't seem that CUDA is  working here.  However, if I compile cuda4.cu 
from the command line, it works fine, as seen here:

nvcc -m32 --shared -o cuda4.dll cuda4.cu
  nvcc -m32 --shared -o cuda4.dll cuda4.cu
cuda4.cu
tmpxft_000013d4_00000000-5_cuda4.cudafe1.gpu
tmpxft_000013d4_00000000-10_cuda4.cudafe2.gpu
cuda4.cu
tmpxft_000013d4_00000000-5_cuda4.cudafe1.cpp
tmpxft_000013d4_00000000-15_cuda4.ii

So that is my situation.

This is Windows 7, R version 3.0.1
Thanks,
Erin

________________________________________
From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf 
of Prof Brian Ripley [rip...@stats.ox.ac.uk]
Sent: Thursday, July 18, 2013 2:44 AM
To: r-devel@r-project.org
Subject: Re: [Rd] question about Makeconf and nvcc/CUDA

On 18/07/2013 07:45, Hodgess, Erin wrote:
Dear R development:



I'm not sure if this is the appropriate list, but it's a start.



I would like to put together a package which contains a CUDA program on Windows 
7.  I believe that it has to do with the Makeconf file in the etc directory.

That message is just that you have not set up Rtools fully.  As it says,
set CYGWIN=nodosfilewarning in your environment.  See §D.3 in the
R-admin manual, e.g.
http://cran.r-project.org/doc/manuals/r-release/R-admin.html#The-command-line-tools
.

We can see nothing from what you supplied, as it was not a build in
clean sources.





But when I just use the nvcc with the shared option, I can use the dyn.load 
command, but when I use the is.loaded function, it shows FALSE.







Here are the results of the check command:



c:\PROGRA~1\R\R-3.0.1\bin\i386>R CMD check cudasize
R CMD check cudasize
* using log directory 'c:/PROGRA~1/R/R-3.0.1/bin/i386/cudasize.Rcheck'
* using R version 3.0.1 (2013-05-16)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* checking for file 'cudasize/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'cudasize' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'cudasize' can be installed ... ERROR
Installation failed.
See 'c:/PROGRA~1/R/R-3.0.1/bin/i386/cudasize.Rcheck/00install.out' for details.

And the 00install.out file:

* installing *source* package 'cudasize' ...

** libs



*** arch - i386

cygwin warning:
    MS-DOS style path detected: c:/PROGRA~1/R/R-30~1.1/etc/i386/Makeconf
    Preferred POSIX equivalent is: 
/cygdrive/c/PROGRA~1/R/R-30~1.1/etc/i386/Makeconf
    CYGWIN environment variable option "nodosfilewarning" turns off this 
warning.
    Consult the user's guide for more details about POSIX paths:
      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
cygwin warning:
    MS-DOS style path detected: c:/PROGRA~1/R/R-30~1.1/etc/i386/Makeconf
    Preferred POSIX equivalent is: 
/cygdrive/c/PROGRA~1/R/R-30~1.1/etc/i386/Makeconf
    CYGWIN environment variable option "nodosfilewarning" turns off this 
warning.
    Consult the user's guide for more details about POSIX paths:
      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
make: `symbols.rds' is up to date.
ERROR: compilation failed for package 'cudasize'

* removing 'c:/PROGRA~1/R/R-3.0.1/bin/i386/cudasize.Rcheck/cudasize'



I've been experimenting with the Makeconf file, but to no avail.



Does anyone have any suggestions, please?



Thanks,

Erin



       [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to