Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28445 Discussions

INTAR_FInterface_PSCAD.f(617): error #6284: There is no matching specific function for this generic

Andreaver
Beginner
1,642 Views

I created a block in PSCAD software starting from a .dll, .f and .psdx files. I am using an intel Fortran visual compiler because the DLL has been created for an intel compiler. Using .dll, I create the .f and .psdx files. Following, I create a block in PSCAD. So, I add a component throughout a file reference (.f). The same project with the same .dll, .psdx and .f files works on the laptop of my colleague. Instead, on my laptop does not work. We are using the same PSCAD and intel visual fotran compiler. So , can it be a setting problem of my pc ?

Could you have some solutions or informations?  The errors are shown below.

INTAR_FInterface_PSCAD.f(617): error #6284: There is no matching specific function for this generic function reference.   [GETPROCADDRESS]

INTAR_FInterface_PSCAD.f(626): warning #6075: The data type of the actual argument does not match the definition.   [DLLHANDLE]

NMAKE : fatal error U1077: '"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\bin\intel64\ifort.exe"' : code retour '0x1'

 

In attached  you can find:   my result of Fortran Medic utility averdicchio_2021_04_22_14_45_49.txt.  Moreover you can find the result of Fortran Medic utility of my colleague where the project works msdiallo_2021_04_22_12_13_03.txt.  

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
1,563 Views

As I suggested above, you have this:

 integer, save :: dllHandle = 0 !Save the handle so loadlibrary only needs to be called the first TIME

 

Change that to:

 integer(HANDLE), save :: dllHandle = 0 !Save the handle so loadlibrary only needs to be called the first TIME

 

Also change:

 integer function INTAR_dllHandler_noinstance(IUNIT,functionName, dllFilename, dllInstruction)

to:

 integer(HANDLE) function INTAR_dllHandler_noinstance(IUNIT,functionName, dllFilename, dllInstruction)

View solution in original post

0 Kudos
10 Replies
Steve_Lionel
Honored Contributor III
1,629 Views

These attachments are not helpful. What we would need to see is the source for INTAR_FInterface_PSCAD.f

I have a guess, though. You have arguments to these two Windows API routines that are "handles". This is an address-sized integer, but you probably declared the variable as just INTEGER (or maybe worse, INTEGER*4), and are building a 64-bit configuration. Use INTEGER(HANDLE) instead.

0 Kudos
JohnNichols
Valued Contributor III
1,618 Views

Dear Dr Fortran:

My mother used to tell me - if I have told you once I have told you a thousand times.  Your double post brought back memories of mum and it cheered my day no end. 

Thank you 

I know it was unintended but the unintended side effects are what make life fun. 

JMN

She also used to say other things I cannot use in polite company. 

0 Kudos
Steve_Lionel
Honored Contributor III
1,610 Views

Your post doubled as well. This was a forum bug, not my doing.

0 Kudos
JohnNichols
Valued Contributor III
1,602 Views

In 1990, I was using MS Fortran and a great program called ULARC to investigate the failure of masonry arches after an earthquake. 

ULARC comes from the great team led by Powell at UCB.  Anyway as I was trying to explain the results to a Catholic Priest, try explaining plastic analysis of masonry to a priest, he looked at me, all priests are he in that religion and said "God works in mysterious ways" - it applies to this forum. 

I can never tell what will excite the crowd and what will be a dud. 

 

0 Kudos
Andreaver
Beginner
1,577 Views

Good morning Belt,

Thank you for your answer.

I attache you   .f file. I am using an intel visual fortran 19.0.4.0.245 (64bit).

Thank you for your time.

Regards,

Andrea

0 Kudos
Steve_Lionel
Honored Contributor III
1,564 Views

As I suggested above, you have this:

 integer, save :: dllHandle = 0 !Save the handle so loadlibrary only needs to be called the first TIME

 

Change that to:

 integer(HANDLE), save :: dllHandle = 0 !Save the handle so loadlibrary only needs to be called the first TIME

 

Also change:

 integer function INTAR_dllHandler_noinstance(IUNIT,functionName, dllFilename, dllInstruction)

to:

 integer(HANDLE) function INTAR_dllHandler_noinstance(IUNIT,functionName, dllFilename, dllInstruction)
0 Kudos
Steve_Lionel
Honored Contributor III
1,563 Views

The more I look at this, the more problems I find. It may be simplest for you to just build this as a 32-bit (Win32) project and not as x64. Of course, I don't know what PSCAD wants to do with it, but it's clear that there's a strong assumption in the code of a 32-bit environment.

0 Kudos
Andreaver
Beginner
1,524 Views

Good morning Belt,

Thank you for your time.

You were right. However, now I have an other error and I think that it is due to some MSVC library or Framework.  Do you Known this conflict ? Attached of this mail you can find the screenshot of the error and the Fortranmedic result. I am so sorry, but I am an electrical engineer and I have limitations in computer science.

Thank you again.

Andrea

0 Kudos
Steve_Lionel
Honored Contributor III
1,513 Views

Hi.. my name is Steve.

The new error is due to incompatibility between Microsoft Visual C++ versions. Migrating from VS2010 to VS 2017: Getting error __iob_func: identifier not found (microsoft.com) is a good explanation of the general problem. You are linking with a static library that was built with a very old version of Microsoft Visual C++. When Microsoft changed how the C++ I/O library worked, it broke link compatibility for these objects.

As the post explains, the only solution is to get a version of the external library built with a newer Microsoft C++. 

0 Kudos
Andreaver
Beginner
1,469 Views

Thanks Steve !!

I solved the problem, with a software called Fortranmedic.

It allowed me to add some libraries and resolve conflicts between Intel Fortran and PSCAD.

Thank you again for your time.

Regards,

Andrea

0 Kudos
Reply