OpenModelica IBPSA example error spatialDistribution - modelica

I'm quite new to Modelica and I'm trying to understand some basic examples. I'm looking at the example IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe and checking this model gives me the following error
Number of classes to check: 2
Checking: model IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe... 0.2350000000001273 seconds -> FAILED!
Error String:
Error Buffer:
Warning: Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.
[C:/Program Files/OpenModelica1.14.0-64bit/lib/omlibrary/IBPSA 3.0.0/Fluid/FixedResistances/BaseClasses/PlugFlowTransportDelay.mo:49:3-55:44:writable] Error: Function argument initialValues={time + pip.cor.timDel.t_in_start, time + pip.cor.timDel.t_out_start} in call to spatialDistribution has variability continuous which is not a parameter expression.
#[-], 0.2350000000001273, IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe
-------------------------------------------------------------------------
Checking skipped: package IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe.Medium...
[2] 11:48:12 Scripting Notification
Number of classes checked / failed: 2/1
It seems that the module pip.cor.timDel uses the function spatialDistributuon. My guess is that there is something wrong with pip.cor.timDel.t_in_start or pip.cor.timDel.t_out_start? It would be greatly appreciated if someone could help me with this.
P.S. I'm using OMEdit v1.14.0 on windows 10 with Modelica library v3.2.3

OpenModelica does not support the function spatialDistribution yet, i opened a ticket on Trac where you can follow for the current development status.

Related

MATLAB / dSPACE (GmbH) Memory Alignment Error

My DS1005 multi-board dSPACE system recently had its companion PC upgraded to MATLAB r2019b and ControlDesk 7.1. Since upgrading, I have been unable to get a Simulink model to compile, with the MATLAB diagnostic window issuing the following error:
LOADING APPLICATION "Debug_Local.sdf" ...
PLATFORM: ds1005
*** ERROR: Memory alignment error (double word alignment required).
Could not download real-time application: C:\Experiments\MATLAB Files\ENME303_DS1005\Debug_Local\debug_local.ppc.
An error occurred while loading the application.
DsErrorHandling: Panic! Format string 'The Clib Wrapper is not initialized.' for code 0x2711 starts with invalid character 'T'. Expecting '%'!
LOADING FAILED (1)
*** Stopped RTI build procedure for model: Debug_Local.
----------------------------------------------------------------------
Error:The call to rti1005_make_rtw_hook, during the after_make hook generated the following error:
*** Stopped RTI build procedure
The build process will terminate as a result.
Caused by:
*** Stopped RTI build procedure
Note that the model builds without error - it is when downloading to the DS1005 that the problem occurs. The Simulink model "Debug_Local" consists of a DS2001 A/D block, memory store with write, and that is all.
Prior to software upgrade, the multi-board system performed flawlessly, so the problem is likely a software configuration issue rather a hardware problem. I have read dSPACE FAQ 239, which describes a procedure for determining the cause of memory errors, but due to the fact that my Simulink model is the simplest possible, its suggestions do not seem relevant here.
Searching the web for help, there is mention of a memory alignment option in MATLAB, but only for a toolbox, rather than for the MATLAB core product.

Vivado: [XSIM 43-3294] Signal EXCEPTION_ACCESS_VIOLATION received

I'm getting the following error when I run the simulation.
ERROR: [Common 17-39] 'launch_simulation' failed due to earlier errors.
This project worked fine, but after reinstalling the same Vivado version, I keep getting errors when running the simulation. I have searched and searched several times and places, there are many who end up with this error, but got different suggestions. I honestly do not know what this error means.
The simulation referred me to the behav folder to open the elaborate log for more information about the error.
Here it is:
Vivado Simulator 2017.1
Copyright 1986-1999, 2001-2016 Xilinx, Inc. All Rights Reserved.
Running: C:/Xilinx2017v1/Vivado/2017.1/bin/unwrapped/win64.o/xelab.exe -wto 89ab4d8a8bd74d6d87079040762eb149 --debug typical --relax --mt 2 -L xil_defaultlib -L lib_cdc_v1_0_2 -L proc_sys_reset_v5_0_11 -L fit_timer_v2_0_8 -L secureip -L xpm --snapshot design_1_wrapper_behav xil_defaultlib.design_1_wrapper -log elaborate.log
Using 2 slave threads.
Starting static elaboration
Completed static elaboration
Starting simulation data flow analysis
ERROR: [XSIM 43-3294] Signal EXCEPTION_ACCESS_VIOLATION received.
What could the error 'Signal EXCEPTION_ACCESS_VIOLATION received' mean?
Someone who have tips and advices?
Are you using VHDL 2008 and trying to access a lower level signal in you test bench?
something like
alias CTL_empty is <<signal Inst_VMUX_Top.Inst_Switch_IF.CTL_empty : std_logic>>;
When I try to make decisions based on CTL_empty, my simulation fails

