CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   use fortran in cfx (http://www.cfd-online.com/Forums/cfx/23062-use-fortran-cfx.html)

James September 15, 2006 02:52

use fortran in cfx
 
Hi,all

When I do the tutorial aircondition in cfx10.0,use the command editor to process the systax: ! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed"; Such error comes: ERROR CCL parser failed with message: Perl Syntax errors detected: Died at (eval 63) line 1. Can someone tell me the reason? Any suggestion will be appreciate.

Felix September 15, 2006 06:51

Re: use fortran in cfx
 
Hi James,

often you can find a more detailled error report in the "command window". It is that additional window which appears when you open the CFX Launcher. I don't know if it appears when you are using the workbench. Which Compiler do you use?

Regards Felix

James September 15, 2006 09:22

Re: use fortran in cfx
 
Hi,Felix I process ! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed"; by using the Tool>command editor in cfx-pre ,exactly as said in the help.

when I click the "Process" ,error appears.Donnot know what is the reason.I install the visual fortran and it run correctly.

Felix September 15, 2006 09:42

Re: use fortran in cfx
 
Hi James,

are you working with the workbench or do you start CFX-Pre from the cfx-launcher? If you start CFX-Pre with the launcher then a second prompt window starts when you start the CFX-Launcher. You need to read the error report in this prompt window (black background; it is not the tool>command editor) and maybe post it. Which Version of visual fortran do you use?

James September 15, 2006 21:04

Re: use fortran in cfx
 
Hi,Felix

I start CFX-Pre with the lancher.I am using Compaq Visul Fortran now.the error report in this prompt window shows :

use of unitialized value in pattern match (m//) at (eval33) line1. regards.

Adam September 29, 2006 07:10

Re: use fortran in cfx
 
James,

I had the same problem. Don't know why you get this, but one way to overcome this is to type in the command

cfx5mkext <filename.F>

directly into the command line and it should work (presuming you have fortran & compiler installed).

If you are running a networked machine, then you can bring the cfx5mkext.ccl file into your working directory and alter the compiler option for your particular machine. CFX will first look in your working directory for the cfx5mkext.ccl file before looking in the installed network directory when compiling fortran routines.

Hope this helps

Adam

James October 2, 2006 08:54

Re: use fortran in cfx
 
hi,Adam when I type in the command --cfx5mkext , "A fatal error has occurred in cfx5mkext: the compiler command "df" could not be found.Please ensure that the compiler is on your path and try again."


Adam October 2, 2006 09:21

Re: use fortran in cfx
 
James

What platform are you running in? Can you compile a standard fortran file in that directory with the normal compiler command?

Adam

James October 2, 2006 19:38

Re: use fortran in cfx
 
Hi,Adam I can compile the fortran file sucessfully.It is compaq visual fortran 6.6,and be installed in E:\ I use CFX in windows,Ansys CFX10.0 launcher.installed in C:\. they are in different root, might it be the reason for the errors? Does CFX support fortran90? thank you for help,Adam

James October 2, 2006 21:56

Re: use fortran in cfx
 
Hi,Adam The following is when I type in path ,cfxmkext in cmd, and run a example in cfx. C:\Documents and Settings\Administrator>path PATH=e:\Program Files\Microsoft Visual Studio\Common\Tools;e:\Program Files\Micr osoft Visual Studio\Common\Msdev98\BIN;e:\Program Files\Microsoft Visual Studio\ DF98\BIN;e:\Program Files\Microsoft Visual Studio\VC98\BIN;C:\Program Files\Ansy s Inc\CFX\CFX-10.0\bin

C:\Documents and Settings\Administrator>cfx5mkext Use of uninitialized value in substitution (s///) at C:\Program Files\Ansys Inc\ CFX\CFX-10.0\bin\/perllib/CFX5/ShlibExt.pm line 1720. Use of uninitialized value in rindex at C:\Program Files\Ansys Inc\CFX\CFX-10.0\ bin\/perllib/CFX5/PathManip.pm line 355. Use of uninitialized value in length at C:\Program Files\Ansys Inc\CFX\CFX-10.0\ bin\/perllib/CFX5/PathManip.pm line 355. Use of uninitialized value in concatenation (.) or string at C:\Program Files\An sys Inc\CFX\CFX-10.0\bin\/perllib/CFX5/ShlibExt.pm line 1745. Use of uninitialized value in concatenation (.) or string at C:\Program Files\An sys Inc\CFX\CFX-10.0\bin\/perllib/CFX5/ShlibExt.pm line 1765. Use of uninitialized value in sprintf at C:\Program Files\Ansys Inc\CFX\CFX-10.0 \bin\/perllib/CFX5/ShlibExt.pm line 1770. df -threads -dll:.\winnt\\.dll C:\Program Files\Ansys Inc\CFX\CFX-10.0\lib\winnt \solver-pvm.lib Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update C) Copyright 2003 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 /debugtype:cv /pdb:none "C:\Program Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib" dformd.lib msvcrt.lib dfconsol.lib dfport.lib kernel32.lib /out:.\winnt\\.dll /dll LINK : warning LNK4001: no object files specified; libraries used LINK : warning LNK4068: /MACHINE not specified; defaulting to IX86

Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.

D:\cfx tutorials\pipevalvenew>cfx5mkext pipevalve_inlet.f df -MD -object:winnt\\pipevalve_inlet.o -c pipevalve_inlet.f Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update C) Copyright 2003 Compaq Computer Corp. All rights reserved.

pipevalve_inlet.f f90: Warning: Bad # preprocessor line df -threads -dll:.\winnt\\pipevalve_inlet.dll winnt\\pipevalve_inlet.o C:\Progra m Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update C) Copyright 2003 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 /debugtype:cv /pdb:none winnt\\pipevalve_inlet.o "C:\Program Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib" dformd.lib msvcrt.lib dfconsol.lib dfport.lib kernel32.lib /out:.\winnt\\pipevalve_inlet.dll /dll

D:\cfx tutorials\pipevalvenew>

Adam October 3, 2006 04:06

Re: use fortran in cfx
 
James, you've officially lost me!

Check in the manual for which fortran windows supports. It should support both F77 & F90. Also edit the cfx5mkext.ccl and you should see the following

OS: winnt

cc = cl

fc = df!

ld = link etc etc etc

Now, I'm not sure how this will work with windows, and it very much depends upon your compiler, but change the fc = df! to fc = pgf90 and see if that works. Thats what I did for my linux system, but not sure if it will work for windows.

If it doesn't work, then contact your cfx support desk.

Adam


All times are GMT -4. The time now is 10:40.