Questions about the execution speed and memory usage of algorithms, data structures, languages and libraries.

learn more… | top users | synonyms

3
votes
1answer
89 views

Simple Runge-Kutta Scheme for nonlinear PDE

I am new to this community as well as to scientific programming. I programmed a simple 4th order Runge-Kutta for the 1-D Cahn-Hilliard Equation for some first simple calculations on pattern forming ...
0
votes
1answer
105 views

Power series regression linear fit in VBA excel

I wrote a program that calculates the best fit in VBA excel for the following model $$ y_k=c_1x_k+c_0+c_{-1}(x_k)^{-1} $$ solving for the best fit parameters $c_1$, $c_0$, and $c_{-1}$. However I ...
4
votes
2answers
97 views

Can other running processes harm the performance of my simulation?

I don't have an high-end machine on which run my simulation (Python + C extensions, based on numpy for calculations) Thus I intend to run the program on my PC, for several hours. I won't use the ...
7
votes
3answers
152 views

What is the fastest opensource implementation of Bessel functions computation?

I'm looking for an open-source (to use and learn from) software which computes Bessel functions of integer order of real argument to double precision the fastest among all such implementations. ...
0
votes
1answer
73 views

Choosing hardware to use with PETSc

I would like to know more on choosing hardware to get the maximum price/performance when using the PETSc library (and various third-party preconditionners) I am currently working on a 2 cpu ...
0
votes
0answers
17 views

Measure Performance of Distributed computing system

Assume you have a distributed computing network of 3 PCs with GFLOPS of 30, 20 and 10. How would you measure the performance of the distributed network as a whole? assuming you know the flops of ...
2
votes
1answer
302 views

What is the preferred and efficient approach for interpolating multidimensional data?

What is the preferred and efficient approach for interpolating multidimensional data? Things I'm worried about: performance for construction, single/batch evaluation handling dimensions from 1 to 6 ...
4
votes
1answer
89 views

How to evaluate a series of derivatives?

Consider the function $$f(\mathbf{x}) = \sum_{n=0}^{N} a_n \left( (\mathbf{b}-\mathbf{x})\cdot \nabla \right)^n \frac{1}{r}$$ where $r = |\mathbf{x}| = \sqrt{(x-x_0)^2 + (y-y_0)^2}$ and $a_n$ and ...
1
vote
0answers
88 views

Speeding up the classical Jacobi method using Scheduled Relaxation method? [closed]

There has been quite a flutter recently in the iterative world about an algorithm that speeds up the classical Jacobi method by as much as 200 times using a scheduled relaxation method where a ...
2
votes
2answers
88 views

Expected computational time for DNS computation of fluid flow

Using an established criterion involving capturing eddies down to the Kolmogorov length scale it can be reasoned that the order of grid points in the computational mesh needs to be $N^3 \ge Re^{9/4}$ ...
3
votes
1answer
407 views

Why is my MATLAB code for back-substitution slower than the backslash operator?

I wrote the code below to invert an upper triangular matrix, avoiding any possible multiplication/subtraction by zero. It just uses $\frac{1}{6}n^3+\ldots$ flops instead of $n^3+\ldots$ flops. ...
7
votes
1answer
142 views

Performance of adding eight numbers sequentially vs. in a tree

The simplest way to add 8 numbers would be something like this, sum = one + two + three + four + five + six + seven + eight; This (in C) would add ...
2
votes
2answers
97 views

fastest and most efficent way to count all combinations in many sets and sum them together

I am a Java programmer who has reached the limits of brute computer power. My relational database (and non relational databases) is not producing results quick enough and I have hit a bottleneck in ...
2
votes
1answer
146 views

Is R or Matlab currently faster?

The most up-to-date performance benchmarks comparison between R and Matlab that I could find are several years out of date: 1 2 Is anyone aware of a more up-to-date comparison?
6
votes
0answers
150 views

Are there improved method of computing the following expression?

given a symmetric matrix $Y \in \mathbb{R}^{n \times n}$, and an arbitrary matrix $X \in \mathbb{R}^{n \times n}$, and a vector $v \in \mathbb{R}^{n \times 1}$, is it possible to compute the following ...
0
votes
2answers
266 views

Impact of frequent row major / column major conversions using LAPACK/BLAS?

