f



Help needed! Fortran Dll works for compaq fortran not for Intel Fortran

Dear all,

I am porting a compaq fortran project (version 6.x) over to the intel
fortran compiler (version 8.0). However, crash always happens at the
internal write statement under the intel fortran compiler.

=========
project brief:
=========
The soultion comprises two parts, one is the c++ project, which in charge of
the user interface, the other project is a Fortran Dll project. The Fortran
Dll is invoked by the C++ project. the problem I meet here is every simple,
the C++ project is just a framework of the dialog based mfc win32
application. In the code response to the click OK button, it will invoke the
fortran dll. The Fortran dll is built as the name of TestDll.dll. The core
part of the C++ and Fortran code are shown as follows:


=========
C++ code
=========
....
typedef unsigned int (__stdcall *_FPTR_START_APP) ( void * );
....

 if (nResponse == IDOK)              ////code corresponding to the click OK
button
 {

  CString fileName = "abc";
  m_hSimDLL = LoadLibrary((LPCTSTR)"TestDll");
  FARPROC fPtrStartApp = ::GetProcAddress( m_hSimDLL, "StartApp" );

   void* pvSecurity = NULL;
   unsigned int* puiThrdAddr = NULL;
   m_hThread = (HANDLE) _beginthreadex( pvSecurity, 0,
(_FPTR_START_APP)fPtrStartApp, (void *)(LPCTSTR)fileName.GetBuffer(0), 0,
puiThrdAddr );
....//idle or do something here so that the thread of the fortran Dll will
run and can be debugged.
}

=========
Fortran code
=========
Corresponding Fortran Dll is made of by the following code:

! ---------------------------------------------------------------------
Subroutine StartApp(iAddressStrBuf)

     !DEC$ ATTRIBUTES DLLEXPORT::StartApp
     !DEC$ ATTRIBUTES ALIAS: 'StartApp'::STARTAPP
     !DEC$ ATTRIBUTES VALUE::iAddressStrBuf

    integer iAddressStrBuf
    integer i
    character*32 strTest

    i=555

    write(strTest,'(i10.10)') i
 return
end subroutine StartApp
!----------end of the fortran dll project ----------------------------------

=========
Symnpton
=========
Whenever the internal write statement is invoked, the program will crash and
report the error of access violation occurred.

If there is anyone knows the issue, could you please give me a hand.

=========
Attached
=========
It appears that I can not send the whole project sample files in zip format,
I will send to those who responsed to this email either in person or to the
newsgroup if needed.

Best Regards,

David



0
ixuw (5)
4/8/2004 9:22:12 AM
comp.lang.fortran 11941 articles. 1 followers. Post Follow

1 Replies
799 Views

Similar Articles

[PageSpeed] 40

On Thu, 8 Apr 2004 10:22:12 +0100, "David" <ixuw@yahoo.com> wrote:

>I am porting a compaq fortran project (version 6.x) over to the intel
>fortran compiler (version 8.0). However, crash always happens at the
>internal write statement under the intel fortran compiler.

You also posted this in our user forum and got an answer there.

>It appears that I can not send the whole project sample files in zip format,
>I will send to those who responsed to this email either in person or to the
>newsgroup if needed.

The best place to submit suspected problems is Intel Premier Support.  If you
have "how to" questions, feel free to use our user forum.  The
comp.lang.fortran newsgroup is not supposed to be a substitute for vendor
support.


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
  http://softwareforums.intel.com/
Intel Fortran Support
  http://developer.intel.com/software/products/support/
0
Steve.Lionel (766)
4/8/2004 2:36:19 PM
Reply:

Similar Artilces:

Help needed! Fortran Dll works for compaq fortran not for Intel Fortran #2
Dear all, I am porting a compaq fortran project (version 6.x) over to the intel fortran compiler (version 8.0). However, crash always happens at the internal write statement under the intel fortran compiler. ========= project brief: ========= The soultion comprises two parts, one is the c++ project, which in charge of the user interface, the other project is a Fortran Dll project. The Fortran Dll is invoked by the C++ project. the problem I meet here is every simple, the C++ project is just a framework of the dialog based mfc win32 application. In the code response to the click OK button, it...

How to link an Fortran f77 dll (Absoft Pro Fortran) with an existing f77 dll (Visual Fortran)
Hello, i have to connect an existing Fortran F77 DLL written in Visual Fortran to a new one. How can i link two DLLs together? I search an example, to understand how it works. Please help me! At the moment i have a dll called "example.dll". Within this dll are three functions: DOUBLE PRECISSION FUNCTION EXF1(A,B) !DEC$ ATTRIBUTES DLL_EXPORT :: EXF1 !DEC$ ATTRIBUTES ALIAS : "EXF1" :: EXF1 REAL*8 A,B EXF1=A*2*B RETURN End DOUBLE PRECISSION FUNCTION EXF2(A,B) !DEC$ ATTRIBUTES DLL_EXPORT :: EXF2 !DEC$ ATTRIBUTES ALIAS : "EXF2" :: EXF2 REAL*8 A,B EXF2...

