Effacer les filtres
Effacer les filtres

An external program (.exe) started with "system" terminates early

3 vues (au cours des 30 derniers jours)
Denis Perotto
Denis Perotto le 28 Avr 2024
I have a console application that computes a complicated function and outputs a text file with a resulting value. This application runs for about 8 minutes. I run it repeatedly with system("my.exe") within a surrogateopt function. The problem is that this .exe when started from MATLAB terminates early sometimes as if the process was destroyed (it can happen on first or on 25th iteration, no pattern noticed). When I run the application manually with current surrogateopt parameters, it runs completely fine.
I tried to disable antivirus, but it didn't help, so I guess, it might be an internal MATLAB problem.
Are there any known problems of that kind or any ideas why this might happen?

Réponses (1)

Denis Perotto
Denis Perotto le 28 Avr 2024
In case somebody encounter the same problem. I created an additional RunExe.exe in C# that runs my main my.exe (written in C++) then exits. This RunExe.exe seems to start from MATLAB every time without problems.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by