Opened 12 years ago

Closed 11 years ago

#2142 closed defect (fixed)

It is not clear when simulation code files are generated

Reported by: anonymous Owned by: Adeel Asghar
Priority: high Milestone: 1.9.1
Component: OMEdit Version: trunk
Keywords: OMEdit Cc:

Description

OMEdit 1.9.0 beta4+dev(r15749)
Mac OS X 10.7.5
User account without administrator rights
It is not clear when simulation code files are generated

model Pendulum

annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
parameter Real L = 0.2;
constant Real g = 9.81;
Real theta(start = 0.1);
Real omega;

equation

der(theta) = omega;
der(omega) = -g / L * Modelica.Math.sin(theta);

end Pendulum;

Choose command simulate
Choose tab named output (Ausgabe)
Leave textfield file name (Dateiname (optional)) empty
Press button named simulate

-> No files are generated

Choose command simulate
Choose tab named output (Ausgabe)
Choose a filename f.x. simCode
Press button named simulate

-> No files are generated

Choose command simulate
Choose tab named output (Ausgabe)
Choose a filename with an absolute path f.x. /Users/tom/Desktop/simCode
Press button named simulate

-> The following files are generated (ls command). Some with a '?' in their name.
simCode
simCode?.c
simCode?.libs
simCode?.makefile
simCode?_functions.c
simCode?_functions.h
simCode?_info.xml
simCode?_init.xml
simCode?_model.h
simCode?_records.c

Non valid code in simCode
_functions.h:

#ifndef /Users/tom/Desktop/simCode
H
#define /Users/tom/Desktop/simCode
H
#ifdef _OPENMP_
#include <omp.h>
#else
#define omp_get_thread_num() 0
#define omp_get_max_threads() 1
#endif
#include "modelica.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#include "simulation_runtime.h"
#ifdef cplusplus
extern "C" {
#endif
#ifdef
cplusplus
}
#endif
#endif

Change History (4)

comment:1 by Martin Sjölund, 11 years ago

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:2 by Martin Sjölund, 11 years ago

Owner: changed from probably noone to Adeel Asghar
Status: newassigned

Adeel: Maybe add a tooltip stating the working directory (path is relative to this)

comment:3 by Martin Sjölund, 11 years ago

Component: BackendOMEdit

comment:4 by Adeel Asghar, 11 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.