Compaq Visual Fortran or Intel Fortran Compiler?
Hey As a C/C++ programmer (Fortran newbie) I need to port a Fortran-77 (with extensions for namelist/IO, long variable names and include files) source to MS Windows. The original source runs under VMS, with differential compile support (cpp) for a number of Unix systems (Solaris, Digital Unix, IRIX, UNICOS). Which is the fastest way Compaq Visual Fortran or Intel Fortran Compiler for Windows or ...? thanx, Ivo silvestri@isitech.com (silvestri) writes: > As a C/C++ programmer (Fortran newbie) I need to port a Fortran-77 > (with extensions for namelist/IO, long variable names and inclu...

Calling a Fortran DLL from Fortran
In calling a FORTRAN DLL, from FORTRAN code, one needs to place the DLL in = a path that is searched by the Windows operating system. Placing the DLL in= a folder other than the ones in the PATH environment variable, will cause = the call to fail. Does anyone know how to call a DLL that is stored in a fo= lder not in the Windows path? In VB one uses the Declare statement to accom= plish that. I tried GETENVQQ to get the Path environment variable, then aug= ment the path of the DLL and then using the SETENVQQ to update the PATH en= vironment variable but I haven't been able to succ...

Building DLLs with Compaq Visual Fortran and Intel Visual Fortran
Dear all, I have lately decided to upgrade from (CVF) Compaq Visual Fortran 6.6 to (IVF) Intel Visual Fortran 8.1 My main task is CFD where I usually built "user-subroutines" in the form of a user.dll file which the commercial solver can use and thus implements my models. Up till now everything worked fine with CVF. I tried to compile and link an already used library with IVF. I have used exactly the same compiler and linker switches with the exception of /iface:cvf and IVF produced the dll with no errors. However, the solver just hangs ... I thought about checking the "c...

Compaq Visual Fortran discontinued: upgrade to Intel Visual Fortran?
Hi, I use the latest version of Compaq Visual Fortran on a Windows system. CVF development is being discontinued as of the end of this year. They offer an upgrade to Intel Visual Fortran 9.0. Any thoughts on whether this is advisable/desirable/necessary would be highly appreciated. Does anybody have experiences going that route already? Thanks a lot. --hh -- It would be also interesting to know what happens with and AMD Athlon processor. Does the Intel Visual Fortran proposes optimizations for AMD ? NN a �crit : > Hi, > I use the latest version of Compaq Visual Fortran on a W...

Intel fortran and fortran 77 standard!
Hi! I am trying to recompile lapack 3.0 with Intel fortran, but I am getting compiler errors in ilaenv.f I tried to skip that file to see what happens, but there are more errors. Can Lapack be compiled with Intel compiler at all? I was using CVF 6.1 by now and any hints on how to avoid trouble are welcome. Thanks! Atmapuri. "Atmapuri" <janez.makovsek@usa.net> wrote in message news:QN6jc.1589$37.232466@news.siol.net... > Hi! > > I am trying to recompile lapack 3.0 with Intel > fortran, but I am getting compiler errors in ilaenv.f > I tried to skip that file...

how to run Fortran codes in Compaq Visual Fortran?
I have a bunch of Fortran applications from my adviser and I need use them to create a executable program. My adviser gave me a makefile to do the job. But honestly, I don't know how to run the makefile in Cygwin. I changed the makefile to a two simple command line file and created an executable program. But due to some memory problem, the results are not complete. My adviser uses Compaq Visual Fotran 6.5 and generate an executable program works fine. However when I add all the Fortran application files into one project, I got tons of error message. I don't know what I did wrong. Pleas...

A Fortran book for returning to Fortran?
What book would you recommend for returning to Fortran after many years without it? I have several years of Fortran experience, most of it with versions before Fortran 77, and never did learn many of the new features of Fortran 77. Robert Miles On 10/23/2011 03:53 AM, Robert Miles wrote: > What book would you recommend for returning to Fortran after many years > without it? > > I have several years of Fortran experience, most of it with versions > before Fortran 77, and never did learn many of the new features of > Fortran 77. How about Fortran 95/2008 ? Is there a rea...

Fortran to C to Fortran Arrays
I'm doing a little research. I want to create a multi-dimensional array in fortran containing real values and pass it to a C/C++ program. In the C/C++ program the array will be loaded with values gathered using a libjpeg library or something (haven't figured that out yet). Then I want to return this array back to the Fortran program, loaded with data so that it can be handled there. I have not started to write code yet on this I am just researching some. Can this be done? deadpickle wrote: > I'm doing a little research. I want to create a multi-dimensional > array in fortran...

