Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ test/*
/_b
*.whl
*.pyc


*.txt
*.sh
4 changes: 3 additions & 1 deletion internal/internal_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ typedef struct
int num_nonzeros;
int *row_ptr;
int *col_ind;
int *row_ind;
double *val;
int *transpose_map;
} cu_sparse_matrix_csr_t;

typedef struct
Expand All @@ -46,6 +48,7 @@ typedef struct
int num_blocks_primal;
int num_blocks_dual;
int num_blocks_primal_dual;
int num_blocks_nnz;
double objective_vector_norm;
double constraint_bound_norm;
double *constraint_lower_bound_finite_val;
Expand Down Expand Up @@ -129,7 +132,6 @@ typedef struct

typedef struct
{
lp_problem_t *scaled_problem;
double *con_rescale;
double *var_rescale;
double con_bound_rescale;
Expand Down
2 changes: 1 addition & 1 deletion internal/preconditioner.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"

rescale_info_t *rescale_problem(
const pdhg_parameters_t *params,
const lp_problem_t *original_problem);
pdhg_solver_state_t *state);

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ wheel.packages = ["python/cupdlpx"]
sdist.include = ["tests/**", "pyproject.toml", "README.md", "LICENSE"]

[tool.scikit-build.cmake.define]
CMAKE_CUDA_ARCHITECTURES = "60;61;70;75;80;86;89;90;90-virtual"
CMAKE_CUDA_ARCHITECTURES = "all"
CMAKE_CUDA_STANDARD = "17"
CUPDLPX_BUILD_PYTHON = "ON"
CUPDLPX_BUILD_STATIC_LIB = "ON"
Expand Down
31 changes: 16 additions & 15 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,6 @@ void save_solver_summary(const cupdlpx_result_t *result, const char *output_dir,
}
fprintf(outfile, "Termination Reason: %s\n",
termination_reason_to_string(result->termination_reason));
fprintf(outfile, "Runtime (sec): %e\n", result->cumulative_time_sec);
fprintf(outfile, "Iterations Count: %d\n", result->total_count);
fprintf(outfile, "Primal Objective Value: %e\n",
result->primal_objective_value);
fprintf(outfile, "Dual Objective Value: %e\n", result->dual_objective_value);
fprintf(outfile, "Relative Primal Residual: %e\n",
result->relative_primal_residual);
fprintf(outfile, "Relative Dual Residual: %e\n",
result->relative_dual_residual);
fprintf(outfile, "Absolute Objective Gap: %e\n", result->objective_gap);
fprintf(outfile, "Relative Objective Gap: %e\n",
result->relative_objective_gap);
fprintf(outfile, "Rows: %d\n", result->num_constraints);
fprintf(outfile, "Columns: %d\n", result->num_variables);
fprintf(outfile, "Nonzeros: %d\n", result->num_nonzeros);
if (result->presolve_time > 0.0)
{
fprintf(outfile, "Presolve Status: %s\n", get_presolve_status_str(result->presolve_status));
Expand All @@ -142,6 +127,22 @@ void save_solver_summary(const cupdlpx_result_t *result, const char *output_dir,
// fprintf(outfile, "Postsolve Time (sec): %e\n", result->presolve_stats.time_postsolve);
// }
}
fprintf(outfile, "Precondition time (sec): %e\n", result->rescaling_time_sec);
fprintf(outfile, "Runtime (sec): %e\n", result->cumulative_time_sec);
fprintf(outfile, "Iterations Count: %d\n", result->total_count);
fprintf(outfile, "Primal Objective Value: %e\n",
result->primal_objective_value);
fprintf(outfile, "Dual Objective Value: %e\n", result->dual_objective_value);
fprintf(outfile, "Relative Primal Residual: %e\n",
result->relative_primal_residual);
fprintf(outfile, "Relative Dual Residual: %e\n",
result->relative_dual_residual);
fprintf(outfile, "Absolute Objective Gap: %e\n", result->objective_gap);
fprintf(outfile, "Relative Objective Gap: %e\n",
result->relative_objective_gap);
fprintf(outfile, "Rows: %d\n", result->num_constraints);
fprintf(outfile, "Columns: %d\n", result->num_variables);
fprintf(outfile, "Nonzeros: %d\n", result->num_nonzeros);
if (result->feasibility_polishing_time > 0.0)
{
fprintf(outfile, "Feasibility Polishing Time (sec): %e\n", result->feasibility_polishing_time);
Expand Down
Loading