# Differences

This shows you the differences between two versions of the page.

 running_molpro_on_parallel_computers [2021/04/27 11:26] – [Disk option] werner running_molpro_on_parallel_computers [2021/06/02 08:55] – [Memory specifications] qianli 2022/04/07 09:23 doll [Memory specifications] ga_frac = 0.25 in src/mpp/memory_settings.F902022/01/05 15:06 qianli [Memory specifications] 2021/06/02 08:55 qianli [Memory specifications] 2021/06/02 08:46 qianli 2021/06/02 08:43 qianli 2021/06/02 08:43 qianli [Running Molpro on parallel computers] 2021/05/20 08:23 doll typo2021/04/27 11:45 qianli Add debugging options2021/04/27 11:37 qianli [Specifying parallel execution] 2021/04/27 11:29 werner 2021/04/27 11:26 werner [Disk option] 2021/04/27 11:22 qianli [Running Molpro on parallel computers] 2021/04/27 11:20 werner [Disk option] 2021/04/27 11:16 werner [Disk option] 2021/04/26 17:20 qianli [Disk option] 2021/04/26 17:18 qianli [Memory specifications] 2021/04/26 16:28 qianli Move mpi-based ppidd options to a separate section2021/04/26 16:23 qianli [Specifying parallel execution] 2021/04/26 16:12 qianli [Running Molpro on parallel computers] 2021/04/26 15:49 qianli [Disk option] 2021/04/26 15:19 qianli [Memory specifications] 2021/04/26 15:18 qianli [Running Molpro on parallel computers] 2021/04/26 15:06 qianli [Notes on the disk option] 2020/12/17 08:20 qianli [Notes on the disk option] 2020/12/17 07:33 werner [Notes on the disk option] 2020/12/16 18:49 werner [Notes on the disk option] 2020/12/16 18:49 werner [Notes on the disk option] 2020/12/16 18:47 werner [Notes on the disk option] 2020/12/16 15:00 qianli Fix link2020/12/16 14:03 qianli [GA Installation notes] 2020/12/16 14:03 qianli [Running Molpro on parallel computers] 2020/12/16 13:22 qianli [GA Installation notes] 2020/12/16 13:13 qianli [Notes on the disk option] 2020/12/16 13:06 qianli [Memory specifications] 2020/12/16 13:03 qianli [Memory specifications] 2020/12/16 13:01 qianli [Memory specifications] 2022/04/07 09:23 doll [Memory specifications] ga_frac = 0.25 in src/mpp/memory_settings.F902022/01/05 15:06 qianli [Memory specifications] 2021/06/02 08:55 qianli [Memory specifications] 2021/06/02 08:46 qianli 2021/06/02 08:43 qianli 2021/06/02 08:43 qianli [Running Molpro on parallel computers] 2021/05/20 08:23 doll typo2021/04/27 11:45 qianli Add debugging options2021/04/27 11:37 qianli [Specifying parallel execution] 2021/04/27 11:29 werner 2021/04/27 11:26 werner [Disk option] 2021/04/27 11:22 qianli [Running Molpro on parallel computers] 2021/04/27 11:20 werner [Disk option] 2021/04/27 11:16 werner [Disk option] 2021/04/26 17:20 qianli [Disk option] 2021/04/26 17:18 qianli [Memory specifications] 2021/04/26 16:28 qianli Move mpi-based ppidd options to a separate section2021/04/26 16:23 qianli [Specifying parallel execution] 2021/04/26 16:12 qianli [Running Molpro on parallel computers] 2021/04/26 15:49 qianli [Disk option] 2021/04/26 15:19 qianli [Memory specifications] 2021/04/26 15:18 qianli [Running Molpro on parallel computers] 2021/04/26 15:06 qianli [Notes on the disk option] 2020/12/17 08:20 qianli [Notes on the disk option] 2020/12/17 07:33 werner [Notes on the disk option] 2020/12/16 18:49 werner [Notes on the disk option] 2020/12/16 18:49 werner [Notes on the disk option] 2020/12/16 18:47 werner [Notes on the disk option] 2020/12/16 15:00 qianli Fix link2020/12/16 14:03 qianli [GA Installation notes] 2020/12/16 14:03 qianli [Running Molpro on parallel computers] 2020/12/16 13:22 qianli [GA Installation notes] 2020/12/16 13:13 qianli [Notes on the disk option] 2020/12/16 13:06 qianli [Memory specifications] 2020/12/16 13:03 qianli [Memory specifications] 2020/12/16 13:01 qianli [Memory specifications] 2020/12/15 17:09 qianli 2020/10/26 15:11 werner 2020/06/11 18:17 external editBoth sides next revision Line 7: Line 7: There are different GA implementation options (runtimes), and there are advantages and disadvantages for using one or the other implementation (see [[GA Installation]]). There are different GA implementation options (runtimes), and there are advantages and disadvantages for using one or the other implementation (see [[GA Installation]]). - The Molpro binary is built with the ''--with-sockets'' GA runtime, which requires pre-allocation of GA memory in some large calculations. + **Since Molpro 2021.2 the [[#disk option]] is used by default** in single node calculation, in which case large data structures are simply kept in MPI files. - **Failing to preallocate sufficient amount of GA memory may lead to crashes or incorrect results, unless the [[#disk option]] is used.** + The behavior of previous versions can be recovered by the ''--ga-impl ga'' command line option. - It is therefore very important to read and understand [[#memory specifications]] before trying to run large scale parallel calculations with Molpro. + However, ''--ga-impl ga'' requires pre-allocation of GA memory in many calculations if the ''socket'' GA runtime is used, and failing to preallocate sufficient amount of GA memory may lead to crashes or incorrect results. + Preallocating GA is not required with the ''mpi-pr'' runtime of GA or with the disk option. ===== GA Installation notes  ===== ===== GA Installation notes  ===== Line 20: Line 22: * **''-N'' $|$ ''%%--task-specification%%'' //user1:node1:tasks1,user2:node2:tasks2$\dots$//** //node1, node2// etc. specify the host names of the nodes on which to run. On most parallel systems, node1 defaults to the local host name, and there is no default for node2 and higher. On Cray T3E and IBM SP systems, and on systems running under the PBS batch system, if -N is not specified, nodes are obtained from the system in the standard way. //tasks1, tasks2// etc. may be used to control the number of tasks on each node as a more flexible alternative to ''-n'' / //tasks_per_node//. If omitted, they are each set equal to ''-n'' / //tasks_per_node//. //user1, user2// etc. give the username under which processes are to be created. Most of these parameters may be omitted in favour of the usually sensible default values. * **''-N'' $|$ ''%%--task-specification%%'' //user1:node1:tasks1,user2:node2:tasks2$\dots$//** //node1, node2// etc. specify the host names of the nodes on which to run. On most parallel systems, node1 defaults to the local host name, and there is no default for node2 and higher. On Cray T3E and IBM SP systems, and on systems running under the PBS batch system, if -N is not specified, nodes are obtained from the system in the standard way. //tasks1, tasks2// etc. may be used to control the number of tasks on each node as a more flexible alternative to ''-n'' / //tasks_per_node//. If omitted, they are each set equal to ''-n'' / //tasks_per_node//. //user1, user2// etc. give the username under which processes are to be created. Most of these parameters may be omitted in favour of the usually sensible default values. * **''-t'' $|$ ''%%--omp-num-threads%%'' //n//** Specify the number of OpenMP threads, as if the environment variable ''OMP_NUM_THREADS'' were set to //n//. * **''-t'' $|$ ''%%--omp-num-threads%%'' //n//** Specify the number of OpenMP threads, as if the environment variable ''OMP_NUM_THREADS'' were set to //n//. - * **''%%--ga-impl%%'' //method//** specifies the method by which large data structure are held in parallel. Available options are ''GA'' (GlobalArrays, default) for ''disk'' (MPI Files, see [[#disk option]]). This option is most relevant on the more recent programs such as Hartree-Fock, DFT, MCSCF/CASSCF, and the PNO programs. + * **''%%--ga-impl%%'' //method//** specifies the method by which large data structure are held in parallel. Available options are ''GA'' (GlobalArrays, default) for ''disk'' (MPI Files, see [[#disk option]]). This option is most relevant on the more recent programs such as Hartree-Fock, DFT, MCSCF/CASSCF, and the PNO programs. + * **''-D'' $|$ ''%%--global-scratch%%'' //directory//** specifies the scratch directory for the program which is accessible by all processors in multi-node calculations. This only affects parallel calculations with the [[running Molpro on parallel computers#disk option|disk option]]. + * **''%%--all-outputs%%''** produces an output file for each process when running in parallel. ===== Memory specifications  ===== ===== Memory specifications  ===== Line 30: Line 34: - If the [[#disk option]] is disabled (the default) and one of the older GA runtimes (''sockets'', ''openib'', etc.) is used (**including when using the Molpro binary release**): Sufficient amount of GA memory must be specified by the ''-G'' or ''-M'' option (see below) and pre-allocated by Molpro in the beginning of a calculation, otherwise the calculation may crash or yields incorrect results. - If the [[#disk option]] is disabled (the default) and one of the older GA runtimes (''sockets'', ''openib'', etc.) is used (**including when using the Molpro binary release**): Sufficient amount of GA memory must be specified by the ''-G'' or ''-M'' option (see below) and pre-allocated by Molpro in the beginning of a calculation, otherwise the calculation may crash or yields incorrect results. - If the disk option is disabled and one of the comex-based GA runtimes (e.g. ''mpi-pr'') is used, or if the disk option is enabled but the scratch is in a tmpfs: the ''-G'' or ''-M'' option is not mandatory, but sufficient physical memory shall be left for the global data structure. - If the disk option is disabled and one of the comex-based GA runtimes (e.g. ''mpi-pr'') is used, or if the disk option is enabled but the scratch is in a tmpfs: the ''-G'' or ''-M'' option is not mandatory, but sufficient physical memory shall be left for the global data structure. - - If the [[#disk option]] is enabled and the scratch directory is located on a physical disk: the GA usage should be negligible and the ''-G'' or ''-M'' options should not be given. + - If the [[#disk option]] is enabled and the scratch directory is located on a physical disk: the GA usage should be negligible and the **''-G'' or ''-M'' options should not be given**. However, the performance of the calculation might be better if some memory is left for the system to buffer the I/O. + + Note that we have made the disk option the default in single node calculations since Molpro 2021.2. If this causes performance problems, the previous behavior of storing large data structure in GlobalArrays can be enabled by setting the environment variable ''MOLPRO_GA_IMPL'' to ''GA'', or by passing the ''%%--ga-impl ga%%'' command-line option. Both the ''-m'' and ''-G'' options are by default given in megawords (m) but unit gigaword (g) can also be used (e.g. ''-m1000'' is equivalent to ''-m1000m'' and to ''-m1g''). Both the ''-m'' and ''-G'' options are by default given in megawords (m) but unit gigaword (g) can also be used (e.g. ''-m1000'' is equivalent to ''-m1000m'' and to ''-m1g''). Line 43: Line 49: * **Density fitting and PNO calculations**: divide the memory into equal parts for GA and stack memory. * **Density fitting and PNO calculations**: divide the memory into equal parts for GA and stack memory. - * **HF, DFT, and MCSCF calculations**: 80% for the stack and 20% for GA. + * **HF, DFT, and MCSCF calculations**: 75% for the stack and 25% for GA. * **Canonical MRCI or CCSD(T) calculations** on one-node: no GA space is needed. * **Canonical MRCI or CCSD(T) calculations** on one-node: no GA space is needed. Line 49: Line 55: With this, the total memory allocatable by Molpro can be specified, and the memory is split 50-50 for stack and GA in DF/PNO calculations, and 80-20 in other calculations. With this, the total memory allocatable by Molpro can be specified, and the memory is split 50-50 for stack and GA in DF/PNO calculations, and 80-20 in other calculations. Thus, unless specified otherwise, in DF/PNO calculations the stack memory per process is $m=M\cdot N/(2\cdot n)$ and the total GA memory is $G=N\cdot M/2$. Thus, unless specified otherwise, in DF/PNO calculations the stack memory per process is $m=M\cdot N/(2\cdot n)$ and the total GA memory is $G=N\cdot M/2$. - It is recommended to provide a default ''-M'' value in .molprorc (**except for disk-based calculation that does not use GA, see [[#disk option]]**), e.g. ''-M=25g'' for a dedicated machine with 256 GB of memory and 20 cores (.molprorc can be in the home directory and/or in the submission directory, the latter having preference). Then each Molpro run would be able to use the whole memory of the machine with reasonable splitting between stack and GA. The default can be overwritten or modified by molpro command line options ''-m'' and/or ''-G'', or by input options (cf. section [[general program structure#memory allocation|memory allocation]]), the latter having preference over command line options. + If the use of GA in storing large data structure is desired, it is recommended to provide a default ''-M'' value in .molprorc (**do not do so for disk-based calculation, see [[#disk option]]**), e.g. ''-M=25g'' for a dedicated machine with 256 GB of memory and 20 cores (.molprorc can be in the home directory and/or in the submission directory, the latter having preference). Then each Molpro run would be able to use the whole memory of the machine with reasonable splitting between stack and GA. The default can be overwritten or modified by molpro command line options ''-m'' and/or ''-G'', or by input options (cf. section [[general program structure#memory allocation|memory allocation]]), the latter having preference over command line options. If the ''-G'' or ''-M'' options are given, some programs check at early stages if the GA space is sufficient. If not, an error exit occurs and the estimated amount of required GA is printed. In this case the calculation should be repeated, specifying (at least) the printed amount of GA space with the ''-G'' option. If crashes without such message occur, the calculation should also be repeated with more GA space or with the disk option, but care should be taken that the total memory per node does not get too large. If the ''-G'' or ''-M'' options are given, some programs check at early stages if the GA space is sufficient. If not, an error exit occurs and the estimated amount of required GA is printed. In this case the calculation should be repeated, specifying (at least) the printed amount of GA space with the ''-G'' option. If crashes without such message occur, the calculation should also be repeated with more GA space or with the disk option, but care should be taken that the total memory per node does not get too large. Line 56: Line 62: * **''-M''** As described above. * **''-M''** As described above. - * **''-M'' and ''-m''** The specified amount $m$ is allocated for each core, the the remaining memory for GA. + * **''-M'' and ''-m''** The specified amount $m$ is allocated for each core, the remaining memory for GA. * **''-M'' and ''-G''** The specified amount $G$ is allocated for GA, and the remaining amount is split equally for stack memory of each process. * **''-M'' and ''-G''** The specified amount $G$ is allocated for GA, and the remaining amount is split equally for stack memory of each process. * **''-M'' and ''-G'' and ''-m''** The specified amounts of $m$ and $G$ are allocated, and the $M$ value is ignored. * **''-M'' and ''-G'' and ''-m''** The specified amounts of $m$ and $G$ are allocated, and the $M$ value is ignored. Line 70: Line 76: Since version 2021.1, Molpro can use MPI files instead of GlobalArrays to store large global data. This option can be enabled globally by setting the environment variable ''MOLPRO_GA_IMPL'' to ''DISK'', or by passing the ''%%--ga-impl disk%%'' command-line option. Since version 2021.1, Molpro can use MPI files instead of GlobalArrays to store large global data. This option can be enabled globally by setting the environment variable ''MOLPRO_GA_IMPL'' to ''DISK'', or by passing the ''%%--ga-impl disk%%'' command-line option. + Since version 2021.2 the disk option is made the default in single-node calculations. Some programs in Molpro including DF-HF, DF-KS, (DF-)MULTI, DF-TDDFT, and PNO-LCCSD also support an input option ''implementation=disk'' to enable the disk option for the particular job step. Some programs in Molpro including DF-HF, DF-KS, (DF-)MULTI, DF-TDDFT, and PNO-LCCSD also support an input option ''implementation=disk'' to enable the disk option for the particular job step. The file system for these MPI files must be accessible by all processors. The file system for these MPI files must be accessible by all processors. Line 87: Line 94: The numerical computation of gradients or Hessians, or the automatic generation of potential energy surfaces, requires many similar calculations at different (displaced) geometries. An automatic parallel computation of the energy and/or gradients at different geometries is implemented for the gradient, hessian, and surf programs. In this so-called mppx-mode, each processing core runs an independent calculation in serial mode. This happens automatically using the ''-n'' available cores. The automatic mppx processing can be switched off by setting option ''mppx=0'' on the ''OPTG'', ''FREQ'', or ''HESSIAN'' command lines. In this case, the program will process each displacement in the standard parallel mode. The numerical computation of gradients or Hessians, or the automatic generation of potential energy surfaces, requires many similar calculations at different (displaced) geometries. An automatic parallel computation of the energy and/or gradients at different geometries is implemented for the gradient, hessian, and surf programs. In this so-called mppx-mode, each processing core runs an independent calculation in serial mode. This happens automatically using the ''-n'' available cores. The automatic mppx processing can be switched off by setting option ''mppx=0'' on the ''OPTG'', ''FREQ'', or ''HESSIAN'' command lines. In this case, the program will process each displacement in the standard parallel mode. + ===== Options for developers ===== + + ==== Debugging options ==== + + * **''%%--ga-debug%%''** activates GA debugging statements. + * **''%%--check-collective%%''** check collective operations when debugging. - ===== Options for pure MPI-based PPIDD build ===== + ==== Options for pure MPI-based PPIDD build ==== This section is **not** applicable if the Molpro binary release is used, or when Molpro is built using the GlobalArrays toolkit (which we recommend). This section is **not** applicable if the Molpro binary release is used, or when Molpro is built using the GlobalArrays toolkit (which we recommend).