Compaq Visual Fortran v6.6 Professional, Intel Fortran Compiler Pro With IMSL V8.0.048
Compaq Visual Fortran v6.6 Professional, Intel Fortran Compiler Pro With IMSL V8.0.048 - new ! Intel Fortran Compiler Pro With IMSL V8.0.048 CD NR 15 878 BVisual Fortran Compiler Pro With IMSL v8.0.048 - Intel Soft 15 798 INTEL.FORTRAN.COMPILER.V8.0.048 INTEL.FORTRAN.COMPILER.V8.0.IMSL.v5.0 INTEL.VTUNE.PERFORMANCE.ANALYZER.V7.1A Intel.Fortran.Compiler.for.Windows.v7.1.022 Compaq Visual Fortran v6.6 Professional 11 299 for more info, and for other 16,000 more CDs, [ no dongles, no activations, etc ... needed ! ] (free donge)! No time limitation! ple...

FORTRAN
I was planning on using Fortran 77 for a project I am undertaking, but are there any later versions supporting derived types that have a free online guide (or pdf file) as to the language structure?? ie Fortran 90? Thanks "iantheengineer" <do@youthinkimdaftenuff.edu> wrote in message news:ca3mss$p53$1@newsg4.svr.pol.co.uk... > I was planning on using Fortran 77 for a project I am undertaking, but are > there any later versions supporting derived types that have a free online > guide (or pdf file) as to the language structure?? ie Fortran 90? > You will find lo...

Fortran
Is there cheaper Fortran compilers to Mac Os X than Absoft Pro Fortran v9.0 for OS X or IBM XL Fortran Compiler 8.1 for OS X Commercial versions are Pro Fortran Compiler & Tools 9.0 97PCOSX1 $899.00~ Buy now and XL Fortran Compiler & Tools 8.1 XLFOSX381C $999.00 Buy now Heikki Jamsa heikki.jamsa@mail.suomi.net On Fri, 26 Nov 2004 02:21:49 +0200, Heikki J�ms� (heikki.jamsa@mail.suomi.net) wrote: > > Is there cheaper Fortran compilers to Mac Os X > than Absoft Pro Fortran v9.0 for OS X > or > IBM XL Fortran Compiler 8....

FORTRAN
POWER TO YOU, EVERY BODY I want to read all frames of a film by fortran software, picture by picture. is it possible ? how? mohsen sajadi <sajadi111@yahoo.com> wrote: > POWER TO YOU, EVERY BODY [Caution: at least here outside the ancient realm of FORTRAN, writing in ALL CAPITALS is considered shouting, and thus impolite...] > I want to read all frames of a film by fortran software, picture by > picture. is it possible ? Probably yes, if that's what you really want to do. But it completely evades me why anyone would want to do that, other than for the perverse fun of be...

Web resources about - Help needed! Fortran Dll works for compaq fortran not for Intel Fortran - comp.lang.fortran

Watch: Marvel's Super Bowl TV Spot for 'Captain America: Civil War'
"United we stand! United we stand! Divided we fall! Divided we fall!" Disney aired this new TV Spot during the Super Bowl for Captain America: ...

The Latest: South Korea Warns NKorea Patrol Boat
Hindustan Times The Latest: South Korea Warns NKorea Patrol Boat New York Times SEOUL, South Korea — The Latest on North Korea's launch of ...

Survivor pulled from building 2 days after Taiwan quake
A survivor found shielded under the body of her husband was pulled out alive from the rubble of a toppled high-rise apartment building on Monday, ...

2 dead, 4 hurt in shooting after Mississippi Mardi Gras parade
Chicago Tribune 2 dead, 4 hurt in shooting after Mississippi Mardi Gras parade Chicago Tribune First responders take control of the scene ...

PETER OBORNE sends a dispatch from Aleppo as Syrians flee for Europe
The northern Syrian city of Aleppo was considered one of the most beautiful in the Middle East four years ago, but has since been destroyed by ...

Lunar New Year turbulence as 'fire monkey' swings into action
Hong Kong's respected feng shui masters expect an incendiary mix as the monkey combines with the fire element, but also say the year ahead will ...

Google Android VR tipped to take on Oculus, Samsung Gear VR
Google already has one foot in the virtual reality train but Cardboard is more like a tentative, hobbyist contraption more than a serious, longer ...

Danny Willett wins Dubai Desert Classic to further Ryder Cup claims
Englishman Danny Willett reasserted his already impressive Ryder Cup credentials by winning in Dubai as his birdie on the 72nd hole sealed victory ...

Wheaton College Professor Who Said Muslims And Christians Worship Same God Will Leave Teaching Post
Wheaton College professor, Dr. Larycia Hawkins, is leaving the university after fallout from a controversial Facebook post she made about Muslims ...

Would Margaret Thatcher really want to stay in EU on back of David Cameron's deal?
The voice is that of Margaret Thatcher: it has not been heard for the obvious reason that the former Conservative Prime Minister died three years ...

Resources last updated: 2/8/2016 5:59:47 AM