Tuesday, February 01, 2005

New Month's Day

A new month is always a good time to turn over a new leaf. Today I announced PyNSol:


PyNSol


a Language Oriented Programming approach to finite differences





PyNSol is yet another PDE description language, implemented entirely as extensions to Python. Among its design goals are

===
To express FD and FV models tersely and in a cognitively accessible manner

To facilitate experiments in time differencing schemes and coupling

To inherit as much as possible from the interactive python environment

To facilitate high performance integration of physics modules (especially column physics)

To facilitate code-introspection tools such as testing, performance prediction, automatic parallelization, and automatic differentiation.
===

So far it's much less than all that, but it does manage to turn this little Python object into a model, and execute it:



shallow = {
"u_t": "- csq * p_x",
"v_t": "- csq * p_y",
"p_t": "- u_x - v_y"
}

Monday, January 31, 2005

programming as black art

Why settle for snake oil?

This is the sort of thing that makes me want to take up carpentry. Or languages with latent typing.


program gfftest

include 'mpif.h'
real t,es

t=1.5
print *,"Before **: t=",t
es = 10.0**t
print *,"After **: t=",t,"es=",es

end


Compiled with: % mpif77 -L/usr/lib64/ -132 -o gfftest gfftest.F -lm

(MPI is MVAPICH 0.9.4, compiler is Intel Fortran for EMT64, version 8.1.)

This hangs between the two print statements. Execution is successful if you do one of the
following:
1) Remove "include 'mpif.h'" from the source code
2) Remove -lm from the link flags

Rob says, "I know the -lm is not needed but for some reason I had it on the Linux FOAM compile for a while"

Jace says, "What's the -L/usr/lib64 doing? Isn't that a 32bit compile?"

Rob says, "He has the opteron's set to 64-bit mode"

Jace [to Rob]: Does mpif77 know that?

Rob shrugs

Jace [to Rob]: You shouldn't need that. You're possibly picking up some 64bit real/integer (ie: double precision) libraries in addition to the 64bit pointer stuff. I think that flag is dubious.

Rob says, "the -L flag?"

Jace [to Rob]: Yeah. A 64bit compile would use some flag to tell the compiler *AND* the linker, not just the linker.

===

uh-huh. This is supposed to mean more to me than it does to you, but alas, it doesn't,

hello blog world

I intend to have more interesting things to say than this.