All Questions

Filter by
Sorted by
Tagged with
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 ...
3
votes
3answers
244 views

Evaluating $\binom{100}{i}a^i(1-a)^{(100-i)}$ in GMP-GNU

I want to calculate $\binom{100}{i}a^i(1-a)^{(100-i)}$ for different $i$ with $a=0.001$ using GMP-GNU. How can this be done?
8
votes
4answers
355 views

(How) do you take into account memory fragmentation?

I use an example from finite element theory, but anybody who maintains a large datastructure and successively extends it will find something similar. Suppose I have an unstructured mesh of points and ...
6
votes
1answer
452 views

An efficient 'drizzle' algorithm?

What efficient implementations of a 'drizzle' algorithm are available? The problem is, given a timestream of data in which each element is associated with a pixel in a map, how do you create that map?...
3
votes
2answers
1k views

Applying same feature selection to multiple data sets with Weka

I am using the Weka workbench to train a protein fold classifier. I imported my training data into Weka and performed PCA-based feature selection. This seems to have worked fine, but now I cannot ...
56
votes
12answers
33k 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 ...
12
votes
3answers
306 views

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, ...
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 ...
5
votes
5answers
819 views

Introductions to hp-FEM

do you know good introductions into or surveys $hp$-adaptive finite elements? In particular I do not know how the heuristics for choosing spatial refinement or increased polynomial degree are ...
11
votes
2answers
5k views

How to work with function pointers in Fortran in scientific programs

Here is a typical usage of function pointers in C. I would like to do something similar in Fortran. I have some ideas, but I would like to know if there is some canonical way to do so. The function ...
13
votes
1answer
1k views

What are possible methods to solve compressible Euler equations

I would like to write my own solver for compressible Euler equations, and most importantly I want it to work robustly in all situations. I would like it to be FE based (DG is ok). What are the ...
14
votes
4answers
348 views

How to deal with too much data?

Our plasma dynamics simulations often produce too much information. During the simulations we record various physical properties on a grid (x,y,z,t) that is as large as (8192x1024x1024x1500), for at ...
1
vote
0answers
57 views

Assembled human ESTs for annotation

I am annotating protein-coding genes in a region of the human genome and am looking for a set of assembled ESTs I can use as evidence for constructing gene models. A quick search of NCBI's SRA shows 4,...
16
votes
3answers
561 views

How should I study creating and programming HPC systems?

I'm in a field that doesn't necessarily do a great deal of HPC work, and when it does encounter it, it's often the result of researchers from other fields exploring new applications to their methods ...
4
votes
1answer
889 views

Sampling from posterior predictive distribution

First post. I'm working on this problem using Bayesian methods. In desperation I'm considering using p-values (shock horror), specifically posterior predictive p-values. So I need to simulate from the ...
4
votes
4answers
349 views

Approximate a distribution function from a finite sample

Say I have a simulation that produces a single floating point number as a result, and a different number is produced each time the simulation runs. These numbers are randomly distributed according to ...
4
votes
2answers
718 views

COMSOL on Ubuntu (10.04 LTS and 11.04)

I am running into a problem with COMSOL 4.2.0.187 on Ubuntu (both 10.04 LTS and 11.04). When using the option -np x with x > 1, ...
21
votes
3answers
18k views

Intel Fortran Compiler: tips on optimization at compilation

