[TRNSYS-users] Error calling a type
David BRADLEY
d.bradley at tess-inc.com
Tue Oct 16 09:54:38 PDT 2018
Amaia,
This kind of problem is pretty impossible to diagnose without working
with the code and the Visual Fortran project.
A couple thoughts occur to me though. First, I notice in your email
you mentioned the line:
DEC$Attributes DLLEXPORT :: TYPE 154
perhaps it is just an artifact of the email but in the code there should
not be a space between TYPE and 154.
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.
Third, if for some reason you can't debug the code using breakpoints
then if 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.
kind regards,
David
On 10/14/2018 16:09, Amaia Zuazua Ros via TRNSYS-users wrote:
>
> Hi TRNsys users,
>
> I had compiled my own type (kind of unglazed solar collector) using
> Visual Studio (I use TRNsys 17). I did it months ago and it worked
> perfectly, it was an steady state calculation so I have tried to
> include a thermal inertia component using setStorageSize,
> setStorageVar, getStorageVars and SolveDiffEq. 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 TRNsys input file but was either not linked into
> trndll.dll or was not found in an external dll. A dummy subroutine was
> called in its place. Please link the type or remove it from the input
> file".
> The debug and release .dll are in the corresponding files, I checked
> the name of the subroutine (Type 154 in this case) and the
> DEC$Attributes DLLEXPORT :: TYPE 154 and the names are correct... I
> don't know what else could have happened, maybe the subroutines that
> I'm calling don't correspond to my version?
>
> Thanks in advance,
> Regards,
>
> Amaia
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at lists.onebuilding.org
> http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
--
***************************
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
d.bradley at tess-inc.com
http://www.tess-inc.com
http://www.trnsys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20181016/97e61533/attachment.htm>
More information about the TRNSYS-users
mailing list