Commit Graph

18 Commits

Author SHA1 Message Date
Chuck Atkins
570e41e809 Fix scope resolution for nvidia pthread workaround 2016-03-18 12:00:17 -04:00
Robert Maynard
df8c13eeda Mark vtkm_force_linking_to_pthread_to_fix_nvidia_libgl_bug as static 2016-03-18 11:25:59 -04:00
Robert Maynard
c1c43d19d4 Force GCC linker to see that we need pthread to work around nvidia driver bug.
1. Some Linux distributions default linker implicitly enables the as-needed
linking flag. This means that your shared library or executable will only
link to libraries from which they use symbols. So if you explicitly link to
pthread but don't use any symbols you wont have a 'DT_NEEDED' entry for
pthread.

2. NVidia libGL (driver version 352 ) uses pthread but doesn't have
a DT_NEEDED entry for the library. When you run ldd or readelf on the library
you won't detect any reference to the pthread library. Aside this is odd
since the mesa version does explicitly link to pthread. But if you run the
following command:
       "strings  /usr/lib/nvidia-352/libGL.so.1 | grep pthread | less"
You will see the following:
{ pthread_create
  pthread_self
  pthread_equal
  pthread_key_crea
  ...
  libpthread.so.0
  libpthread.so
  pthread_create
}
This is very strong evidence that this library is using pthread.

3. So what does this all mean?
It means that on system that use the linking flag 'as-needed', are using
the nvidia driver, and don't use pthread will generate binaries that crash
on launch. The only way to work around this issue is to do either:
  A: Specify 'no-as-needed' to the linker potentially causing over-linking
     and a  slow down in link time
  B: Use a method from pthread, making the linker realize that pthread is
     needed.

 We went with method B.
2016-03-18 09:34:03 -04:00
Robert Maynard
2f98cdf717 Resolves Issue #56: ChooseCudaDevice functions are in the proper namespace. 2016-02-26 13:51:28 -05:00
Robert Maynard
711b7122dc Remove warnings from CopyInto with MSVC. 2016-01-25 14:33:46 -05:00
Robert Maynard
763691a7b3 Update TransferToOpenGL to use ArrayHandle::CopyInto.
Now that ArrayHandle has CopyInto we can simplify the code inside
the OpenGL transfer of non basic array handles.
2016-01-25 10:12:18 -05:00
Robert Maynard
f5f9939f26 Update all of vtkm to understand it can only identify as one compiler. 2016-01-12 11:05:40 -05:00
Robert Maynard
4d270187c7 Update the opengl interop code to be significantly faster with cuda.
Now that we hold the state information about the transferring of an array,
we can do a far more efficient transferring.
2015-11-05 13:50:35 -05:00
Robert Maynard
f38673f618 Replace ErrorControlOutOfMemory with ErrorControlBadAllocation. 2015-10-01 14:25:28 -04:00
Kenneth Moreland
2e64a4e296 Fix warning about wrong type in GL call
Was storing a size in std::size_t and giving that to OpenGL functions,
which are using GLsizeiptr.
2015-09-29 10:24:34 -04:00
Robert Maynard
970ec3f426 Remove conversion warning from opengl interop code. 2015-09-21 14:17:25 -04:00
Robert Maynard
41b40ae380 Always pass raw memory pointers to glBufferSubData. 2015-09-02 13:26:33 -04:00
Robert Maynard
efc9f0c5cf All occurrences of thrust invocation uses an execution policy. 2015-09-01 19:32:49 -04:00
Robert Maynard
78cef0c33d Suppress deprecation warnings about glut as we investigate our options.
Starting in OSX 10.9, apple has deprecated the glut.h provided header
so we need to figure out how we want to do window management on OSX. I expect
the way forward is to require the developer to install openGLUT.
2015-08-27 09:37:13 -04:00
Robert Maynard
944cd6111f Update all of the opengl folder to use the correct line-endings.
Previously they had been comitted with Windows line endings.
2015-08-26 12:30:15 -04:00
Robert Maynard
611cc4d06b Correct unsigned to signed warnings in opengl interop code. 2015-08-25 17:36:31 -04:00
heschroots
754bf623f3 Fix compile time errors
Add DeviceAdapterAlgorithm as an include to the TransferToOpenGL
file.

Clean up comments in opengl/cuda/internal/TransferToOpenGL.h

Add FindGLEW.cmake to the License exepmtion list
2015-08-21 11:17:10 -07:00
hschroot
2abf599c42 Add OpenGL Interop Functionality
Copy the OpenGL Interop code from DAX and convert it to VTKm.
Tests include transferring data to an OpenGL context for all VTKm common
data types.

A WindowBase class using GLUT is also included.
2015-08-21 11:17:10 -07:00