Commands invalid after 'import_board_preset' command

Currently I am trying to follow the MathWorks tutorial 1 to register a TE0720 with a TE0701-6 carrier board in Matlab. I followed the instructions, designed the block design and exported it as advised. Using the Matlab HDL Workflow Advisor I can follow unitl step 4.1 Create Project. Here, I get the following error message:
invalid command name "CONFIG.PCW_INCLUDE_ACP_TRANS_CHECK"
while executing
"CONFIG.PCW_INCLUDE_ACP_TRANS_CHECK {0} CONFIG.PCW_IOPLL_CTRL_FBDIV {30} CONFIG.PCW_IO_IO_PLL_FREQMHZ {1000.000} CONFIG.PCW_IRQ_F2P_INTR {1} CONFIG..."
(procedure "create_root_design" line 49)
invoked from within
"create_root_design """
(file "vivado_custom_block_design.tcl" line 986)
while executing
"source vivado_custom_block_design.tcl"
(file "vivado_create_prj.tcl" line 15)
This is regarding the exported block design in the corresponding *.tlc file.
After deleting the line mentioned in the error, the error persists, but for the following line. This holds true until I deleted all lines following
CONFIG.PCW_IMPORT_BOARD_PRESET {preset}
It seems to me that once the preset for the board is imported, all following commands are seen as invalid. If I put this line in the end of the list though, I get the error
ERROR [Common 17-69] Command failed: Missing name/value pair in -dict argument.
If I remove this line, I get the error
ERROR [BD 41-1811] The interconnect </axi_interconnect_0> is missing a valid master interface connection
ERROR [Common 17-39] 'validate_bd_design' failed due to earlier errors.
Is there a way to fix this or what is the problem here?
EDIT: I am using Vivado 2017.4 from the Vivado HL WebPACK. Could it be that there is a feature not available in this version for rebuilding the project as MATLAB intends to do?
EDIT 2: I started the complete tutorial fresh from scratch again and now I only get the error
ERROR: [BD 41-1811] The interconnect </axi_interconnect_0> is missing a valid master Interface connection
when going throught the HDL Workflow Advisor. As far as I understand the issue, Vivado searches for something to connect the axi_interconnect to. But isn't this the interface port (DUT) as described later in the tutorial (end of step 2 in Register the custom reference design in HDL Workflow Advisor, where the compiled simulink model should be connected?

Can't Get The matlabpool Started

