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.