I will start with my personal experience in our lab. Back in the ifort 9 and 10 days, we used to be quite aggressive with the optimizations, compiling with -O3 and processor specific flags (-xW -xSSE4....
3
votes
1answer
166 views

Global optimal sequence alignment algorithms

As far as global optimal sequence alignment goes, is the Needleman-Wunsch and Hirschberg's algorithm still state of the art? Or have there been any improvements to these algorithms since they were ...
5
votes
4answers
4k views

Where can I find a database of simple chemical structures in XYZ format?

As from Title. Where can I find a database of simple chemical structures in XYZ format, possibly with a simple CAS -> XYZ or InChi -> XYZ REST service ?
23
votes
1answer
1k views

Is there a numerical algorithm for finding an asymptotic slope?

I have a series of data points $(x_i,y_i)$ which I expect to (approximately) follow a function $y(x)$ that asymptotes to a line at large $x$. Essentially, $f(x) \equiv y(x) - (ax + b)$ approaches zero ...
14
votes
3answers
230 views

Best practices for describing agent-based models

I work fairly heavily in mathematical biology/epidemiology, where most of the modeling/computational science work is still dominated by sets of ODEs, admittedly sometimes fairly elaborate sets of them....
7
votes
1answer
202 views

Optimal way to find stationary solutions of the PDE

I am researching heat diffusion in an optical element irradiated by laser. This problem is described by the PDE which I wrote down in this question. I am using an implicit numerical scheme to model ...
3
votes
1answer
160 views

Artificial RNA 3D folding

I have a 50-base, artificially created RNA sequence and I would like to obtain its 3D structure. What software should I use for this purpose?
12
votes
2answers
622 views

Quickly finding rough lines in sets of points

In a particular class of detectors, our data comes out as pairs of points in two dimensions, and we want to string these points into lines. The data is noisy, and is binned in one direction but not ...
3
votes
2answers
724 views

Linear regression via SVD not producing best fit with escalating polynomial degree

I am using a basic singular value decomposition (via LAPACK) routine in FORTRAN to solve an overdetermined system in the form of $A\cdot X = B$ where $\mathrm{size}(A) = [m,n]$ with $m > n$. My ...
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, ...
5
votes
2answers
226 views

Enumerating hexahedral cell vertices and faces in arbitrary dimension

I have a Cartesian mesh in $d$ dimensions, and I would like to enumerate all the subcells of a given hexahedral cell. If I am just enumerating the vertices of a cell (or cells that contain a vertex) I ...
8
votes
1answer
992 views

How can I compute the Schur complement in PETSc?

How can I compute the Schur complement: $$ S = K_{bb} - K_{ba} K_{aa}^{-1} K_{ab} $$ where $$ K=\begin{pmatrix} K_{aa} & K_{ab} \\ K_{ba} & K_{bb} \end{pmatrix} $$ (in some ordering) is a ...
4
votes
1answer
130 views

Profiling numeric libraries

What efforts have been made to quantify the costs of the common numeric workhorse operations such as those found in LAPACK, BLAS, sparse matrix operations, etc.... We have several libraries which ...
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 ...
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 ...
20
votes
3answers
2k views

Parallel I/O options, in particular parallel HDF5

I have an application that can be trivially parallelized but its performance is to a large extent I/O bound. The application reads a single input array stored in a file that is typically 2-5 GB in ...
17
votes
3answers
322 views

What programming strategies can I take for easily modifying algorithm parameters?

Developing scientific algorithms is a highly iterative process often involving changing lots of parameters that I will want to vary either as part of my experimental design or as part of tweaking ...
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 ...
14
votes
3answers
1k views

Why is my parallel solver slower than my sequential solver?

I was playing around with PETSc and noticed that when I run my program with more than one process via MPI it seems to run even slower! How can I check to see what is going on?
5
votes
1answer
204 views

Discretization of Classical Density Functional Theory (CDFT) problems

I formulate questions about ion densities in biological and materials problems using Classical Density Functional Theory, as in this paper which is also on the arXiv. The discretization in that paper ...
5
votes
2answers
355 views

Pauli repulsion contribution in electronic structure computations

I am looking for a method to estimate the contribution from Pauli repulsion to the interaction energy of a molecular dimer in an electronic structure computation (e.g. with Density Functional Theory). ...
19
votes
2answers
2k views

How to determine if a numerical solution to a PDE is converging to a continuum solution?

The Lax equivalence theorem states that consistency and stability of a numerical scheme for a linear initial value problem is a necessary and sufficient condition for convergence. But for nonlinear ...
16
votes
2answers
266 views

What are the best practices for algorithms and implementation of multi-physics simulations?

Multi-physics simulation involves coupling multiple "physics", often with different space and/or time scales. Additionally, the single-physics codes are often written by different teams. The most ...
5
votes
1answer
146 views

Looking for an understandable discussion of creating Maximum Entropy classifiers

Texts, articles, and papers on Maximum Entropy Classifiers tend to come in two varieties: the more popular "upper level", and the more technical. The popular variety are good at explaining the ...
19
votes
4answers
4k views

Is Fortuna or Mersenne Twister preferable as an algorithmic RNG?

A recent answer mentioned the use of Fortuna or Mersenne Twister Random Number Generators (RNGs) to seed a Monte Carlo simulation. I hadn't heard of Fortuna before so I looked it up - looks like it is ...
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" ...
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,...
8
votes
4answers
598 views

How do I know which low-discrepancy sequence to use?

Whenever one uses a quasi-Monte Carlo method for cubature or optimization, it seems that there's a wide variety of low-discrepancy sequences to choose from, associated with the names of van der Corput,...
25
votes
6answers
4k views

How can the gravitational n-body problem be solved in parallel?

How can the gravitational n-body problem be solved numerically in parallel? Is precision-complexity tradeoff possible? How does precision influence the quality of the model?
17
votes
6answers
4k views

How does one determine the point group of a molecule?

You've managed to finally find out how the atoms are spatially arranged on your newly-discovered molecular entity. Through, say, spectroscopic means, you are now in possession of a bunch of atom ...
7
votes
1answer
202 views

Is multigrid useful for finding all eigenvalues and eigenvectors of a differential equation, or only the lowest eigenvalues?

I've been considering using a multigrid method to calculate the eigenvalues of a particular PDE. I know that multigrid is extremely good at finding the least eigenvalues and their associated ...
6
votes
1answer
509 views

Benchmarking performance in CFD: how to compare machines and codes?

Informally in our lab, we have developed 2 metrics to compare CFD solvers over the range of machines we have access to. One is called COMP, which stands for COde Machine Performance. This single ...
12
votes
3answers
1k views

Efficient tridiagonal matrix algorithm implementation

I am solving a physical problem using implicit numerical scheme. This leads me to solving a linear equation with tridiagonal matrix. I've coded this algorithm from Wikipedia. I wonder if there is an ...

15 30 50 per page