REJOIN was written to tidy up data at the end of a parallel computation. The problem was simple. Suppose that a logical array of NPX by NPY processors was used, and that the computation was associated with a physical array of NX_GLOBAL by NY_GLOBAL processors. The original physical array was divided up among the processors, and each handled its own piece. (There was some communication between pieces, via what amounted to internal boundary conditions). Once the computation was done, each processor wrote out its information to a file, whose name had the processor ID embedded in it. In order to conveniently graph or analyze the data, it was desired to rejoin all this data into a single file, as though one processor had handled it. This is what REJOIN does, for the data from a specific program.
Of course, no sooner was code written to rejoin data from a logical array of NPX by NPY processors, than a request was made for a new feature, namely the ability to reshape the data, that is, to write a new set of files that would correspond to a configuration of, say, MPX by MPY processors. This would allow you to run on one configuration on Tuesday, save the data, and resume the calculation on Wednesday on a different processor configuration. It turns out that the easiest (though not most efficient!) way to do this is simply to add a "split" option to the code, which splits up a serial data file into an arbitrary set of parallel data files. The reshape option is then carried out by "rejoining" the data into a serial file, and "splitting" it out, specifying a different processor configuration. See the SPLIT_SAVE routine for details.
Files you may copy include:
The list of routines includes:
Return to the FORTRAN software page.