Skip to content

Commit 303f093

Browse files
committed
2 parents 2c193ab + 41dcd43 commit 303f093

File tree

2 files changed

+5
-2
lines changed
  • servers/gpaw-computation
    • server_package/gpaw_computation_server/gpaw_utils
    • src/gpaw_computation

2 files changed

+5
-2
lines changed

servers/gpaw-computation/server_package/gpaw_computation_server/gpaw_utils/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def perform_calculation_service(input_info: CalculationInfo,
231231
input_ckpt_file_path = getattr(input_info, 'ckpt_file_path', None)
232232
if not input_ckpt_file_path or not os.path.exists(input_ckpt_file_path):
233233
raise ValueError(
234-
"Input ckpt_file_path is empty. A ckpt file with charge density isrequired for band calculation.")
234+
"Input ckpt_file_path is empty. A ckpt file with charge density isrequired for band calculation. Maybe run relax or ground_state calculation first.")
235235
else:
236236
calc = GPAW(input_ckpt_file_path, txt=None)
237237
if not hasattr(calc, 'density') or calc.density is None:

servers/gpaw-computation/src/gpaw_computation/server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,15 @@ async def start_calculation(
190190
f"-c {output_calculation_id}"
191191
)
192192
logger.info(f"Executing command: {shell_command}")
193-
execute_command_on_server(shell_command)
193+
_, _, stderr = execute_command_on_server(shell_command)
194+
stderr_content = stderr.read().decode("utf-8")
194195

195196
result = {
196197
"calculation_id": output_calculation_id,
197198
"project_id": project_id,
198199
}
200+
if stderr_content:
201+
result["error_log"] = stderr_content
199202
logger.info(f"Result: {result}")
200203
return TextContent(type="text", text=json.dumps(result))
201204

0 commit comments

Comments
 (0)