Most Popular
1500 questions
13
votes
1 answer
Meaning of "-0.0" in Python?
We are finding in Python some occasional errors in our coordinate transforms and other similar computations that produce a result of -0.0. What purpose does this serve in Python? So far it creates a zero testing error (that is, -0.0 does not equal…
Chris Ison
- 231
- 2
- 4
13
votes
3 answers
How are scientific computing workflows faring on Apple's M1 hardware
The initial wave of reviews for Apple's M1 hardware are out, and there's lots of generic benchmarks and data on workflows on professional programs for creative users, but I haven't seen anyone talking about the experience of using something like the…
Fomite
- 2,383
- 1
- 18
- 25
13
votes
3 answers
How to properly calculate CPU and GPU FLOPS performance?
Problem
I'm trying to calculate CPU / GPU FLOPS performance but I'm not sure if I'm doing it correctly.
Let's say we have:
A Kaby Lake CPU (clock: 2.8 GHz, cores: 4, threads: 8)
A Pascal GPU (clock: 1.3 GHz, cores: 768).
This Wiki page says that…
AlekseyHoffman
- 231
- 1
- 2
- 6
13
votes
2 answers
Numerical computation of Lyapunov exponent
I'm trying to compute the Lyapunov exponent for a smooth continuous time dynamical system(say, $\dot{\bar{x}} = f(\bar x)$). I using the QR decomposition method. Here are the steps that I follow.
Choose some initial condition in the basin of the…
sbp
- 263
- 2
- 7
13
votes
3 answers
Memory usage in fortran when using an array of derived type with pointer
In this sample program I'm doing the same thing (at least I think so) in two different ways. I'm running this on my Linux pc and monitoring the memory usage with top. Using gfortran I find that in the first way (between "1" and "2") the memory used…
chris
- 1,055
- 7
- 12
13
votes
1 answer
Why is pinning a point to remove a null space bad?
A Poisson equation with all Neumann boundary conditions has a single constant dimensional null space. When solving via a Krylov method, the null space can be removed either by subtracting the mean of the solution each iteration or by pinning the…
Geoffrey Irving
- 3,969
- 18
- 41
13
votes
4 answers
Example where autodiff works but symbolic differentiation will not?
According to the survey paper on autodiff (linked) Autodiff works on inputs that cannot be specified in closed form but can be described by a sequence of code, each component of which is differentiable. Autodiff also works on code that can be…
Lucas Roberts
- 231
- 2
- 6
13
votes
1 answer
When training a neural network, why choose Adam over L-BGFS for the optimizer?
More specifically, when training a neural network, what reasons are there for choosing an optimizer from the family consisting of stochastic gradient descent (SGD) and its extensions (RMSProp, Adam, etc.) instead of from the family of Quasi-Newton…
tietäjä
- 133
- 1
- 6
13
votes
2 answers
Alternatives to von neumann stability analysis for finite difference methods
I'm working on solving the coupled one-dimensional poroelasticity equations (biot's model), given as:
$$-(\lambda+ 2\mu) \frac{\partial^2 u}{\partial x^2} + \frac{\partial p}{\partial x} = 0$$
$$\frac{\partial}{\partial t} \left[ \gamma p +…
Paul
- 12,045
- 7
- 56
- 129
13
votes
3 answers
Mathematically, why does mass matrix / load vector lumping work?
I know that people often replace consistent mass matrices with lumped diagonal matrices. In the past, I've also implemented a code where the load vector is assembled in a lumped fashion rather than an FEM-consistent fashion. But I've never looked…
Paul
- 12,045
- 7
- 56
- 129
13
votes
3 answers
What are the fastest available implementations of BLAS/LAPACK or other linear algebra routines on GPU systems?
nVidia, for example, has CUBLAS, which promises 7-14x speedup. Naively, this is nowhere near the theoretical throughput of any of nVidia's GPU cards. What are the challenges in speeding up linear algebra on GPUs, and are there faster linear algebra…
Jiahao Chen
- 231
- 2
- 5
13
votes
4 answers
In floating point arithmetic, why does numerical imprecision result from adding a small term to a difference of large terms?
I have been reading the book Computer Simulation of Liquids by Allen and Tildesley. Starting on page 71, the authors discuss the various algorithms that are used to integrate Newton's equations of motion in molecular dynamics (MD) simulations. …
Andrew
- 711
- 1
- 5
- 12
13
votes
1 answer
Numerical Methods for the Schrodinger Equation
We are comparing the performance of various numerical methods that can be used to solve the Schrodinger's Equation for the Hydrogen Atom interacting with a strong laser pulse (too strong to use perturbation methods). When using discretization…
Amanda Crawford
- 131
- 3
13
votes
3 answers
In what application cases are additive preconditioning schemes superior to multiplicative ones?
In both domain decomposition (DD) and multigrid (MG) methods, one may compose the application of the block updates or coarse corrections as either additive or multiplicative. For pointwise solvers, this is the difference between the Jacobi and…
Peter Brune
- 1,675
- 12
- 20
13
votes
1 answer
What are the guidelines for conducting computational experiments?
Physics, biology, chemistry etc. have different sets of rules for making experiments: what events are considered relevant, how to avoid contamination of samples, how to create and fix a reproducing process and so on.
What are standards, protocols…
homocomputeris
- 397
- 1
- 12