Opened 16 years ago
Closed 15 years ago
#237 closed Bug (fixed)
Undefined behaviour writing to ocean.output from multiple pes
Reported by: | a.osprey@… | Owned by: | nemo |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OCE | Version: | v2 |
Severity: | Keywords: | ||
Cc: |
Description
I have been running version 2.3 NEMO on a Cray XT4 (www.hector.ac.uk) with pathscale and PGI compilers.
I have found that when running on multiple processors with pathscale most of the text sent to ocean.output is lost, although it seems OK for PGI. I believe the problem is with multiple pes writing to a single file. I think that in pathscale the text from each pe overwrites the previous one entirely, so in the end we only see output from one pe (usually not the useful one.)
I don't think there is any standard behaviour for multiple pes writing to a single file (although I suppose some compilers handle it OK), so I suggest that only one pe (the one where lwp=.TRUE.) writes to ocean.output.
I have attached a "quick fix" which I have tested with revision 1164 for both pathscale and PGI. In opa.F90 ocean.output is opened and the header text written after lwp is set. In in_out_manager.F90 numout is initialised to stdout by default so that no output is lost if any of the other pes try to write to numout.
Commit History (0)
(No commits)
Attachments (2)
Change History (3)
Changed 16 years ago by nemo_user
Changed 16 years ago by nemo_user
comment:1 Changed 15 years ago by smasson
- Resolution set to fixed
- Status changed from new to closed
done, see changeset:1579 and changeset:1581