I use the 18.10 community edition of pgfortran to make the test example on p 123 of the users guide. This creates a DLL and a calling program. I can make the DLL in two steps as described in the example:
I get nothing! pgfortran is busy for a few seconds, no warning, no error message, no obj-file, no exe-file. But I remember that it did work with the 18.4 version of the community edition. Interestingly, when I remove the line
"!DEC$ ATTRIBUTES DLLIMPORT :: sub1, /acommon/ "
from prog1.f90, it works!! Apparently the linker finds the required modules in the obj1.lib without the DLLIMPORT directive. But that this directive should cause the compiler to abort is strange. I can not even compile, i.e.
pgfortran -Bdynamic -c prog1.f90
also produces no output, no warnings, and no error messages. Is this a new feature, or am I doing something wrong?
Thanks for the report! I’ve recreated the error here and it does look like a compiler issue which first began in 18.7.
I have added a problem report (TPR#26715) and sent it on to our compiler engineers for further investigation.
As you note, the error is due to the DEC ATTRIBUTES DLLIMPORT directive in prog1.f90. Removing this directive will work around the build error but cause “adata” to be a local variable rather than use the DLLs “adata”, thus causing incorrect results. Unfortunately, I don’t have a work around for the issue.
Thanks again for bringing this issue to our attention and we’ll get it fixed as soon as we can.
Thanks for the fast response. Too bad that the problem is not my fault and no workaround is available. Actually, if I could roll back to 18.4, it should work if the license is still valid. Do you think that is possible?
Do you still have 18.4 installed? If so, you should be able to still use it.
Different PGI versions are installed side-by-side so would still be there even after installing 18.10 unless you uninstalled it. The top level links to the PGI shell environments (like on your Desktop or the start menu) are replaced, so you may need run the shell “pgi.bat” by finding it under the file explorer.
Otherwise, you may need to reinstall.
If you need to download 18.4, send a note to PGI Customer Service (trs@pgroup.com) and we can send you instruction.
Sorry, doesn’t look like we’ve fix this as of yet. I’ve requested that we bump up the priority and see if we can get it corrected by 19.4, the next community edition. Not sure they be able to, but hopefully.
I just received the message that 19.4 is available as new community edition. Has this issue been fixed in the meantime? If not, I have to stay with the “old” version 18.4
best regards,
Bernhard
Dear Mat,
Since the next community edition 19.10 has been announced I would like to ask again about the bugfix. Until this is not resolved, I have to continue using the old version 18.4, the latest version that was working correctly.
best regards,
Bernhard
Dear Mat,
too bad - so I still have to live with 18.4 ;-). Well, this version is working fine for me, and I will probably not need new features of later versions. However, the DLL feature is essential for me. Nevertheless, I would like to know when a corrected version is available. Is it possible to get a message when the problem has been solved?