replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - importing Intel Visual Fortran .dll Procedures
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

importing Intel Visual Fortran .dll Procedures

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dmcc_ies



Joined: 09 Dec 2011
Posts: 4

PostPosted: Mon Dec 12, 2011 5:53 pm    Post subject: importing Intel Visual Fortran .dll Procedures Reply with quote

Hello, I am currently mixing ftn95 and ifort projects in visual studio 2010 but am encountering difficulties.

My silverfrost program calls a dll subroutine with no arguments:

Code:
program ftn95_prog

   stdcall intelSimple "intelSimple"

   call intelSimple() ! Call a simple intel fortran function (no args)   

   write(*,*) "hit return to terminate..."

end program ftn95_prog


My Intel .dll is composed of 3 external functions:

Code:
subroutine intelSimple()   
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL, DECORATE,ALIAS:'intelSimple' :: intelSimple   

   interface 
      subroutine subA()
      end subroutine subA   
   end interface       

   write(*,*) "simple intel subroutine called"
   call subA()

end subroutine intelSimple


subroutine subA()   
!subroutine for calling "subB" with an array argument 
    integer,dimension(3,3) :: array     
    interface
       subroutine subB(array)   
          integer,intent(inout),dimension(:,:) :: array
       end subroutine subB   
    end interface

    array=1
    call subB(array)   
end subroutine subA   


subroutine subB(array)
   integer,intent(inout),dimension(:,:) :: array     
   array=2 
end subroutine subB


When running this program I expect an array argument with shape = (3,3) to be passed into "subB", instead I find it has shape = (19241...,1,1,0)

Everything apears fine until I step into subroutine subB.

I would appreciate any help whatsoever
Thanks
Back to top
View user's profile Send private message
dmcc_ies



Joined: 09 Dec 2011
Posts: 4

PostPosted: Tue Dec 13, 2011 1:29 pm    Post subject: Reply with quote

Additionally, it would appreciate it if anybody could explain the difference between stdcall and f_stdcall. Does this just determine where hidden length arguments will appear?

Cheers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group