Hot answers tagged

20 votes
Accepted

The real myth of GPU (specifically CUDA) really speed up FEM/CFD

Here's the deal with GPUs. On a GPU, every single core is slow. Really slow. However, you have thousands of cores. If you can effectively use the thousands of cores at a time, then your algorithm will ...
user avatar
17 votes
Accepted

CUDA & Python for numerical integration and solving differential equations

Julia's DifferentialEquations.jl is all GPU-compatible. If you make your arrays GPU-based arrays, then the solver recompiles to be all on the GPU (no data transfers). For example: ...
user avatar
9 votes

Solving unconstrained nonlinear optimization problems on GPU

I have implemented quite a wide variety of non-linear solvers on the GPU, including LBFGS, Barzilai Borwein gradient descent and non-linear conjugate gradient. For this, the non-linear conjugate ...
user avatar
  • 2,473
5 votes

The real myth of GPU (specifically CUDA) really speed up FEM/CFD

To extend Chris Rackauckas's exhaustive answer with a reference try to look pdf by Torres, Gonzalez-Escribano, Llanos. It is about the tuning of a gpu, that is an important aspect for performance. ...
user avatar
5 votes

Why am I not seeing faster neural network training after upgrading to a vastly better GPU?

I suppose, you right and your network is not that big to 100%-utilize the GPU. The bottle-neck here seems to be not the GPU itself, but the transfer rate between RAM and VRAM and here the difference ...
user avatar
  • 114
5 votes
Accepted

What would be a good approach to solving this large data non-linear least squares optimisation

I don't know much about tracking implicit surfaces, so I'm just going to start with the optimization problem and go from there. The optimization problem is, at the core, nonlinear least squares, and ...
user avatar
  • 3,013
4 votes

Machine precision and local error

I'm using double precision values in the calculation. Is it feasible of me to demand of my integrator that the difference between the 4th and 5th order estimates be < 1 x 10 ^-16 if machine ...
user avatar
3 votes
Accepted

Efficient Successive Over Relaxation using Cuda?

Synchronization. You can't synchronize threads across different blocks in the same grid. On the other hand, if you execute kernels the way you do, they are guaranteed to execute in sequence, so all ...
user avatar
  • 11.4k
3 votes

using GPUs before CUDA and OpenCL

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 ...
user avatar
3 votes
Accepted

using GPUs before CUDA and OpenCL

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 ...
user avatar
  • 11.4k
3 votes
Accepted

How can I use Scipy to fit data generated from a C++ model?

Other comments have suggested a file-based interface, using an actual C/C++ optimization library, or extending Python with C++. Those are probably better ways to solve your problem, but here's a more ...
user avatar
  • 772
2 votes

Machine precision and local error

As I see it, it makes sense to compare on the level of machine precision. In the worst case you will not be able to satisfy your criterion because of rounding errors, but this is a Type I error (the ...
user avatar
  • 3,408
2 votes

HPC reading material

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 ...
user avatar
  • 10.8k
2 votes

Which python library for GPU sparse linear system solver library

I have found pycuda particularly useful as wrapper for cuda in python. Especially the section on metaprogramming is useful if you are interested in building more sophisticated frameworks. It's a ...
user avatar
  • 277
2 votes

GPGPU language for AMD?

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 ...
user avatar
  • 3,111
2 votes

Demo example for OpenFOAM with CUDA

I suggest to start form this page, where you can find different project related to OpenFoam that use GPU. Keep in mind that OpenFoam was born with the intent to resolve practical case in applied ...
user avatar
2 votes

what does `cusparse<t>csrsv2_analysis()` do?

Structural and numerical zeros describe how zero values in your matrix are stored. Structural zeros are zeros that are implied to be zero because they are not present in the data structure. ...
user avatar
2 votes

CUDA & Python for numerical integration and solving differential equations

I have seen that people use CuPy; and scikit-cuda. But, I don't see that any of those provide differential equations capabilities. Looking around, I found CudaPyInt and it uses PyCuda.
user avatar
  • 8,006
1 vote

Source Code for Particle Simulation, Cuda, PyCuda

After asking the q, I was able to find a sample code; The PyCuda code of this paper, COMPARISON OF PYTHON 3 SINGLE-GPU PARALLELIZATION TECHNOLOGIES, is below. It is written for 2D. http://ceur-ws.org/...
user avatar
  • 229
1 vote
Accepted

Solving triangular matrix equations on a GPU

1) Is there a mathematical trick to simplify the above matrix equations? As in, only having to do one inverse operation instead of two. Yes: Schur complement formulation. Your system is equivalent to ...
user avatar
1 vote
Accepted

Matrix requirements for cusparse*csrgemm2

It seems that cusparse library expects the CSR matrix to be ordered. If the matrix is not ordered, the cusparse functions fail. Ordering helps to fix the above mentioned issue.
user avatar
1 vote

GPGPU language for AMD?

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-...
user avatar
  • 131
1 vote

CPU and GPU influence on task parallel execution performance

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 ...
user avatar
1 vote

Which python library for GPU sparse linear system solver library

Pycuda is one of the more pythonic way to handle cuda in python as @nluigi suggested. If you are open to call C/C++ code inside python there is also CUSP: Cusp is a library for sparse linear ...
user avatar
1 vote

Classifying Marching Cube voxels from SPH output data using CUDA

It is a different approach but maybe you could do a point cloud surface reconstruction using total variation denoising as in here. They have a demo code that you could use as a base for your ...
user avatar
1 vote
Accepted

Efficiently rotate vector in 2D (and 3D)

Some of the standard methods for random rotations in 3D (Sphere Point Picking) are listed on Mathworld. On a CPU, Marsaglia's method is quite efficient, because it avoids expensive $\sin$ and $\cos$ ...
user avatar
1 vote
Accepted

CUDA Fortran: Multi GPU Programming and memory allocation

I'm not sure if this would be a better fit for the StackOverflow, but here goes. The best way to do this is to make a new type, which contains the allocatable array for that particular GPU. Have a ...
user avatar
  • 2,473
1 vote

How to get proper parameters of SPH simulation?

A few constraints that usually work in scientific SPH (weakly compressible) computations: particle radius or influence radius, $\Delta$: define it arbitrarily to set the resolution. smoothing radius, ...
user avatar
1 vote

Good Finite Element Library for a small project

Your target size of 10,000 degrees of freedom should be easy to meet without embedding an entire FEM library (which may anyway be hard to do, as others have pointed out), and in much less than a ...
user avatar
  • 586
1 vote

Good Finite Element Library for a small project

Since you want your program to be embedded in a game, something like a physics engine for structures, a good idea is to use an explicit FEM. Something similar to this simulations done with Verlet ...
user avatar
  • 8,006

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