amplitwist
Joined 14 years ago
Joined 14 years ago
Fortran 2003/2008
C++
LaTeX
Sage
Mathematica
Haskell (My initial experiments look promising; ghc+llvm has consistently beaten gcc and gfortran when doing RK4 integration of complicated functions. I'm currently testing array performance with REPA.)
Emacs
Dislin (Looking for a replacement, since it's a real pain to use)
Charm++ (Looks promising, but also seems hard to use.)
MPI
At home: Haskell
1. Visualizing code. Rendering C++ and/or Fortran as LaTeX would be very helpful for lines of code like this, where I've spent too much time tracking down misplaced parens:
k1(1,1)=-Im*(Omega_minus_n*(rho13(i,j)+conjg(rho12(i,j)))-Omega_plus_n*(rho12(i,j)+conjg(rho13(i,j))))+gamma1*(rho22(i,j)+rho33(i,j))
2. A better way to debug and test mathematical programs. Debugging is extremely hard when you have thousands of processes doing calculations that aren't reproducible by hand, so it's very difficult or impossible to create test cases for subunits of the program. The only tests are Fermi calculations and comparison of the whole program's output with an analytical solution, which is often not possible, and is not useful for debugging.3. A language with the following characteristics: - Within 10% of Intel/PGI Fortran on tight numerical loops - Array and distributed/concurrent syntax with lightweight threads and syntactical support for GASnet/MPI. - Parallel load balancing, preferably across nodes. A few of the algorithms I use are adaptive or have parts of the solution domain that require much more work than other parts, leading to situations where naive/maintainable MPI code leaves most processors idle. - Hindley-Milner type inference, typeclasses/typeclass-like features, operator overloading/syntax extension, and effortless interoperation with C/Fortran. An IDE with syntax rendering like Maple or Mathematica's would be a HUGE plus. I don't know why this doesn't exist for usably fast languages. - Supports an interactive mode with easy visualization
The closest language I've seen is Cray's Chapel, but there are several things I don't like about it. Its imperative/oo design and lack of first class functions/tco are unacceptable, since the algorithms I use need to use the integer side of the machine as well as the floating point ones. Right now I use either Charm++ (http://charm.cs.uiuc.edu/) with Intel's array syntax, or Fortran 2008 for some inherited code. C++ has non-ideal semantics for numerical code, and doing non-trivial algorithms in Fortran is still a nightmare, especially when using MPI, as communication code quickly becomes the main part of the program. Something like Sisal (http://sourceforge.net/projects/sisal/), if it was modernized and extended to distributed architectures, would be amazing. It used to beat typical Fortran by 20%.
4. I absolutely need to account for cache behavior, otherwise my simulations will take months to run instead of weeks. I would love anyone who wrote a practical tool that automatically tiled loops, since doing this manually turns code into an unmaintainable rat's nest very quickly, or wrote a library of skeletons for tiled loops and cache oblivious algorithms.
The best lack all conviction, while the worst
Are full of passionate intensity.
-- William Butler Yeats
x = (-b ± sqrt(b^2-4ac))/(2a)
What is x? What is a? The wonderful thing about math is that it doesn't matter. x could be length, dollars, area, volume, mass, potatoes, lines of code, chickens, or electron-volts. But in the general case, it represents a number. Why would anyone consider it an improvement to write
Given that number1 answer^2 + number2 answer + number3 = 0, answer = (-number2 ± sqrt(number2^2-4 number1 number3))/(2 number1).
The extra characters convey no additional semantics. Even when presented with an equation where things have specific units, you can usually mentally figure out the units of everything else, due to conventions, previous definitions, and mental dimensional analysis.
In my experience, the notation isn't so much of an issue as knowing definitions, closely followed by being able to translate those definitions into intuition. You must be able to remember them exactly, otherwise nothing makes any sense, and you must have an intuition for what they mean, otherwise you'll never get anything done. Consider some terms from a recent talk I attended that was outside my immediate areas of expertise: "solvable Lie group", "left-invariant metric", "upstairs", "double cover". I was able to understand the main idea of the talk, but my full understanding of the talk was sunk by not knowing the definition of left-invariance [1].
Since math is inherently abstract, it is hard, and there is no substitute for the hard work necessary to acquire an intuition for it. When doing high-level math, it is necessary to have a rigorous intuition for the subject, where you are able to intuitively see a path to a proof, and then are able to translate that intuition into a suitably rigorous argument.
[1] To illustrate my point that knowing definitions precisely is one of the keys to understanding math, here's the definition of a left-invariant metric. Let G be a Lie group with metric <,>, L_g be left multiplication, and L_g^* denote the pullback of L_g. The metric is said to be left-invariant if L_g^* <u,v> = <u,v> for all u,v in G. It makes no sense unless you know what metrics, Lie groups, left multiplication, and pullbacks are, and you'll only shoot yourself in the foot if you can't define them precisely.