CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   fortran dll (http://www.cfd-online.com/Forums/cfx/24877-fortran-dll.html)

ollimarc December 3, 2007 19:34

fortran dll
 
hi!

ive got a quick question. i want to include a fortran code into cfx. for this i want to work through the tutorial which is written in xmod11.pdf

but when i want to create my dll file, i have a problem like this:

F:\study\project\progg\ansystest>cfx5mkext userpart.F df -MD -fpp:-m -include:"c:\programme\ansys inc\cfx\cfx-10.0\include" -object:wi nnt\\userpart.o -c userpart.F df: invalid option -- M Try `df --help' for more information. An error has occurred in cfx5mkext:

df exited with return code 1.

where is the problem? i can compile my fortran code in the command line. it is a compiler which is included in cygwin. so the compiler is there. iam using cygwin in winnt to compile my fortran code my path variable include this lines:

C:\cygwin\bin;c:\programme\ansys inc\cfx\cfx-10.0\bin

do i need special compilers? if so, which ones? thanks for help!

ollimarc December 4, 2007 07:58

Re: fortran dll
 
i think iam a little bit more closer to what i want to do.

i found out that all the processes with cfx5mkext run with its properties in the ccl file.

iam using the g77 compiler (under cygwin) in winnt. what settings do i need to do in this file?

these are the standard settings for linux

OS: linux cc = gcc fc = pgf90|g77 ld = ld ext build cflags = -fpic ext link ldflags = -shared FORTRAN: pgf90

# maybe we shouldn't use -Msecond_underscore?

ext build fflags = -fpic -Msecond_underscore -g77libs

ext link ldflags = -shared -g77libs END ATTRS: double

cppflags = -DDOUBLE_PRECISION

FORTRAN: pgf90

ext build fflags = -fpic -Msecond_underscore -g77libs -i4 -r8

END

FORTRAN: g77

error message = Double Precision builds are only supported \ using the Portland Group compiler under Linux. If you have this compiler \ installed already, ensure that it is in your PATH.

END END CHIPSET: ia64

cc = ecc

fc = efc

ext build cflags = -fpic

#ext build fflags = -fpic -cm END END

and these are the values for winnt.

OS: winnt cc = cl fc = df! ld = link cxx = cl ext build cflags = -MD ext link ldflags = -threads ext link lib5files = solver-pvm.lib cppincflag f = -include: cppflags f = -fpp:-m fc outopt obj = -object: fc outopt exec = -dll: cc outopt obj = -Fo ext lib suffix = dll ext lib pattern = %s.dll ATTRS: double

cppflags = -DDOUBLE_PRECISION

ext build fflags = -integer_size:32 -real_size:64 -MD

ext link lib5files = solver-pvm.lib END END

i tried to play around with some lines, but i get error messages instead a dl file. anybody knows this problem?


astroganga October 19, 2010 09:01

I have a similar problem.

OS: windows XP 64-bit
CFX version: 12.1
Fortran compiler: PGI Visulal Fortran 2008

I know I must set up the cfx5mkext.ccl in order to link properly CFX to the Fortran compiler.

Currently the cfx5mkext.ccl is:

[...]
OS: winnt amd64
cc = cl
fc = pgf77|pgf90|pgf95
ld = link
cxx = cl
ext build cflags = -MD
ext build fflags = -Qvec- -iface:cvf -MD
ext link ldflags = -threads -dll
ext link lib5files = solver-mpich2.lib
cppincflag f = -include:
cppflags f = -fpp
fc outopt obj = -object:
fc outopt exec = -exe:
cc outopt obj = -Fo
ext lib suffix = dll
ext lib pattern = %s.dll
ATTRS: double
cppflags = -DDOUBLE_PRECISION
ext build fflags = -Qvec- -iface:cvf -integer_size:32 -real_size:64 -MD
ext link lib5files = solver-mpich2.lib
END
END


When I run my routine from CFX command line I obtain:

C:\Archivio\arccfx\FIVE_STEPS>cfx5mkext runoa.f
C:\Program Files\PGI\win64\10.8\bin\pgf77 -Qvec- -iface:cvf -MD -object:winnt-amd64\\runoa.o -c runoa.f
pgf77-Error-Unknown switch: -Qvec-
pgf77-Error-Unknown switch: -iface:cvf
pgf77-Error-Unknown switch: -MD
An error has occurred in cfx5mkext:

C:\Program Files\PGI\win64\10.8\bin\pgf77 exited with return code 1.

joey2007 October 19, 2010 14:26

Check the help. I guess for windows intel is supported and not portland group. To be sure check it. May be I remember not correctly.


All times are GMT -4. The time now is 04:17.