If you call a library like LAPACK or BLAS (which are written in FORTRAN and use column major order) from a C-like language that uses row major order, won't you lose performance and use a lot of memory ...
1
vote
2answers
225 views

Lua and Fortran (or Python) I/O

I am writing a global climate simulation software system. My idea is the following : At the top of everything, I interface to the OS using D, a very powerful language for compile time code ...
4
votes
1answer
125 views

Does it make sense to build ATLAS from source on a cloud machine?

ATLAS is an extremely popular linear algebra library. When you install ATLAS from source, it tries to automatically tune a number of parameters to give you the fastest code. Does it make sense to do ...
4
votes
1answer
304 views

Fortran 90/95: Deallocating variables

I understand the crucial importance of freeing memory when certain variables or arrays need to be reused later in the program, or may not be in use for a while. However, in my experience with ...
1
vote
2answers
67 views

Performance metrics to compare initial-boundary value problem solutions

I am comparing the performance several finite difference methods of solving an initial-boundary value problem. There are several dimensions to this comparison: Number of cells Number of timesteps ...
4
votes
1answer
129 views

Fast way to repeatedly solve a small nonlinear equation system

A small nonlinear equation system (sizes around 12 ✕ 12) needs to be solved repeatedly (millions of times); each time with some variation in parameters/coefficients (although the equation set is ...
3
votes
2answers
202 views

Finding the minimum hamming distance between a bit vector and any pairwise intersection of multiple bit vectors

I'm looking for a way to optimize this procedure. This is the problem: I have a list of bit vectors $\mathbf{A} = [ a_1, a_2, a_3, ..., a_n ]$ I have a list of bit vectors $\mathbf{B} = [ b_1, b_2, ...
3
votes
2answers
238 views

Why is computational cost measured in Floating Pt. Ops. in times of parallel computing?

In times of parallel computing, it seems to me that algorithms (also basic ones, like matrix-vector multiplication) should be measured by their dependent steps (that use results from steps before) ...
8
votes
10answers
2k views
3
votes
1answer
147 views

Increasing thread number degrades performance

I have a problem with parallelization and the brownian dynamics (molecular dynamics) code that I am using. We have our own home-grown framework at the university, and recently we've made the change ...
7
votes
1answer
136 views

WELL pseudo-random number generations

I've used MT19937 in a test harness to generate uniformly (unsigned) 32-bit [0, $2^{32}$- 1] values, based on the original Authors' mt19937.c implementation, to ...
5
votes
1answer
456 views

What is the best way to multiply a diagonal matrix (in fortran)

What is the best way to compute: $$ Y = D X $$ where $D \in \mathbb{R}^{m\times m}$ is diagonal and $X \in \mathbb{C}^{m \times n}$ is general. I am mostly interested in these two cases: $m ...
2
votes
2answers
158 views

Ways to speed up the computations

OK, I have a FORTRAN code which numerically integrates equations of motion for large data sets of initial conditions. I run this program in my PC and it requires about 1 day of computations per data ...
3
votes
1answer
141 views

What is the correct way of performing numerical experiments on desktops?

Suppose I want to set up an experiment to measure the performance of some numerical code on a desktop machine running Linux/Windows/MacOS. What kind of environment should I arrange in order to get ...
4
votes
1answer
104 views

What is the added cost of generalizing an eigensystem?

Problem Let's say I can write a model as the Hermitian eigensystem: $$ A x = \lambda x $$ where $A \in \mathbb{C}^{n\times n}$ is Hermitian, or as the generalized Hermitian eigensystem: $$ \tilde A ...
4
votes
1answer
156 views

Using PAPI in PETSc code

I am trying to count the number of cache misses, total cycles, etc. per iteration of a for loop inside MatMult_SeqSBAIJ_2() . ...
6
votes
2answers
264 views

Why performance is given in Gflop/s rather than actual time in seconds

While reading many research-papers comparing parallel implementations of algorithms on different machines/architectures, I have noticed that the performance comparison is always listed in terms of ...
8
votes
2answers
250 views

What is the underlying structure of scientific code performance?

Consider two computers with different hardware and software configurations. When running the exact same serial Navier-Stokes code on each platform it takes x and y time to execute one iteration for ...
6
votes
1answer
95 views

Measures of parsimony for numerical models?

There are hundreds of different types of performance measures for numerical models, many of which are applicable to many different types of models. But a good model doesn't just perform well, it ...
8
votes
3answers
6k views

Nvidia K20X vs GeForce Titan for GPGPU acceleration

Im trying to understand the difference between these two graphics cards for academic computing, specifically for the DGEMM component. If we look at the raw statistics, both have the same GK110 chip, ...
13
votes
3answers
387 views

Comparison of iteration methods: number of iterations vs. cpu time

I am comparing two iterative methods for inverting random square matrices. Since the matrices are random, every test case takes both different amounts of iterations and different elapsed times. My ...
11
votes
3answers
449 views

Is there any benefit to compiling LAPACK from source versus installing the prebuilt package from Ubuntu?

I know that ATLAS is able to optimize itself for the machine it is compiled on and thus maximum benefits are found by compiling from source. Is there any benefit to compiling LAPACK from source? It ...
9
votes
1answer
2k views

What is the fastest way to compute all eigenvalues of a very big and sparse adjacency matrix in python?

I'm trying to figure out if there is a faster way to compute all the eigenvalues and eigenvectors of a very big and sparse adjacency matrix than using scipy.sparse.linalg.eigsh As far as I know, this ...
5
votes
1answer
248 views

Reference BLAS/LAPACK from NETLIB is twice as fast as MKL for complex numbers

I'm solving the Helmholtz equation using PETSc. I found with the PETSc configure option --download-f-blas-lapack my program runs twice as fast over running it with ...
2
votes
0answers
107 views

Prediction model on GPU [closed]

I am doing a small project at school. I have done my code implementations in CUDA and did some performance measurements with real values, i.e. running the program with different number of threads, ...
2
votes
2answers
152 views

Speedup prediction of rotating mask filter

I am trying to do the speed up analysis of the rotating mask filter (section 4.2.3). Let $N^2$ be the pixels in the image and let $m^2$ be the neighborhood of a given pixel, what I have for my ...
8
votes
2answers
195 views

How do Volkov and Demmel experimentally determine the latencies, line sizes, and page sizes of a GPU?

In "LU, QR and Cholesky Factorizations using Vector Capabilities of GPUs", by Vasily Volkov and James Demmel, there is an interesting way to interpret the latencies, line sizes, and page sizes of a ...
3
votes
3answers
152 views

How do I get reliable timing data for time spent in function calls in my code?

This question is a follow-up to Fortran: Best way to time sections of your code?. If I want to time functions in my code, I know I could use gprof or kcachegrind. I also know that the results from ...
3
votes
1answer
500 views

Effecient CFD programming techniques

I'm trying to make highly efficient CFD programming complex for solving combustion problems. I've finished writing core which realises mathematical model, and now I'm concerned about code performance. ...
10
votes
1answer
510 views

What is the impact of C++11 move semantics in the context of scientific computing?

C++11 introduces move semantics which can, for example, improve code performance in situations where C++03 would need to perform a copy construction or copy assignment. This article reports that ...
20
votes
1answer
712 views

How does the performance of Python/Numpy array operations scale with increasing array dimensions?

How do Python/Numpy arrays scale with increasing array dimensions? This is based on some behaviour I noticed while benchmarking Python code for this question: How to express this complicated ...
6
votes
5answers
248 views

Evaluate the sum

I want to evaluate the sum $$\sum_{k=1}^\infty \left(\frac{i+1}{\sqrt{2}}\right)^k\cdot k^{-\alpha}$$ where $i=\sqrt{-1}$ and $\alpha\in[\frac{3}{4},1]$ with 8 digits accuracy. If I am willing to ...
10
votes
5answers
707 views

Calculation of the sparsity structure for finite element matrices

Question: What methods are available to accurately and efficiently calculate the sparsity structure of a finite element matrix? Info: I'm working on a Poisson Pressure Equation solver, using ...
2
votes
0answers
335 views

Cusp Library performance worse than PETSC (GMRES 200 iterations) Why?

I wanted to compare the speeds of the GMRES implementations in the CUSP and the PETSc libraries. The matrix (A) used for testing was a 3d Laplacian matrix obtained by using the 7 point stencil on a ...
10
votes
1answer
186 views

Statistical models for local memory/compute, network latency, and bandwidth jitter in HPC

Parallel computation is frequently modeled using a deterministic local rate of computation, latency overhead, and network bandwidth. In reality, these are spatially variable and non-deterministic. ...