The offending file: openmpi/contrib/vt/vt/vtlib/vt_cudartwrap.c is easily fixed with placing a const in front of the void *ptr for the cudaPointerGetAttributes wrapper code segments.
Then the openmpi 1.5.5 release compiles with Cuda 4.1 <>Srinath ================================= Srinath Vadlamani ================================= On Mon, Apr 2, 2012 at 11:26 AM, Srinath Vadlamani < srinath.vadlam...@gmail.com> wrote: > I have a build error with the newest release openmpi 1.5.5 building > against. cuda 4.1 > > Making all in vtlib > make[5]: Entering directory > `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_openmpi/openmpi/work/build/ompi/contrib/vt/vt/vtlib' > CC vt_libwrap.lo > CC vt_gpu.lo > CC vt_cudartwrap.lo > CC vt_cudart.lo > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_openmpi/openmpi/work/openmpi-1.5.5/ompi/contrib/vt/vt/vtlib/vt_cudartwrap.c:1378:14: > error: conflicting types for 'cudaPointerGetAttributes' > cudaError_t cudaPointerGetAttributes(struct cudaPointerAttributes > *attributes, void *ptr) > ^ > In file included from > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_openmpi/openmpi/work/openmpi-1.5.5/ompi/contrib/vt/vt/vtlib/vt_cudartwrap.c:13: > In file included from > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_openmpi/openmpi/work/openmpi-1.5.5/ompi/contrib/vt/vt/vtlib/vt_cudartwrap.h:25: > In file included from > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_openmpi/openmpi/work/openmpi-1.5.5/ompi/contrib/vt/vt/vtlib/vt_cuda_runtime_api.h:20: > /usr/local/cuda/include/cuda_runtime_api.h:3899:39: note: previous > declaration is here > extern __host__ cudaError_t CUDARTAPI cudaPointerGetAttributes(struct > cudaPointerAttributes *attributes, const void *ptr); > ^ > 1 error generated. > make[5]: *** [vt_cudartwrap.lo] Error 1 > > The error stems from the use of cuda 4.0 version of > cudaPointerGetAttribute > from: > > http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/html/group__CUDART__UNIFIED_gccb4831aa37562c0af3e6b6712e0f12c.html > > but: > cudaPointerGetAttributes(struct cudaPointerAttributes *attributes, const > void *ptr); > > is the correct signature for Cuda 4.1 > > Cuda 4.1 is the current release so I suggest a patch be made for openpmpi > 1.5.5 to detect cuda version and then use the appropriate signature. > > <>Srinath > > > ================================= > Srinath Vadlamani > ================================= >