Ejemplo n.º 1
0
    def _validate_resources(self):
        """Validate the resources defined in the options."""
        resources = self.options.resources

        for key in ['num_machines', 'num_mpiprocs_per_machine', 'tot_num_mpiprocs']:
            if key in resources and resources[key] != 1:
                raise exceptions.FeatureNotAvailable(
                    "Cannot set resource '{}' to value '{}' for {}: parallelization is not supported, "
                    "only a value of '1' is accepted.".format(key, resources[key], self.__class__.__name__))
Ejemplo n.º 2
0
    def _get_detailed_job_info_command(self, job_id):
        """Return the command to run to get detailed information for a given job.

        This is typically called after the job has finished, to retrieve the most detailed information possible about
        the job. This is done because most schedulers just make finished jobs disappear from the `qstat` command, and
        instead sometimes it is useful to know some more detailed information about the job exit status, etc.

        :raises: :class:`aiida.common.exceptions.FeatureNotAvailable`
        """
        # pylint: disable=no-self-use,not-callable,unused-argument
        raise exceptions.FeatureNotAvailable('Cannot get detailed job info')
Ejemplo n.º 3
0
    def parse_output(self, detailed_job_info, stdout, stderr):
        """Parse the output of the scheduler.

        :param detailed_job_info: dictionary with the output returned by the `Scheduler.get_detailed_job_info` command.
            This should contain the keys `retval`, `stdout` and `stderr` corresponding to the return value, stdout and
            stderr returned by the accounting command executed for a specific job id.
        :param stdout: string with the output written by the scheduler to stdout
        :param stderr: string with the output written by the scheduler to stderr
        :return: None or an instance of `aiida.engine.processes.exit_code.ExitCode`
        """
        raise exceptions.FeatureNotAvailable('output parsing is not available for `{}`'.format(self.__class__.__name__))
Ejemplo n.º 4
0
    def _generate_retrieve_list(self):
        dos_type = self.inputs.dos_type
        dos_method = self.inputs.dos_method

        if dos_type == 'dos':
            if dos_method == 'tetrahedron':
                dos_output_filename = OpenmxCalculation.system_name + '.DOS.Tetrahedron'
            else:  # gaussian
                dos_output_filename = OpenmxCalculation.system_name + '.DOS.Gaussian'
            return [dos_output_filename]
        # pdos
        # TODO: get number, order, and symbols of species and their orbital configurations
        raise exceptions.FeatureNotAvailable(
            f'{dos_type} is not yet supported.')