コード例 #1
0
 def _upload_input_file(self):
     ssh = SSH_Client(self.server)
     ssh.send_command_to_server(
         command='mkdir -p {0}'.format(self.remote_path))
     remote_file_path = os.path.join(self.remote_path,
                                     input_filename[self.software])
     ssh.upload_file(remote_file_path=remote_file_path,
                     file_string=self.input)
     self.initial_time = ssh.get_last_modified_time(
         remote_file_path=remote_file_path)
コード例 #2
0
 def _download_output_file(self):
     ssh = SSH_Client(self.server)
     remote_file_path = os.path.join(self.remote_path, output_filename[self.software])
     local_file_path = os.path.join(self.local_path, 'output.out')
     ssh.download_file(remote_file_path=remote_file_path, local_file_path=local_file_path)
     if self.job_type == 'orbitals':
         remote_file_path = os.path.join(self.remote_path, 'input.FChk')
         local_file_path = os.path.join(self.local_path_to_orbitals_file)
         ssh.download_file(remote_file_path=remote_file_path, local_file_path=local_file_path)
     self.final_time = ssh.get_last_modified_time(remote_file_path=remote_file_path)
     self.determine_run_time()
     if not os.path.isfile(local_file_path):
         raise JobError('output file for {0} was not downloaded properly'.format(self.job_name))