[ 1%] Building NVCC (Device) object ocuutil/./
ocuutil_generated_kernel_wrapper.cu.o
[ 2%] Building NVCC (Device) object ocuutil/./
ocuutil_generated_timer.cu.o
[ 4%] Building NVCC (Device) object ocuutil/./
ocuutil_generated_memory.cu.o
Scanning dependencies of target ocuutil
[ 5%] Building CXX object ocuutil/CMakeFiles/ocuutil.dir/
timing_pool.cpp.o
[ 7%] Building CXX object ocuutil/CMakeFiles/ocuutil.dir/
imagefile.cpp.o
Linking CXX static library libocuutil.a
[ 7%] Built target ocuutil
[ 8%] Building NVCC (Device) object ocustorage/./
ocustorage_generated_grid3dboundary.cu.o
/usr/include/c++/4.2.1/new(95): error: first parameter of allocation
function must be of type "size_t"
/usr/include/c++/4.2.1/new(96): error: first parameter of allocation
function must be of type "size_t"
/usr/include/c++/4.2.1/new(99): error: first parameter of allocation
function must be of type "size_t"
/usr/include/c++/4.2.1/new(100): error: first parameter of allocation
function must be of type "size_t"
/usr/include/c++/4.2.1/new(105): error: first parameter of allocation
function must be of type "size_t"
/usr/include/c++/4.2.1/new(106): error: first parameter of allocation
function must be of type "size_t"
6 errors detected in the compilation of "/tmp/
tmpxft_00014d6b_00000000-4_grid3dboundary.cpp1.ii".
CMake Error at ocustorage_generated_grid3dboundary.cu.o.cmake:205
(message):
Error generating file
/Users/simon/mercurial/opencurrent/sm13_rel/ocustorage/./
ocustorage_generated_grid3dboundary.cu.o
make[2]: *** [ocustorage/./ocustorage_generated_grid3dboundary.cu.o]
Error 1
make[1]: *** [ocustorage/CMakeFiles/ocustorage.dir/all] Error 2
make: *** [all] Error 2
http://forums.nvidia.com/index.php?showforum=75
I'll ask around internally if anyone knows of version
incompatibilities.
What version of cuda, nvcc, and OSX are you using, by the way?
CFLAGS=-m32 CXXFLAGS=-m32 cmake ../src/
and
CFLAGS="-m32 -U__BLOCKS__" CXXFLAGS="-m32 -U__BLOCKS__" cmake ../src/
I'm not sure if thats where you intended the -U__BLOCKS__ to go
though..
Thanks again
-Simon
[ 9%] Building NVCC (Device) object ocustorage/./
ocustorage_generated_grid1ddev.cu.o
/Users/simon/mercurial/opencurrent/src/ocuutil/float_routines.h(37):
error: identifier "__finite" is undefined
1 error detected in the compilation of "/tmp/
tmpxft_00015459_00000000-4_grid1ddev.cpp1.ii".
CMake Error at ocustorage_generated_grid1ddev.cu.o.cmake:205
(message):
Error generating file
/Users/simon/mercurial/opencurrent/sm13_rel/ocustorage/./
ocustorage_generated_grid1ddev.cu.o
make[2]: *** [ocustorage/./ocustorage_generated_grid1ddev.cu.o] Error
1
make[1]: *** [ocustorage/CMakeFiles/ocustorage.dir/all] Error 2
make: *** [all] Error 2
On Feb 4, 5:02 pm, Jonathan Cohen <jco...@jcohen.name> wrote:
> Ok, I asked internally and there are some bumps with OSX 10.6 (is that what
> you're on?) Here's what I found out:
>
> 10.6 introduced a bunch of crazy things, like their new GCD blocks
> mechanism, into a bunch of standard header files. nvcc does not play nice
> with them unless you add -U__BLOCKS__
>
> Also since 10.6 defaults to 64-bit compilation you're going to have linking
> trouble as there is currently no libcudart.dylib that is 64-bit
>
> You have to get it to compile a 32 bit app. This usually involves setting
> -m32 on your compilation flags. If you use CMake then I think you want this
> in an **empty** build directory.
I changed the __finite(f) call when CUDACC is defined to
__isfinitef(f) -- my preprocessing knowledge isn't good enough to
write a correct fix!
This is how far the compile is getting now:
-Simon
[ 29%] Built target ocustorage
[ 30%] Building NVCC (Device) object ocuequation/./
ocuequation_generated_sol_pcgpressure3d.cu.o
/usr/include/c++/4.2.1/ext/atomicity.h(51): error: identifier
"__sync_fetch_and_add" is undefined
/usr/include/c++/4.2.1/ext/atomicity.h(55): error: identifier
"__sync_fetch_and_add" is undefined
2 errors detected in the compilation of "/tmp/
tmpxft_00016ece_00000000-4_sol_pcgpressure3d.cpp1.ii".
CMake Error at ocuequation_generated_sol_pcgpressure3d.cu.o.cmake:205
(message):
Error generating file
/Users/simon/mercurial/opencurrent/sm14_rel/ocuequation/./
ocuequation_generated_sol_pcgpressure3d.cu.o
make[2]: *** [ocuequation/./
ocuequation_generated_sol_pcgpressure3d.cu.o] Error 1
make[1]: *** [ocuequation/CMakeFiles/ocuequation.dir/all] Error 2
make: *** [all] Error 2
On Feb 5, 11:38 am, Jonathan Cohen <jco...@jcohen.name> wrote:
> Ah, ok, that's actually a problem in the source code, due to my not testing
> on OSX.
>
> http://code.google.com/p/opencurrent/source/browse/src/ocuutil/float_...
I'm hitting up against a wall in that I can't seem to work out how to
use the gcc-4.0 includes -- even if I use the gcc-4.0 binary, it uses
the includes from 4.2.1
On Feb 5, 12:56 pm, Jonathan Cohen <jco...@jcohen.name> wrote:
> Actually, can you verify what version of gcc you are in fact using? The
> include path is 4.2.1, but can you run 'gcc --version' just to check?
>
>
>
> On Fri, Feb 5, 2010 at 12:53 PM, Jonathan Cohen <jco...@jcohen.name> wrote:
> > Ugh. I've seen this problem on linux with gcc 4.4, which is (currently)
> > incompatible with CUDA. But you're using gcc 4.2, which should work fine,
> > except that OSX isn't the same as linux so all bets are off.
>
> > Just to make sure - you are using cuda 2.3? Can you roll-back to gcc 4.1
> > and try that instead? I'll ask around, and I'd suggest checking the cuda
> > OSX forum I mentioned before.
>
> > -Jon
>
I installed gcc_select from macports, and set the default compiler to
4.0.0 -- this fixed the compile issues I was having above.
Currently, if I compile against sm13, it compiles fully, but does not
pass any non-netcdf tests (not surprising as as best I can tell I have
an sm11 capable card -- GeForce 9600M GT in an early 2009 Macbook
Pro). However, if I try to compile with sm11 (or sm12), I get the
errors below -- I assume this is something to do with sm11 having no
double support?
It seems so close to working now!
[ 69%] Building CXX object apps/CMakeFiles/pcg.dir/pcg.cpp.o
Linking CXX executable pcg
Undefined symbols:
"ocu::Sol_PCGPressure3DDevice<double>::solve(double&, double, int)",
referenced from:
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
run_pcg(int, int, int, double, double, double, double, double)in
pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
"ocu::Sol_MultigridPressure3DDevice<double>::initialize_storage(int,
int, int, double, double, double, ocu::Grid3DDevice<double>*)",
referenced from:
init_mg_solver(ocu::Sol_MultigridPressure3DDevice<double>&,
ocu::Grid3DDevice<double>&, ocu::BoundaryConditionSet, int, int, int,
double, double, double)in pcg.cpp.o
"ocu::Sol_PCGPressure3DDevice<double>::initialize_storage(int, int,
int, float, float, float, ocu::Grid3DDevice<double>*,
ocu::Grid3DDevice<double>*)", referenced from:
init_pcg_solver(ocu::Sol_PCGPressure3DDevice<double>&,
ocu::Grid3DDevice<double>&, ocu::Grid3DDevice<double>&,
ocu::BoundaryConditionSet, int, int, int, float, float, float)in
pcg.cpp.o
"ocu::Sol_PCGPressure3DDevice<double>::Sol_PCGPressure3DDevice()",
referenced from:
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
run_pcg(int, int, int, double, double, double, double, double)in
pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
"ocu::Sol_MultigridPressure3DDevice<double>::Sol_MultigridPressure3DDevice()",
referenced from:
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
run_mg(int, int, int, double, double, double, double)in
pcg.cpp.o
"ocu::Sol_PCGPressure3DDevice<double>::~Sol_PCGPressure3DDevice()",
referenced from:
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
run_pcg(int, int, int, double, double, double, double, double)in
pcg.cpp.o
run_pcg(int, int, int, double, double, double, double, double)in
pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
compare_precond(int, int, int, double, double, double, double,
double)in pcg.cpp.o
"ocu::Sol_MultigridPressure3DDevice<double>::~Sol_MultigridPressure3DDevice()",
referenced from:
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
compare_mg_pcg(int, int, int, double, double, double, double)in
pcg.cpp.o
run_mg(int, int, int, double, double, double, double)in
pcg.cpp.o
run_mg(int, int, int, double, double, double, double)in
pcg.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [apps/pcg] Error 1
make[1]: *** [apps/CMakeFiles/pcg.dir/all] Error 2
make: *** [all] Error 2
Jon
On Feb 7, 6:45 pm, Jonathan Cohen <jco...@jcohen.name> wrote:
> Oh shoot, that's my fault. I'll post a fix tomorrow (watching the
> superbowl now - go Saints!)
>
> Jon
>
> > "ocu::Sol_MultigridPressure3DDevice<double>::Sol_MultigridPressure3DDevice( )",
> > referenced from:
> > compare_mg_pcg(int, int, int, double, double, double, double)in
> > pcg.cpp.o
> > run_mg(int, int, int, double, double, double, double)in
> > pcg.cpp.o
> > "ocu::Sol_PCGPressure3DDevice<double>::~Sol_PCGPressure3DDevice()",
> > referenced from:
> > compare_mg_pcg(int, int, int, double, double, double, double)in
> > pcg.cpp.o
> > compare_mg_pcg(int, int, int, double, double, double, double)in
> > pcg.cpp.o
> > run_pcg(int, int, int, double, double, double, double, double)in
> > pcg.cpp.o
> > run_pcg(int, int, int, double, double, double, double, double)in
> > pcg.cpp.o
> > compare_precond(int, int, int, double, double, double, double,
> > double)in pcg.cpp.o
> > compare_precond(int, int, int, double, double, double, double,
> > double)in pcg.cpp.o
> > compare_precond(int, int, int, double, double, double, double,
> > double)in pcg.cpp.o
> > compare_precond(int, int, int, double, double, double, double,
> > double)in pcg.cpp.o
>
> > "ocu::Sol_MultigridPressure3DDevice<double>::~Sol_MultigridPressure3DDevice ()",
> ...
>
> read more »
However, there where no updates to pcg.cpp, where the problem seems to
be occurring, so its unlikely this would have helped anyway!
Any ideas would as always be much appreciated!
-Simon
> ...
>
> read more »