edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
24 stars 5 forks source link

send stderr to a nicely named file #90

Closed edoddridge closed 7 years ago

edoddridge commented 7 years ago

On my machine the stderr stream goes to a file called "fort.17" - a more intuitive destination would be good.

axch commented 7 years ago

Interesting. Are you setting the GFORTRAN_SOMETHING environment variable that the run scripts are supposed to set? And are you compiling the core with gfortran?

edoddridge commented 7 years ago

Ah, OK.

I was running the core directly, and hadn't set that environment variable. Once I set it, the streams behaved nicely and I could easily pipe either stream to a file or let them print to terminal.

edoddridge commented 7 years ago

I was compiling with either gfortran or mpifort.

axch commented 7 years ago

OK. mpifort is a wrapper, so, assuming it's picking up gfortran as the underlying compiler, that environment variable should work there too.

edoddridge commented 7 years ago

It did.

OK, so this is only relevant if someone runs the fortran core from outside the python wrapping and doesn't set the environment variable. I'm not sure that's worth worrying about.