Changes between Version 21 and Version 22 of AdaptParallelization
- Timestamp:
- Feb 13, 2012, 4:30:36 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdaptParallelization
v21 v22 96 96 * Each model task might write file output. This can lead to the case that several processes try to generate the same file or try to write into the same file. In the extreme case this can result in a program crash. For this reason, it might be useful to restrict the file output to a single model task. This can be implemented using the variable `task_id`, which is initialized by `init_parallel_pdaf` and holds the index of the model task ranging from 1 to `n_modeltasks`. (For the ensemble assimilation, it can be useful to switch off the regular file output of the model completely. As each model tasks holds only a single member of the ensemble, this output might not be useful. In this case, the file output for the state estimate and perhaps all ensemble members should be done in the pre/poststep routine of the assimilation system.) 97 97 98 '''Remark:''' For the compilation with a real MPI library, one has to ensure that the header file (`mpif.h`) of the MPI-library is used for both the model and PDAF. (Thus in the include file for make, one might have set `MPI_INC =`. The include directory `dummympi` specified in some of the include files, will not be compatible with all MPI implementations. 99 100 98 101 == Non-parallel models == 99 102 … … 102 105 === Serial assimilation system === 103 106 104 The data assimilation program can be compiled for serial processing without linking a real MPI library. As in the PDAF code calls to MPI functions are implemented, the file `nullmpi.F90` available in the directroy `templates` should be compiled and liked. An example for this gives the case `make.arch/linux_gfortran.h`. `nullmpi.F90` provides the functionality of the MPI functions for the case that only a single process is used and hence no real communication is performed. 107 The data assimilation program can be compiled for serial processing without linking a real MPI library. As in the PDAF code calls to MPI functions are implemented, the file `nullmpi.F90` available in the directroy `templates` should be compiled and liked. An example for this gives the case `make.arch/linux_gfortran.h`. `nullmpi.F90` provides the functionality of the MPI functions for the case that only a single process is used and hence no real communication is performed. A shortened header file `mpif.h` is provided in the directory `src/dummympi`. This file is in general not compatible with real MPI libraries and should only be used without parallelization. 105 108 106 109 Even without parallelization, the call to `init_parallel_pdaf` described above is still required. The routine will simple initialize the parallelization variables for a single-process case.