# IPOPT suppress output file generation

**URL:** <https://discourse.julialang.org/t/ipopt-suppress-output-file-generation/127595>\
**Category:** Optimization (Mathematical)\
**Created:** [April 1, 2025, 1:09pm UTC](https://discourse.julialang.org/t/ipopt-suppress-output-file-generation/127595 "2025-04-01T13:09:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [April 2, 2025, 7:27pm UTC](https://discourse.julialang.org/t/ipopt-suppress-output-file-generation/127595/4 "2025-04-02T19:27:02Z")

</div>

@nico, you wrote [Error with Ipopt.jl and ipopt.out file](https://discourse.julialang.org/t/error-with-ipopt-jl-and-ipopt-out-file/127596)

> Just so you know, I get the same issue also when I call IPOPT from JuMP.

Do you have a reproducible example?

> I believe it is related to some recent updates, probably of [Ipopt.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/Ipopt)

This is not a bug in Ipopt.jl, and there are no revelvant recent changes. `OpenIpoptOutputFile` calls the C API directly: [Ipopt.jl/src/C\_wrapper.jl at 801b6a0a055f79bbf5d785f80f9ba9cdb2333ec9 · jump-dev/Ipopt.jl · GitHub](https://github.com/jump-dev/Ipopt.jl/blob/801b6a0a055f79bbf5d785f80f9ba9cdb2333ec9/src/C_wrapper.jl#L341-L358)

If this is an issue, it is an issue in the upstream `coin-or/Ipopt`.

> I am not sure that the fact that the output file is held by a process happens

Agreed. My PR is a different fix. But I’m not even sure if it is the right fix, because I cannot reproduce the file lock on macOS.

My guess is that issue is that the file is manually opened. It won’t be closed until `FreeIpoptProblem` is called, which won’t happen until the `prob` is freed by the garbage collector.

The default for the [`file_append`](https://coin-or.github.io/Ipopt/OPTIONS.html#OPT_file_append) option is “no”, so two problems cannot write to the same file.

---

_[View the full topic](https://discourse.julialang.org/t/ipopt-suppress-output-file-generation/127595)._
