Hi,

Well, it depends on what you want to debug.

I can tell you some of my investigation "protocol":
1. I run everything from the command line using scripts
2. After every call in the script I add getErrorString()
3. I run an instantiateModel(Model) to see if the produced
   flat Modelica looks OK
4. I run a checkModel(Model) to see if it is balanced
5. I check the Model.log to see if the model was compiled OK
6. If the model has any functions check FunctionName.log to see
   if they were compiled OK
7. I check output.log which is the result of the execution of Model.exe
8. I run the script with ./omc +d=failtrace Model.mos
   to see where the compiler fails.

I none of these give me any solution I debug the compiler directly,
as it means that there is an error or some missing functionality
in it.

An example of such script: Debug.mos
// ---------------------------------
// loadModel(Modelica); // if needed
// getErrorString();
loadFile("Model.mo");
getErrorString(); // any parser errors?
instantiateModel(Model);
getErrorString(); // any semantic errors?
checkModel(Model);
getErrorString(); // is the model balanced?
simulate(Model);
getErrorString(); // did it simulated?
plot({var1, var2, ...}); // does it work to plot?
readFile("Model.log"); // where there any compile errors?
readFile("FunctionName1.log"); // any function errors?
readFile("FunctionName2.log");
readFile("output.log"); // any simulation errors?
//---------------------------------

Cheers,
Adrian Pop/


Alex Schenkman wrote:
Hello List:

Where can I find the logs?
I'd need more information about errors than the message I get from OMShell.

Thanks in advance!

Reply via email to