All Questions

Filter by
Sorted by
Tagged with
158
votes
10answers
121k views

Recommendations for a usable, fast C++ matrix library?

Does anyone have recommendations on a usable, fast C++ matrix library? What I mean by usable is the following: Matrix objects have an intuitive interface (ex.: I can use rows and columns while ...
89
votes
14answers
9k views

Is it worthwhile to write unit tests for scientific research codes?

I am strongly convinced of the value of using tests that verify a complete program (e.g. convergence tests), including an automated set of regression tests. After reading some programming books, I've ...
83
votes
10answers
20k views

What kinds of problems lend themselves well to GPU computing?

So I've got a decent head for what problems I work with are best one in serial, and which can be managed in parallel. But right now, I don't have much of an idea of what's best handled by CPU-based ...
77
votes
17answers
87k views

Is there a high quality nonlinear programming solver for Python?

I have several challenging non-convex global optimization problems to solve. Currently I use MATLAB's Optimization Toolbox (specifically, fmincon() with algorithm=<...
74
votes
6answers
17k views

How much better are Fortran compilers really?

This question is an extension of two discussions that came up recently in the replies to "C++ vs Fortran for HPC". And it is a bit more of a challenge than a question... One of the most often-heard ...
66
votes
10answers
12k views

What are some good strategies for improving the serial performance of my code?

I work in computational science, and as a result, I spend a non-trivial amount of my time trying to increase the scientific throughput of many codes, as well as understanding the efficiency of these ...
56
votes
12answers
32k views

C++ vs Fortran for HPC

In my computational science PhD program, we are working almost exclusively in C++ and Fortran. It seems like some professors prefer one over the other. I am wondering which one is 'better' or if one ...
55
votes
5answers
27k views

How do I take the FFT of unevenly spaced data?

The Fast Fourier Transform algorithm computes a Fourier decomposition under the assumption that its input points are equally spaced in the time domain, $t_k = kT$. What if they're not? Is there ...
54
votes
17answers
3k views

Is it common not to use libraries for standard numerical algorithms, and why?

A lot of numerical algorithms (integration, differentiation, interpolation, special functions, etc.) are available in scientific computation libraries like GSL. But I often see code with "hand-rolled" ...
54
votes
4answers
8k views

How mature is the “Julia” scientific computing language project?

I'm considering learning a new language to use for numerical/simulation modelling projects, as a (partial) replacement for the C++ and Python that I currently use. I came across Julia, which sounds ...
52
votes
7answers
6k views

What core skills should every computational scientist have? [closed]

Every scientist needs to know a bit about statistics: what correlation means, what a confidence interval is, and so on. Similarly, every scientist ought to know a bit about computing: the question is, ...
49
votes
4answers
7k views

What guidelines should I follow when choosing a sparse linear system solver?

Sparse linear systems turn up with increasing frequency in applications. One has a lot of routines to choose from for solving these systems. At the highest level, there is a watershed between direct (...
48
votes
3answers
31k views

What are the conceptual differences between the finite element and finite volume method?

There is an obvious difference between finite difference and the finite volume method (moving from point definition of the equations to integral averages over cells). But I find FEM and FVM to be very ...
46
votes
5answers
8k views

What are criteria to choose between finite-differences and finite-elements

I am used to thinking of finite-differences as a special case of finite-elements, on a very constrained grid. So what are the conditions on how to choose between Finite Difference Method (FDM) and ...
44
votes
8answers
2k views

What are good ways to document scientific software?

Many times, when I've inherited or encountered scientific code written by other people (or occasionally, even my own work), I've noticed that documentation is either sparse or nonexistent. If I'm ...
43
votes
7answers
5k views

Is algorithmic analysis by flop-counting obsolete?

In my numerical analysis courses, I learned to analyze the efficiency of algorithms by counting the number of floating-point operations (flops) they require, relative to the size of the problem. For ...
42
votes
9answers
8k views

Functional Programming and Scientific Computing

I apologize if this is a vague question, but here goes: Over the past few years, functional programming has received a lot of attention in the Software Engineering community. Many have started using ...
41
votes
18answers
2k views

Where can one obtain good data sets/test problems for testing algorithms/routines?

In evaluating the quality of a piece of software you are about to use (whether it's something you wrote or a canned package) in computational work, it is often a good idea to see how well it works on ...
41
votes
4answers
19k views

What makes Fortran fast?

Fortran has a special place in numerical programming. You can certainly make good and fast software in other languages, but Fortran keeps performing very well despite its age. Moreover, it's easier to ...
40
votes
14answers
18k views

Which software and workflow is recommend for publication of scientific data and graphs?

Which software provides a good workflow from simple plotting of a few datapoints up to the creation of publication level graphics with detailed styles, mathematical typesetting and "professional ...
40
votes
4answers
1k views

Scientific standards for numerical errors

In my field of research the specification of experimental errors is commonly accepted and publications which fail to provide them are highly criticized. At the same time I often find that results of ...
40
votes
8answers
1k views

How to link code to publications

Scholarly papers in scientific computing (and many other fields, nowadays) typically involve some amount of code or even whole software packages that were written specifically for that paper or were ...
39
votes
3answers
3k views

What's the state of the art in parallel ODE methods?

I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or ...
38
votes
2answers
7k views

Why is division so much more complex than other arithmetic operations?

I recently encountered a case where I needed an integer division operation on a chip that lacked one (ARM Cortex-A8). While trying to research why that must be, I found out that in general division ...
36
votes
4answers
29k views

How does the MATLAB backslash operator solve $Ax=b$ for square matrices?

I was comparing a few of my codes to "stock" MATLAB codes. I am surprised at the results. I ran a sample code (Sparse Matrix) ...
36
votes
5answers
6k views

Is it possible to have a career in SciComp without contributing to arms research?

I am at an international conference (ICIAM2019) about numerical methods and am surprised by the prevalence of applications directly relatable to arms research. examples: One award winner holds his ...
36
votes
7answers
2k views

What programming paradigms should I be investing in if I want my code to run on petascale machines in the future?

It's pretty clear from a survey of the top500 that the industry is trending towards an exponential increase in processing cores. The largest supercomputers all use MPI for communication between nodes,...
35
votes
7answers
8k views

Is it a good idea to use vector<vector<double>> to form a matrix class for high performance scientific computing code?

Is it a good idea to use vector<vector<double>> (using std) to form a matrix class for high performance scientific computing code? If the answer is no. ...
35
votes
6answers
3k views

What attributes make a figure “professional-quality”?

I've heard people say that plots produced by ORIGIN tend to look polished and "professional," whereas plots produced by Mathematica do not. However, most plot-creation programs are quite configurable ...
35
votes
7answers
64k views

Parallelizing a for-loop in Python

Are there any tools in Python that are like Matlab's parfor? I found this thread, but it's four years old. I thought maybe someone here might have more recent experience. Here's an example of the ...
35
votes
6answers
2k views

Symbolic software packages for Matrix expressions?

We know that $\mathbf A$ is symmetric and positive-definite. We know that $\mathbf B$ is orthogonal: Question: is $\mathbf B \cdot\mathbf A \cdot\mathbf B^\top$ symmetric and positive-definite? ...
35
votes
2answers
7k views

Mathematical Libraries for OpenCL?

I am looking for information from anyone that has tried to use OpenCL in their scientific code. Has anyone tried (recently) ViennaCL? If so, how does it compare to cusp? What about OCLTools? Does it ...
34
votes
8answers
854 views

How do I make sure that the results of my simulations and the results in my paper are always in sync?

In one of my papers, I list some numerical results in addition to some figures. What I'd like to do is make sure that the numerical results in my paper always agree with the code. Right now, I just ...
34
votes
6answers
4k views

Are there simple ways to numerically solve the time-dependent Schrödinger equation?

I would like to run some simple simulations of scattering of wavepackets off of simple potentials in one dimension. Are there simple ways to numerically solve the one-dimensional TDSE for a single ...
34
votes
1answer
14k views

CUDA vs OpenCL as of late 2013

How do CUDA and OpenCL compare to each other as of late 2013 from a programmer's perspective? My group is thinking about trying to make use of GPU computing. Would we be limiting ourself ...
34
votes
11answers
2k views

Venues for publishing papers that emphasize software

Software is a fundamental part of computational science, and is increasingly recognized as an essential part of the scientific record. Given the value of using existing and well-tested code, it seems ...
32
votes
3answers
106k views

What is the simplest way to do a user-local install of a python package?

I don't want to deal with virtualenv for a local Python installation, I just want to install a few packages locally without dealing with the PYTHONPATH environment ...
32
votes
2answers
4k views

Strange oscillation when solving the advection equation by finite-difference with fully closed Neumann boundary conditions (reflection at boundaries)

I am trying to solving the advection equation but have a strange oscillation appearing in the solution when the wave reflects from the boundaries. If anybody has seen this artefact before I would be ...
31
votes
3answers
14k views

How to choose a method for solving linear equations

To my knowledge, there are 4 ways to solving a system of linear equations (correct me if there are more): If the system matrix is a full-rank square matrix, you can use Cramer’s Rule; Compute the ...
31
votes
9answers
4k views

Modern resources for learning FEM

I need to get started using Finite Element Methods. I am about to start reading Numerical solutions of partial differential equations by the finite element method by Claes Johnson, but it's dated 1987....
31
votes
5answers
11k views

Performance differences between ATLAS and MKL?

ATLAS is a free BLAS/LAPACK replacement that tunes itself to the machine when compiled. MKL is the commercial library shipped by Intel. Are these two libraries comparable when it comes to performance, ...
30
votes
4answers
2k views

Why is local conservation important when solving PDEs?

Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs. What can go wrong when using a ...
30
votes
8answers
2k views

Scientific workflow management system

Can anyone recommend me a good workflow management system (WMS), preferably in Python? So far I have been using GNU Make, but it introduces a layer of complexity that I want to avoid. A good WMS ...
30
votes
2answers
7k views

When should log1p and expm1 be used?

I have a simple question that is really hard to Google (besides the canonical What Every Computer Scientist Should Know About Floating-Point Arithmetic paper). When should functions such as ...
29
votes
16answers
9k views

Good examples of “two is easy, three is hard” in computational sciences

I recently encountered a formulation of the meta-phenomenon: "two is easy, three is hard" (phrased this way by Federico Poloni), which can be described, as follows: When a certain problem is ...
29
votes
7answers
6k views

Alternatives to Journal of Computational Physics

The Journal of Computational Physics has been an important outlet for computational science in the past, and I have published there before. For the benefit of those (like me) who have signed the ...
29
votes
4answers
2k views

What tools or approaches are available to speed up code written in Python?

Background: I think I might want to port some code that calculates matrix exponential-vector products using a Krylov subspace method from MATLAB to Python. (Specifically, Jitse Niesen's expmvp ...
29
votes
7answers
2k views

Where do the laws of quantum mechanics break down in simulations?

As someone who holds a BA in physics I was somewhat scandalized when I began working with molecular simulations. It was a bit of a shock to discover that even the most detailed and computationally ...
29
votes
9answers
1k views

What is a good way to run parameter studies in C++

The problem I'm currently working on a Finite Element Navier Stokes simulation and I would like to investigate the effects of a variety of parameters. Some parameters are specified in an input file ...
28
votes
2answers
9k views

Does a tiny determinant imply ill-conditioning of a matrix?

If I have a square invertible matrix and I take its determinant, and I find that $\det(A) \approx 0$, does this imply that the matrix is poorly conditioned? Is the converse also true? Does an ill-...

15 30 50 per page