# Tag Info

37

I'll try to summarize my experiences obtained in the course of developing ViennaCL, where we have CUDA and OpenCL backends with mostly 1:1 translations of a lot of compute kernels. From your question I'll also assume that we are mostly taking about GPUs here. Performance Portability. First of all, there is no such thing as performance-portable kernels in ...

6

One possibility is to use a combination of ARPACK and ViennaCL: ARPACK is an eigensolver. It works with a callback interface (you supply a function that computes $Ax$ for a given $x$ and it computes the eigenvalues by invoking this function multiple times). If you want to solve a generalized eigenvalue problem ($Ax = \lambda Bx$) you need to provide a ...

5

Short answer: No. You have a number of options here. For your NVIDIA GPU, you will get the best performance by switching to CUDA, rather than OpenCL. You can also upgrade your card, to something like the Geforce Titan, which significanty outperforms the Quadro card for GPU computation. My personal opinion is that CUDA is much nicer to work with, has ...

4

The Thomas algorithm as proposed in most textbooks is inherently serial and anything that just executes the steps concurrently will in general lead to wrong results. You will need a clever modification to parallelize the algorithm which usually comes at the price of at least a logarithmic factor (w.r.t. the number of threads). However, I doubt that you will ...

4

What you are asking is not possible, because you cannot order all cells in such a way that neighbors are always in a continuous range. Suppose we try to construct continuous neighbor lists in 3D. Each interior cell $C_i$ has six neighbors, so it should appear six times in a neighbor list. The only way to construct six continuous neighbor list is as follows: ...

3

Your GeForce 9400M video card is older and probably doesn't support the later OpenCL 1.1 spec. Unfortunately, this is a hardware limitation that you can't fix with software- you'll need to get a newer computer if you want to run this software using OpenCL 1.1. To be more specific, I believe that OpenCL 1.1 support is new in Mac OS X 10.7 but you also ...

3

Since your question seems to be specifically about the Raspberry Pi, I would suggest searching for "Raspberry Pi GPGPU" in addition to the book suggested by @Kirill. GPGPU refers to general purpose computing on graphics processing units and should get you results specific to using the RPi's GPU for non-graphics tasks. You should also have a look at the ...

3

I don't know a definitive source, but have a look at "GPU Gems 2", which is a book published by NVIDIA about ten years ago and available online. While much of it is about computer graphics, it has a number of sections devoted to general purpose computing on GPUs from the time before CUDA and OpenCL. I am not familiar enough with Raspberry Pi to tell if this ...

2

The answer to my question is that dgemm operates in a column major format, where C and the openCL kernel that I was implementing are row major. I changed my kernel code to the one below and that fixed everything. I found this out because I saw a Cblas_dgemm call where the first operator was CBLAS_ROW_MAJOR, telling the cblas solver to work in a row major ...

2

I'm the project lead on LibGeoDecomp, so I thought I might chime in. Yes, you can implement a FEM with LibGeoDecomp. We're currently working on an improved data container for exactly this use case. But to be fair: completion of that work is still months away, and until then performance will not be optimal. Feel free to contact me via e-mail if you still ...

2

Since buffer's sizes fixed at the moment they created, the only way is to simulate variable length arrays: Create an array of maximum size and use an extra variable so that OpenCL-kernel can store how much of this (max)array is in use.

2

The Intel OpenMP Run Time library has been open sourced, so you might have look at a few functions in there. There are many open source MPI libraries (MPICH2, OpenMPI, MVAPICH2, etc.), and the MPI interface is standardized, so reading the standards document can be enlightening. OpenMP is also standardized, so you might look to that as well. CUDA is basically ...

2

It's impossible to tell without knowing the code you are using. But fortunately, segmentation faults are easy to debug: basically, a segfault means that you are accessing memory you should not access, and the operating system stops your program at the point where this is happening. This means, that if you run your program under a debugger, then you will see ...

2

I can't speak to how you would best work with an AMD GPU. However, of the languages you list CUDA could be considered the lowest level, highest-performance language for general applications. This is because it's a hardware-specific language developed by the vendor specifically for their hardware. It can and does offer options that won't translate directly ...

1

I don't have enough reputation, so I (have to) post an answer instead of a comment. An alternative is to use the HIP compiler with its own language. See here: https://github.com/ROCm-Developer-Tools/HIP In addition to the GPU-agnostic language, this compiler seems to be able to transform CUDA code to be executed on AMD GPUs.

1

Both CPUs you list are much more powerful than your existing laptop and assuming you're getting even reasonable parallelism out of the loop should contribute significant speedup. Without knowing your specific application I [personal opinion] would likely choose the processor with fewer faster cores since on a wide variety of tasks single core performance is ...

1

You ought to be interested in this preprint in which we discuss exactly the sort of questions you seem to be having: https://arxiv.org/abs/1612.03369

1

The BOINC project does what you describe. Some of the most famous projects using this concept are Folding@home and SETI@home.

1

Looks like I have figured it out, at least for OpenCL ... #ifdef cl_khr_fp64 #pragma OPENCL EXTENSION cl_khr_fp64 : enable #elif defined(cl_amd_fp64) #pragma OPENCL EXTENSION cl_amd_fp64 : enable #else #error "Double precision doubleing point not supported by OpenCL implementation." #endif double4 Convolution(__read_only image2d_t srcImg, int2 ...

1

Is nablaN an integer? Because if it is, then the expression 1 / pow( 1 + (nablaN / k), 2); is considered the division of an integer by an integer, which is going to be zero if nablaN is greater than 2. These are just the rules of the C programming language.

Only top voted, non community-wiki answers of a minimum length are eligible