Hot answers tagged

62

As so often, the choice depends on (1) the problem you are trying to solve, (2) the skills you have, and (3) the people you work with (unless it's a solo project). I'll leave (3) aside for the moment because it depends on everyone's individual situation. Problem dependence: Fortran excels at array processing. If your problem can be described in terms of ...


44

It's a bad idea because vector needs to allocate as many objects in space as there are rows in your matrix. Allocation is expensive, but primarily it is a bad idea because the data of your matrix now exists in a number of arrays scattered around memory, rather than all in one place where the processor cache can easily access it. It's also a wasteful storage ...


37

I think that both C++ and Fortran are good enough and work well. However I think that Fortran is better for numeric scientific computing, for algorithms that can be expressed using arrays and don't need other sophisticated data structures, so in fields like finite differences/elements, PDE solvers, electronic structure calculations. Fortran is a domain ...


37

I'll try to summarize my experiences obtained in the course of developing ViennaCL, where we have CUDA and OpenCL backends with mostly 1:1 translations of a lot of compute kernels. From your question I'll also assume that we are mostly taking about GPUs here. Performance Portability. First of all, there is no such thing as performance-portable kernels in ...


34

Historical Perspective It is really impossible to say what the new paradigms will be like in the future, for example a good historical perspective I suggest reading Ken Kennedy's Rise and Fall of HPF. Kennedy gives an account of two emerging patterns, MPI versus a smart compiler, and details how MPI had the right amount of early adopters and flexibility to ...


31

I'm also throwing my two cents in kind of late, but I've only just seen this thread and I feel that, for posterity, there are a few points that desperately need to be made. Note in the following that I will talk about C and not C++. Why? Well, otherwise it's apples and oranges to compare a full-fledged dynamically typed object-oriented language with ...


19

The question is too broad and vague to be really be answered. However, I do see one notable point against OpenCL, from the point of view of scientific computing, which is rarely emphasized. So far, there has been no effort to produce open source, infrastructure libraries for OpenCL, whereas CUDA has several excellent options: CUBLAS, CUFFT, CUSPARSE Thrust, ...


19

Let me try and break down your requirements: Maintainability Reading/writing text data Strong interfaces/capability for LU factorizations Sparse linear solvers Performance and scalability to large data From this list, I would consider the following languages: C, C++, Fortran, Python, MATLAB, Java Julia is a promising new language, but the community is ...


19

Ultimately, the answer to this question depends on the prices being charged for the services that you need. At some very low price, this would almost certainly be better than buying your own computer, while at some higher price you would be better off buying your own computer. The case for using a shared resource is pretty strong though and these factors ...


18

In addition to the reasons Wolfgang mentioned, if you use a vector<vector<double> >, you'll have to dereference it twice every time you want to retrieve an element, which is more computationally costly than a single dereferencing operation. One typical approach is to allocate a single array (a vector<double> or a double *) instead. I've ...


17

Double precision is fairly common on newer GPUs. For instance I own a NVIDIA GTX560 Ti (fairly low end when it comes to computing) that has no issue running ViennaCL in double precision. From here (section 4) it appears all NVIDIA cards from GTX4xx onward support double precision natively. I would guess that the GROMACS information is simply outdated.


16

From my 15 years of thinking about scientific software: If your code runs 25% faster because you write it in Fortran, but it takes you 4 times as long to write it (no STL, difficulty implementing complex data structures, etc), then Fortran only wins if you spend a significant fraction of your day twiddling thumbs and waiting for your computations to finish. ...


16

We are currently writing a paper that contains a number of comparable plots, and we more or less had the same problem. The paper is about comparing the scaling of different algorithms over the number of cores, which ranges between 1 and up to 100k on a BlueGene. The reason for using loglog-plots in this situation is the number of orders of magnitude involved....


15

In the vast majority of cases, improvements in algorithms make a bigger difference than improvement in optimization. Algorithms are also more portable than low-level optimizations. My advice is to follow general best practices with respect to memory layout for cache reuse, avoiding excessive copies or communication, treating the file system in a sane way, ...


15

The main advantage, in my opinion, of using Cloud-based resources is flexibility, i.e. if you have a fluctuating workload, you only pay for what you need. If this is not the case in your application, i.e. you know you will have a quantifiable and constant workload, then you're probably better-off building your own cluster. In the Cloud, you pay for ...


15

This issue has become much more nuanced as the changes in architectures has shifted the HPC landscape. As Wolfgang Bangerth mentions one current longstanding view, I'll split my answer into basic definitiions and further details. Basic Definition A node refers to the physical box, i.e. cpu sockets with north/south switches connecting memory systems and ...


14

Georg Hager wrote about this in Fooling the Masses - Stunt 3: The log scale is your friend. While it is true that log-log plots of strong scaling are not very discerning on the high end, they allow for showing scaling across many more orders of magnitude. To see why this is useful, consider a 3D problem with regular refinement. On a linear scale, you can ...


13

My approach has been to use C++ for everything but computational kernels, which are usually best written in assembly; this buys you all of the performance of the traditional HPC approach but allows you to simplify the interface, e.g., by overloading computational kernels like SGEMM/DGEMM/CGEMM/ZGEMM into a single routine, say Gemm. Clearly the abstraction ...


13

Check out HPC University. In particular, the resources section, which includes things like an Introduction to OpenMP Debugging Serial and Parallel Codes Introduction to the Open Science Grid and much more. There are many higher education programs that include courses in HPC. As an example, my own program includes courses in High performance computing ...


13

@Geoff gives a good answer, but I think it's worth providing an alternative perspective. I do everything on Macs -- in OS X, not a Linux VM -- including lots of scientific code development. I mostly work in Fortran and Python. For me, the convenience of being able to do all my work in one OS and almost never deal with hardware failures or driver issues ...


13

I have always thought that we should use it in our own project, deal.II, because it is higher level than pure MPI and can save a few lines of code here and there. That said, what I learned over the years is that most high-level code doesn't actually have that much MPI code to begin with -- the 600,000 lines of code in deal.II have only ~50 calls to MPI. That'...


13

BLAS1-operations, BLAS2-operations, and sparse-operations share the same curse of low arithmetic intensity, that they perform $O(1)$ flops for each memory read (contrast this to a BLAS3-operation like gemm, which performs $O(N^3)$ flops over $O(N^2)$ reads and only becomes more and more arithmetic-intensive/compute-bound for large $N$). However, sparse ...


12

I can't comment on the server side of things. On the client side, at the one computational science meeting I go to every year, the proportion of Mac users seems to have increased. I switched to a Mac because I got tired of dealing with my school-supplied Dell laptop failing at the drop of a hat. I switched to Macs for the hardware, primarily, since ...


12

$6.60/core-month is less than a penny a core-hour. This is a good deal, and it's a better deal than you can get if you buy identical hardware yourself and pay your own power and sysadmin bill. If all you are going to do is buy one probably less powerful workstation node with sufficient RAM, then you may do better than this, but you may also complete your ...


11

I disagree with Matt about total memory use for the mesh and about extra indirection. For explicit methods, it is common for a very small number of vectors (e.g. 2) to represent all simulation state. For a scalar problem, just defining the coordinates of the mesh may be more than this, and if connectivity is explicit, it is substantially more. High-...


11

Most supercomputing resources in the US are free to use for those associated with a US-based academic or research organization. You must make an application which is reviewed in some way (depending on the center or program that you apply to). For example, the US National Science Foundation funds the XSEDE project which federates a number of large-scale ...


11

Q1: What tools are you using for code profiling (profiling, not benchmarking)? Q2: How long do you let the code run (statistics: how many time steps)? Q3: How large are the cases (if the case fits in the cache, the solver is orders of magnitude faster, but then I'll miss the memory related processes) ? Here's an example of how I do it. I ...


11

For such a small simulation, I would strongly suggest looking into GPU-based solutions. This is probably what will get you the most ns/day/Euro. In my opinion, the fastest fully-featured GPU-based Molecular Dynamics (MD) software out there is ACEMD (see here for timings). The software, however, is commercial, but has a single-GPU free version that can be ...


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