CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Error while compiling Fortran routine

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2006, 04:39
Default Error while compiling Fortran routine
  #1
Manoj Kumar
Guest
 
Posts: n/a
Hi Everyone

I am getting following error, while trying to create shared library for the user sub routine, MomentumSource1.F used in one of the Ansys CFX 10 tutorials ...

C:\cfx\test1>cfx5mkext MomentumSource1.F

-----------------------

df -MD -fpp:-m -include:"C:\Program Files\Ansys Inc\CFX\CFX-10.0\include" -object:winnt\\MomentumSource1.o -c MomentumSource1.F

DIGITAL Visual Fortran Optimizing Compiler Version: V5.0

Copyright (c) 1997 Digital Equipment Corp. All rights reserved.

Digital (R) Fortran Preprocessor Version V5.0-007

Copyright (c) Digital Equipment Corp 1993,1997.

** error UNREC: Unrecognized option '-m'.

C:\DOCUME~1\Guest\LOCALS~1\Temp\fpp10.tmp

df -threads -dll:.\winnt\\MomentumSource1.dll

winnt\\MomentumSource1.o C:\Progra m Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib

DIGITAL Visual Fortran Optimizing Compiler Version: V5.0

Copyright (c) 1997 Digital Equipment Corp. All rights reserved.

Microsoft (R) 32-Bit Incremental Linker Version 5.00.7022

Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

/entry:_DllMainCRTStartup@12

/ignore:505

/debugtype:cv

/debug:minimal

/pdb:none

winnt\\MomentumSource1.o

"C:\Program Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib"

dformd.lib

msvcrt.lib

dfconsol.lib

kernel32.lib

/out:.\winnt\\MomentumSource1.dll /dll

LINK : fatal error LNK1181: cannot open input file "dformd.lib"

An error has occurred in cfx5mkext:

df exited with return code 73.

-----------------------------------------------

I went through the older posts but couldn't get much out of them. Can anyone help me out. Thanks in advance.

Manoj
  Reply With Quote

Old   January 24, 2006, 05:30
Default Re: Error while compiling Fortran routine
  #2
TobiasZ
Guest
 
Posts: n/a
Hi,

I guess you use a windows platform? The manual says that for this case Compaq Visual Fortran 6.5 or later is required and sucessfully tested.

Perhaps your compiler is not suitable for CFX-10. You could also try to use the command " ! system ("cfx5mkext <name_of_routine>.F") == 0 or die; " in CFX-Pre under Tools>CommandEditor. Another reason can also be that spaces are not allowed in the file name.

Hope this helps.

TobiasZ
  Reply With Quote

Old   January 24, 2006, 23:59
Default Re: Error while compiling Fortran routine
  #3
selvam R.P
Guest
 
Posts: n/a
Hi all,

i am also getting same error while compiling in command line

df -MD -fpp:-m -include:\CFX\CFX-10.0\include -object:winnt\\CDvar_Coeff.o -c CDvar_Coeff.F Compaq Visual Fortran Optimizing Compiler Version 6.6 Copyright 2001 Compaq Computer Corp. All rights reserved.

Compaq (R) Fortran Preprocessor Version 6.6-24 Copyright 2001 Compaq Computer Corporation.

CDvar_Coeff.i df -threads -dll:.\winnt\\CDvar_Coeff.dll winnt\\CDvar_Coeff.o D:\CFX\CFX-10.0\l ib\winnt\solver-pvm.lib Compaq Visual Fortran Optimizing Compiler Version 6.6 Copyright 2001 Compaq Computer Corp. All rights reserved.

Microsoft (R) Incremental Linker Version 6.00.8447 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/entry:_DllMainCRTStartup@12 /ignore:505 /debugtype:cv /debug:minimal /pdb:none winnt\\CDvar_Coeff.o D:\CFX\CFX-10.0\lib\winnt\solver-pvm.lib dformd.lib msvcrt.lib dfconsol.lib dfport.lib kernel32.lib /out:.\winnt\\CDvar_Coeff.dll /dll Creating library .\winnt\\CDvar_Coeff.lib and object .\winnt\\CDvar_Coeff.exp

CDvar_Coeff.o : error LNK2001: unresolved external symbol _CDVAR_COEFF_CORE@52 .\winnt\\CDvar_Coeff.dll : fatal error LNK1120: 1 unresolved externals An error has occurred in cfx5mkext:

df exited with return code 96.

thanks with regards
  Reply With Quote

Old   January 25, 2006, 05:08
Default Re: Error while compiling Fortran routine
  #4
TobiasZ
Guest
 
Posts: n/a
Hi Selvam,

I am not an expert, but I think your case is different. You have an error in your routine. During the compilation the compiler proofs, if your routine is correct and stops when an error occurs. It seems that you didn't define your external variable.

Regards

TobaisZ
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
Error occurs when compiling Fortran in CFX-4.4 zhaoyangly259 CFX 1 June 9, 2010 07:28
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
user defined function cfduser CFX 0 April 29, 2006 11:58
FORTRAN Routine - variable passing Malcolm CFX 1 August 11, 2005 19:51


All times are GMT -4. The time now is 22:02.