« No, you don't! | Main | If you can't win, change the topic »

August 18, 2005

Comments

Dave Bacon

Everytime I walk by the restraunt "Pho Tran" on University Ave, I laugh. Reminds me of my days doing astrophysics where the cult of FORTRAN also runs very deep.

Gordon T Watts

Ack! That is great! I'd not even thought of that, though I've walked by it before! ;-)

Gordon Chalmers

If somebody or group would hire me, even
for an extended visiting position, I will
construct a Matlab (or C++) program that
computes standard model amplitudes to
extrodinarily high orders in the coupling.

This should be of direct relevance to the
current experiments. I realize that a blog is not the best forum.

Gordon Chalmers

If somebody or group would hire me, even
for an extended visiting position, I will
construct a Matlab (or C++) program that
computes standard model amplitudes to
extrodinarily high orders in the coupling.

This should be of direct relevance to the
current experiments. I realize that a blog is not the best forum.

Gordon Chalmers

The sooner the better would suit me extremely well, if possible. I also
have hundreds of unpublished notes.

ursula

Gordon, you're right about Python: I think I don't write Python software in an object oriented way, but it certainly comes much more naturally to me than C++ - and the online documentation is very helpful. The only thing I would complain about, is to know which function is in which module: I searched the other day for sum() and couldn't find it anywhere. An easy "search" for existing functions within the documentation pages would be very helpful.

Gordon T Watts

Ursula -- yes, I've had that problem myself for a while. And I just stumbled on a partical solution -- there is a very good index associated with all those manuals. Click on the "i" that is at the top of the web page table of context. It takes a while to load, but then you can use your browser search function to find what you want!

Gordon T Watts

Gordon -- check out madgraph. http://madgraph.hep.uiuc.edu/F1.html

Gordon Chalmers

Madgraph is not sufficient. I will write
that program anyway, but its months away.

Mike Chen

Gordon, I read your language comparisons with interest. I've used Fortran, C, Matlab, and Mathematica for scientific programming, but not Java, C#, or C++ (even though I also know these languages quite well). Java has floating point issues (http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf), C# is too immature & flaky right now, and as for C++, it is more of a personal issue -- like you, I never felt very productive with it. I always felt as if I had to fight with it to do my will.

But you mention Python. I had a quick flirtation with it a while back, but immediately ran the other way when I saw that it uses whitespace for formatting. Maybe I dismissed it too quickly. Is Python really suited for high-performance, massively parallel, scientific programming?

Gordon Chalmers

It is quite a bit of work though and getting paid for it would be nice; even being paid for my condensed matter program would be good. All things
considered on the advantages of these
things.

Steven Sheets


I was raised on C++ so I always want to cry when some piece of legacy fortran comes my way.

Anymore, though, I write about anything I can in Python. H. P. Langtangen has a book Python Scripting for Scientific Computing which is well worth the money, IMO. I haven't done any massive parallel computing with Python so I can't say how appropriate the language is for it.

Gordon Chalmers

I am not the best programmer. However,
the sooner you or I program my theoretical work, the sooner you might get a better computer.

Gordon T Watts

I don't tend to use Python mostly for doing things like pulling together lots and lots of plots, analyzing the data at a pretty high level. The interier of most loops that are actually processing "raw" data, however, remains C++ (indeed, that is one of the only bindings there). I don't have to do any massively parallel computing, thank goodness! My C# use is mostly for utilities that are data aquisition related, and when I need a GUI or something simpler. For that it is more than good enough. In your case you'd not write Python code for doing parallel computing, but you would write it to control your system and gather and distribute results, set it up, tear it down, etc. I am pretty much on board with what Steven says. ;-)

Gordon Chalmers

I suppose it would be nice to have a
massive parallel machine to compute
standard model backgrounds, algebraically.
The standard model background to many
loops, or rather in energy scales, could be computed in an approximate real time. I cant even think why that would be useful.

Gordon Chalmers

In all seriousness, you have to appreciate
the fact that a matrix inverse of a g^2 (or
g^3) dimension matrix is the speed required to compute relevant g-loop current phenomenological amplitudes. After pre-loading certain functions.

Niki Zadeh

I started to ponder on this question very recently. I found that for the type of calculations I am doing (mostly access and update of elements of huge matrices) , using Intel compiler for both, a Fortran77 code runs at least 4 times faster than an equivalent C++ code, even with the use of templates or Blitz++ libs.
Anyone has comments about how to speed up handling large, double precision, multi dim matrices in C++?

Gordon T Watts

The Intel compiler is supposed to be one of the best out there. I wonder what assumptions it is making about your code that prevents it from optimizing away the overhead. It would be interesting, I suppose, to look at the code and figure out what it was the two were doing differently.

Eric Brown

You all should check out f2py for calling compiled Fortran code from python. It has totally changed the way that I do business.

In short, high level organization in python, heavy lifting in Fortran.

Yummy!!!

Eric

Gordon T Watts

Eric -- that sounds like a very cool tool. I'd not heard of it before!

Niki Zadeh

Here's an example code involving double precision matrices that runs much faster under Fortran than C++ compiler (both Intel).
If you have any idea why, please let me know.

http://physics.georgetown.edu/~niki/cppVfort.txt

The comments to this entry are closed.