- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following code work perfect on Linux but crashed windows
it seems like windows version of compiler does not like POINTER.
How do I fix this problem? I feel really frustrated with this problem....
how do I pass TEMP to another subrountine as argument. it seems windows
version has different requirement....
mark
//////////////////////////////////////////////////////////////////////////////////////
SUBROUTINE
XFG(..................)
REAL TEMP
POINTER (WKTEMP , TEMP (1))......................................
NMAX = MAX(N1,N2) ITEM = 2 * ISZ * NMAX CALL GALLOC (WKTEMP , ITEM, IERR, IABORT) DO I2=1,N2 DO I1=1,N1 TEMP(I1)=CDATA(I1,I2) END DO.....................
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could it be a problem on the C side? Maybe you didn't take into account the difference in default linkage symbols for Cray pointers between linux and Microsoft C compatible Windows Fortran, or maybe you have switched between 32- and 64-bit modes. If you want ifort -Qlowercase -us in Windows, you must specify it. More common usage with Cray pointers is to make the C code agree with the default of the Fortran in use. If you want greater portability, use standard Fortran facilities, either Fortran pointers or f2003 C interoperability. If you are using a compiler which requires a special option to support Cray pointers, read up on it. If you don't know which compilers you are using, you are sure to get lost, and we are sure not to guess the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick reply. I am new to intel fortran. my compiler is intelvisual fortran.
how do I specify options tosupport cray pointers inside the windows. I tried the
"-Qlowercase -us" and I, now, have difficulty to link it and it always complaining C library can not found this fortran routine. Yes, I am using C/C++ to call fortran...
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code you show us lacks the DIMENSION attribute for the (judging on the usage) array TEMP. Please show us some more code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks , here is one
SUBROUTINE CFFT2D(CDATA,N1,N2,SIGN,LDA,
1 INIT, TAB1, TAB2, IERR)C
IMPLICIT NONEC
INTEGER N1,N2,LDA INTEGER I1,I2 INTEGER SIGN, INIT, IERR, ISZ, NMAX, IABORT, ITEMC
REAL TAB1(*), TAB2(*) COMPLEX CDATA(LDA,N2)c COMPLEX TEMP
REAL TEMP(MAX(N1,N2))c POINTER (WKTEMP , TEMP (1))
C
IERR = 0 IABORT = 0C CALL SIZEFLOAT (ISZ)
ISZ = 4; NMAX = MAX(N1,N2) ITEM = 2 * ISZ * NMAXc CALL GALLOC (WKTEMP , ITEM, IERR, IABORT)
DO I2=1,N2 DO I1=1,N1 TEMP(I1)=CDATA(I1,I2) END DOC
C CALL CEFFTP(TEMP,N1,SIGN)
CALL CFFTX (TEMP, 2, N1, SIGN, INIT, TAB1, IERR)C
C NOW STUFF IT BACK
C
DO I1=1,N1 CDATA(I1,I2)=TEMP(I1) END DOC
END DOC
C NOW THE 2 AXIS
C
DO I1=1,N1 DO I2=1,N2 TEMP(I2)=CDATA(I1,I2) END DOC
C CALL CEFFTP(TEMP,N2,SIGN)
CALL CFFTX (TEMP, 2, N2, SIGN, INIT, TAB2, IERR)C
C NOW STUFF IT BACK
C
DO I2=1,N2 CDATA(I1,I2)=TEMP(I2) END DOC
END DOC
C ALL DONE
C
c CALL GFREE (WKTEMP)
RETURN END
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page