C compiler + discontinuities

37 views
Skip to first unread message

lutz.d....@googlemail.com

unread,
Sep 25, 2017, 12:14:54 PM9/25/17
to tumbi
Dear Jean-Philippe,

I have got two problems.

1)
I switched to VS2017 recently. From this time on NSP did no compile anymore (i.e. Scicos + Modelica blocks). It seems there are problems with the paths to the c compiler. Before it worked fine.

Is there a possibility to:
- set the paths properly
- use LCC (works fine with Scicoslab)?

Thank you for a hint.

2)
With VS2015 the block diagram compiled but did not always simulate. The problems started as soon as there were discontinuities (in case you are interested I could send you the .cos and .mo files by email). Since I use Scicoslab (and hopefully NSP in the near future) for Power Electronics Simulation switching is more or less always present. Did the treatment of discontinuities or the (DAE-)solver change from Scicoslab to NSP?

Thank you again for any hint.

Have a nice evening.


Best regards,

Lutz


jpc

unread,
Oct 2, 2017, 3:13:33 AM10/2/17
to tumbi
Dear Lutz

 I suppose that you use nsp version 1.3. I have investigated the pbs with VS2017 this week-end.
 The way Microsoft deals with VS2017 is a bit different from previous versions, we cannot rely on
 the registry to obtain the path of vcvarsall.bat
 Thus the method I have implemented will work only if you have installed VS2017 in
 the standard way.

  You have to do the following: you take the msvc_configure.sci attached file
  and put it in NSP/macros/system (NSP is the path where nsp is installed)
  Then you go in NSP/macros/system and you delete
  msvc_get_compiler.sci and msvc_configure.bin

  you start nsp and type
  add_lib('NSP/macros/system',compile=%t)
  you should see a message like

 Processing file: /usr/local/src/nsp2-trunk-gtk3/macros/system/msvc_configure.sci

 then you, you restart and
 If you type
 msvc_get_compiler()
 you should see the answer msc150

 

 Note also that If you have multiple compilers on your machine you can use
 msvc_select()
 to choose the one you want to use with nsp/scicos

 If you haven't installed you compiler in a standard path
 you can edit msvc_configure.sci
 search for msvc_check_product_2017 and change the code to fit your pathes
 Then redo the add_lib call


 If you haven't installed you compiler in a standard path
 you can edit msvc_configure.sci
 search for msvc_check_product_2017 and change the code to fit your pathes
 Then redo the add_lib call

For the second question, you can send me cos and mo files for tests
and yes, the version of scicos is slightly different between scicoslab and
nsp but I do not remember if the code has evolved for discontinuities treatment for
DAE.



 Best regards
jpc


jpc

unread,
Oct 2, 2017, 3:15:31 AM10/2/17
to tumbi

You can find the missing attached file here
Regards
jpc


msvc_configure.sci

lutz.d....@googlemail.com

unread,
Oct 2, 2017, 6:16:20 AM10/2/17
to tumbi
Dear Jean-Philippe,

thank you for your help! NSP now smoothly works with VS17. Thank you.

With the C compiler up and running I re-tested my simulations. Only half of them fail. So at the moment I must assume that the difficulties arise from my Modelica models and discontinuities are not a general problem.

So I want to apologize. I will  investigate the fails in depth in the next time.

If something relates to the simulator I come back on you (and send you the files).



Best regards,

Lutz.

================================================================================================================================================================================

Reply all
Reply to author
Forward
0 new messages