Python Scientific Library
scipy.org
scipy.org
My friend works in the scientific research domain, in chemistry. In his lab he makes simulation of water particles and often he launches simulations that can take even a week to complete. He is using frontan.
I am using ruby since a few years and, as usual, I love its simplicity,etc,etc.
What I've been always wondering is if would be feasible to use a High Level Language (as Ruby, Python, etc) in a case like his.
I understand that fortran is language for the scientific community with loads of libraries but what matter me is the performance.
Saying Fortran and (maybe) Python with this library have the same functionalities, would my friend simulations take longer using Python rather than Fortran? how much longer? do you think it worths the jump to a nicer (from the programmer p.o.v.) programming language?
What do you think?
thanks ; )
Second, the hardware that these simulations run on ('supercomputers') is optimized for vector processing, which is an expensive way of saying that you are operating on whole arrays of data at a time.
Typical operations are multiplying two vectors of data with each other, multiply-and-sum operations and so on. Because simulations of real world scenarios almost always contain large amounts of these operations 'supercomputers' are one way to get good performance, and most numerical libraries in fortran are available for them, and sometimes even optimized for that particular hardware.
But even on commodity hardware (clusters of pc's) the general availability of tested code is the cause of inertia in the scientific world, these people are trying to solve a problem, they're not 'in love' with any language, the tool that suits them best (libraries available, co-workers versed in it, citations all over the place) is what they'll use.
If you want to get very high performance numerical work done on a pc I'd advise you to look into CUDA. Fortran bindings for CUDA exist so you can use all those libraries at absolutely amazing speeds for very little money.
I just hope that OpenCL takes off and becomes really open (read free as in free drivers and code). Once familiarized with the quirks of a new architecture (read non x86-alike) then it would require less investment to draw computing power (btw. Nvidia is a power-hog, significantly reducing its appeal in large data centres).
In any case, OpenCL is based on CUDA (the driver API), and they are practically the same (compare the reference manuals and you'll see what I mean).
Also, GPU computing is much, much more efficient than CPU computing (in terms of FLOPS/Watt). A high-end GPU (say, a Tesla C1060) can probably pull between 200-300 watts (~2x what a high-end Xeon uses), but can do over 1TFLOP with sufficiently optimized code.