I'm running MATLAB on since about one and a half year now. And I've been trying to get matlabpool ready to go once in nearly every three months. Before I give up on it completely, I've decided to ask for help. :)
My problem starts with matlabpool command. Whenever I type in the matlabpool command, I get this :
One or more output arguments not assigned during call to "system_dependent".
Error in matlabpool>iIsOnClient (line 73)
onclient = ~system_dependent('isdmlworker');
Error in matlabpool>iVerifyJava (line 64)
if iIsOnClient()
Error in matlabpool (line 10)
iVerifyJava();
After some research and sleepless nights, I've found out that one has to settle the things down with the "Cluster Profile Manager". But I never did have the opportunity to see it working either. Here is what I get after clicking Cluster Profile Manager from Parallel panel :
com.mathworks.jmi.MatlabException: Feature isdmlworker not found
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1710)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:197)
at com.mathworks.toolbox.distcomp.ui.profile.model.MatlabProfileManager$1.runOnMatlabThread(MatlabProfileManager.java:80)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
Attempt to reference field of non-structure array.
Error in parallel.internal.ui.AbstractValidationManager (line 20)
obj.Validator.addlistener('ValidationStarted', ...
Error in parallel.internal.ui.ValidationManager (line 21)
obj#parallel.internal.ui.AbstractValidationManager();
com.mathworks.jmi.MatlabException: Attempt to reference field of non-structure array.
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1778)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:195)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:172)
at com.mathworks.toolbox.distcomp.ui.profile.model.ValidationManager$1.runOnMatlabThread(ValidationManager.java:45)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
After getting this message, the Cluster Profile Manager pops up, but doesn't really shows anything besides "wait" sign. I've checked my Distributed Computing Licence and that too is looking fine.
license checkout Distrib_Computing_Toolbox
command returns 1.
By the way, there is another error message which I suspected to have a connection with my problem of some kind. I get this in every MATLAB start:
Error using feature
Feature isdmlworker not found
Error in matlabrc (line 187)
if ~(ismcc || isdeployed || feature('isdmlworker')) && usejava('jvm')
In addition to all of those; I get this message whenever I try to open "Parallel Preferences" from Environment tab :
com.mathworks.jmi.MatlabException: Feature isdmlworker not found
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:265)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1619)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:197)
at com.mathworks.toolbox.distcomp.ui.profile.model.MatlabProfileManager$1.runOnMatlabThread(MatlabProfileManager.java:72)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:440)
I've tried to find the function system_dependent.m but it doesn't seem to exist. Other common spots of the errors I get, the function "feature.m", the option "isdmlworker" are other mysteries that I couldn't find any kind of information about.
I really appreciate if anyone can help me with the problem I've encountered starting MATLAB's distributed computing system.
Edit: I'm working on an Ubuntu 14.04 and my MATLAB version is R2014a.
This appears to be an issue with your specific installation of Ubuntu 14.04. It is possible though that it relates to how matlabpool spawns worker threads in R2014a given that the error occurs in com.mathworks.jmi.NativeMatlab.dispatchMTRequests().
matlabpool has been tested to work without issue on Ubuntu 15.04 and 15.10. It may not be an ideal solution but upgrading Ubuntu to 15.04 or 15.10 and reinstalling MATLAB R2014a should resolve the issue.

CoffeeScript compiler errors suppressed under Node 0.5.10-pre

When my script fails to parse for any reason, I get a stack trace from the compiler, with no insight at all into where in my script the problem lies:
mpurvis#citadel:~/coffee$ coffee -c Test.coffee
/usr/local/lib/node_modules/coffee-script/lib/command.js:15
return process.binding('stdio').writeError(line + '\n');
^
Error: No such module
at /usr/local/lib/node_modules/coffee-script/lib/command.js:15:20
at /usr/local/lib/node_modules/coffee-script/lib/command.js:167:7
at /usr/local/lib/node_modules/coffee-script/lib/command.js:115:26
at [object Object].<anonymous> (fs.js:108:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1074:12)
at Object.wrapper [as oncomplete] (fs.js:246:17)
For now, it's just a toy script to try the system out, so I can usually just experiment until it works again, but that would be impossible in a file of any size. Is there some trick I'm not seeing to get the line where the error occurred?
Thanks!
the latest version from node isn't full compatible with cs..the node_stdio module ws removed...a simple way for fix it is open /usr/local/lib/node_modules/coffee-script/lib/command.js and change the line 15
process.binding('stdio').writeError(line + '\n')
for
process.stderr.write(line + '\n')
always you can get more help from github issues section
https://github.com/jashkenas/coffee-script/commit/c77f7737a5d94a05a999109810ea7634f540e1e2
good luck and happy coding
This doesn't look like a syntax issue. The error is coming from command.js, which is what defines the coffee command-line utility. If it were a compiler error, it would be from coffee-script.js.
So why is the process.binding('stdio') bit in command.js failing? There are two possibilities I can think of:
You're using a weird shell (or a weirdly configured one) that doesn't play nice with Node's version of stdio. This seems unlikely, but it's possible...
You're using a version of Node.js that CoffeeScript isn't currently compatible with. What do you get when you do node -v? Your safest bet is the latest 0.4.x, since those are stable releases (0.5.x is experimental).
This question is from awhile back.
Node 0.6.x throws a similar error with CoffeeScript 1.1.x; upgrading to 1.3.x does the trick.
Likely 2 different coffee-scripts on your system. check which coffee, than track down the older one and ice it. I had one from an install last summer (v1.1), it's all cleared up now.