<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><span class="" id=":2ey.31" tabindex="-1" style="">Amaia,</span></p>
<p><span class="" id=":2ey.31" tabindex="-1" style=""> This kind of
problem is pretty impossible to diagnose without working with
the code and the Visual Fortran project.<br>
</span></p>
<p><span class="" id=":2ey.31" tabindex="-1" style=""> A couple
thoughts occur to me though. First, I notice in your email you
mentioned the line:</span></p>
<p><span class="" id=":2ey.31" tabindex="-1" style="">DEC$Attributes
DLLEXPORT :: TYPE 154</span></p>
<p><span class="" id=":2ey.31" tabindex="-1" style="">perhaps it is
just an artifact of the email but in the code there should not
be a space between TYPE and 154.</span></p>
Second, try putting break points into your code and running your
simulation from the Intel Visual Studio project instead of from the
Simulation Studio. This will allow you to stop on lines and step one
line of code at a time. You can put breakpoints into the UserLib.f90
subroutine; that is where the Type loading from DLLs occurs.<br>
<br>
Third, if for some reason you can't debug the code using breakpoints
then i<span class="" id=":2ey.31" tabindex="-1" style="">f your Type
is loading other subroutines or precompiled libraries and fail to
do so or get some kind of unhandled error inside them then you'll
get the "failed to load" error from TRNSYS. The way I would try to
diagnose this problem is to temporarily get rid of the call to the
subroutine and put in some fake lines of code that set the values
that you would normally get back from the subroutine. If you get
rid of all these subroutine calls and the "failed to load" problem
goes away then you know that there is a problem with loading those
additional subroutines.<br>
kind regards,<br>
David<br>
<br>
</span><br>
<div class="moz-cite-prefix">On 10/14/2018 16:09, Amaia Zuazua Ros
via TRNSYS-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAH7+1HsZoZBnwiw+JwDLN_yShLpSYWCqiC6-GbyfGfD_VDrsTg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr"><br>
<div>Hi <span class="" id=":2ey.17" tabindex="-1" style="">TRNsys</span>
users,</div>
<div><br>
</div>
<div>I had compiled my own type (kind of unglazed solar
collector) using Visual Studio (I use <span class=""
id=":2ey.18" tabindex="-1" style="">TRNsys</span> 17). I did
it months ago and it worked perfectly, it was an steady state
calculation so I <span class="" id=":2ey.19" tabindex="-1"
style="">have</span> tried to include a thermal inertia
component using <span class="" id=":2ey.20" tabindex="-1"
style="">setStorageSize</span>, <span class="" id=":2ey.21"
tabindex="-1" style="">setStorageVar</span>, <span class=""
id=":2ey.22" tabindex="-1" style="">getStorageVars</span>
and <span class="" id=":2ey.23" tabindex="-1" style="">SolveDiffEq</span>.
I was compiling and simulating while I was making the
modifications but suddenly Simulation Studio stopped reading
the type, I got the error "A type was called in the <span
class="" id=":2ey.24" tabindex="-1" style="">TRNsys</span>
input file but was either not linked into <span class=""
id=":2ey.25" tabindex="-1" style="">trndll</span>.<span
class="" id=":2ey.26" tabindex="-1" style="">dll</span> or
was not found in an external <span class="" id=":2ey.27"
tabindex="-1" style="">dll</span>. A dummy subroutine was
called in its place. Please link the type or remove it from
the input file".</div>
<div>The debug and release .<span class="" id=":2ey.28"
tabindex="-1" style="">dll</span> are in the corresponding
files, I checked the name of the subroutine (Type 154 in this
case) and the DEC$Attributes <span class="" id=":2ey.29"
tabindex="-1" style="">DLLEXPORT</span> :: TYPE 154 and the
names are correct... I don't know what else could <span
class="" id=":2ey.30" tabindex="-1" style="">have</span>
happened, maybe the subroutines that I'm calling don't
correspond to my version?</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>Regards,</div>
<div><br>
</div>
<div><span class="" id=":2ey.31" tabindex="-1" style="">Amaia</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@lists.onebuilding.org">TRNSYS-users@lists.onebuilding.org</a>
<a class="moz-txt-link-freetext" href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
Madison, WI 53703 USA
P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
</body>
</html>