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

error while compiling the USER Sub routine

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 24, 2002, 17:45
Default error while compiling the USER Sub routine
  #1
CFD user
Guest
 
Posts: n/a
Hi all,

I am not able to compile the user subroutine in the tutorial example of butterfly valve. I used the following command

c:\temp>cfx5mkext PipeValve_inlet.F

follwing error is obtained:

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.

My db files are created in c:\temp whereas my cfx5mkext.ccl file is stored in c:\CFX\CFX5.5.1\etc\5.5.1

CFX manual says that if the commands do not execute the FORTRAN compiler on your platform, then you will will have to manually edit a copy of the CFXROOT/etc/5.5.1/cfx5mkext.ccl file and place it in the working directory. The cfx5mkext command will look for a copy of cfx5mkext.ccl in the current working directory first.

QUESTIONS:

1) In this case, is temp my working directory?

2)What changes i have to make while manually editing the cfx5mkext.ccl file as mentioned by the manual?

I am using CFX 5.5.1 and FORTRAN 90.

Please let me know how to resolve this problem.

Thanks.
  Reply With Quote

Old   November 24, 2002, 19:32
Default Re: error while compiling the USER Sub routine
  #2
Mike
Guest
 
Posts: n/a
1) Yes, temp is your working directory 2) You don't need to edit the cfx5mkext.ccl file, you just need to make sure that executing the command 'df' at the command prompt finds the FORTRAN compiler executable. You have an environment variable called PATH, this lists the directories which are searched for the executable. The directory in which your FORTRAN compiler executable is located needs added to the list of directories in PATH. hope this helps Mike
  Reply With Quote

Old   November 25, 2002, 10:59
Default Re: error while compiling the USER Sub routine
  #3
CFD user
Guest
 
Posts: n/a
Hi Mike,

The Fortran compiler executable is in the path (i checked this with the command PATH). The Fortran Compiler on the machine is Essential Lahey Fortran 90 (ELF 90). The command to compile the Fortran File is elf90. I edited the cfx5mkext.ccl file by changing the parameter df! to elf90!. (see following comand which is part of cfx5mkext.ccl file.

OS: winnt

cc = cl

fc = df!

ld = link

ext build cflags = -MD

ext link ldflags =

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

But still it gave me the same error as for df. Then i removed the ! sign in fc=elf90!(see above commands; replace df by elf90) so that fc=elf90. Then when i executed the command c:\temp> cfx5mkext PipeValve_inlet.F ,it worked ,but it gave me 76 errors. The PipeValve_inlet.F file is there in examples (created by CFX people). I was not expecting any errors.

1)what might be the reasons for these errors?

2)Can you check if your cfx5mkext.ccl file also has ! sign for the line fc=df! (see above commands).Because in my ccl file this ! is only there for winnt OS and not for other OS.

errors i got:

Line 19, file PipeValve_inlet.F CC -------------------- | FATAL -- Syntax error.

Line 20, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 21, file PipeValve_inlet.F CC Stacks possibly. | FATAL -- Syntax error.

Line 22, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 23, file PipeValve_inlet.F CC -------------------- | FATAL -- Syntax error.

Line 24, file PipeValve_inlet.F CC Output | FATAL -- Syntax error.

Line 25, file PipeValve_inlet.F CC -------------------- | FATAL -- Syntax error.

Line 26, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 27, file PipeValve_inlet.F CC RET() - (NLOC,NRET) return values | FATAL -- Syntax error.

Line 28, file PipeValve_inlet.F CC CRESLT - 'GOOD' for success | FATAL -- Syntax error.

Line 29, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 30, file PipeValve_inlet.F CC -------------------- | FATAL -- Syntax error.

Line 31, file PipeValve_inlet.F CC Details | FATAL -- Syntax error.

Line 32, file PipeValve_inlet.F CC -------------------- | FATAL -- Syntax error.

Line 33, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 34, file PipeValve_inlet.F CC Sets the velocity profile at an inlet. | FATAL -- Syntax error.

Line 35, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 36, file PipeValve_inlet.F CC This routine evaluates the CEL function:-

| FATAL -- Syntax error.

Line 37, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 38, file PipeValve_inlet.F CC <Function Name>(Wmax,r,Rmax) | FATAL -- Syntax error.

Line 39, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 40, file PipeValve_inlet.F CC The profile is: velocity = Wmax*(1-(r/Rmax))**(1/7) | FATAL -- Invalid placement of blank character (see "Source Form" in the Essential Lahey Fortran 90 Reference).

Line 41, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 42, file PipeValve_inlet.F CC The Solver will fail if (1-(r-/Rmax)) is negative. | FATAL -- Syntax error.

Line 43, file PipeValve_inlet.F CC Slightly negative values can be obtained at the walls due to geometry | FATAL -- Syntax error.

Line 44, file PipeValve_inlet.F CC tolerance errors (i.e. r = 0.02000001 when Rmax = 0.02). | FATAL -- Syntax error.

Line 45, file PipeValve_inlet.F CC To prevent this, negative values of (1-(r-/Rmax)) are set equal to 0.0. | FATAL -- Syntax error.

Line 46, file PipeValve_inlet.F CC | FATAL -- Syntax error.

Line 47, file PipeValve_inlet.F CC================================================ ======================

| FATAL -- Syntax error.

Line 49, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 50, file PipeValve_inlet.F C Preprocessor includes | FATAL -- Syntax error.

Line 51, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 54, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 55, file PipeValve_inlet.F C Global Parameters | FATAL -- Syntax error.

Line 56, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 59, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 60, file PipeValve_inlet.F C Argument list | FATAL -- Syntax error.

Line 61, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 75, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 76, file PipeValve_inlet.F C External routines | FATAL -- Syntax error.

Line 77, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 80, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 81, file PipeValve_inlet.F C Local Parameters | FATAL -- Syntax error.

Line 82, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 85, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 86, file PipeValve_inlet.F C Local Variables | FATAL -- Syntax error.

Line 87, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 93, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 94, file PipeValve_inlet.F C Stack pointers | FATAL -- Syntax error.

Line 95, file PipeValve_inlet.F C ------------------------------ | FATAL -- Syntax error.

Line 97, file PipeValve_inlet.F C================================================= ======================

| FATAL -- Syntax error.

Line 99, file PipeValve_inlet.F C --------------------------- | FATAL -- Syntax error.

Line 100, file PipeValve_inlet.F C Executable Statements | FATAL -- Syntax error.

Line 101, file PipeValve_inlet.F C --------------------------- | FATAL -- Syntax error.

Line 104, file PipeValve_inlet.F C Initialise RET() to zero. | FATAL -- Syntax error.

Line 108, file PipeValve_inlet.F C---- Compute the velocity profile. Include check for VALUE < 0. | FATAL -- Syntax error.

Line 116, file PipeValve_inlet.F C Set success flag. | FATAL -- Syntax error.

Line 119, file PipeValve_inlet.F C================================================= ======================

| FATAL -- Syntax error.

Encountered 76 errors, 0 warnings in file PipeValve_inlet.F.

An error has occurred in cfx5mkext:

Making winnt\\PipeValve_inlet.o exited with return code 4

C:\temp>

  Reply With Quote

Old   November 25, 2002, 16:16
Default Re: error while compiling the USER Sub routine
  #4
Peter Attar
Guest
 
Posts: n/a
Are you sure CFX supports the elf90 compiler? I believe elf90 is not a full fortran 90 compiler but I may be wrong. It looks like the compiler doesn't like the fortran 77 style comment C. You may want to go in and change all the comment lines which begin with C to lines which begin with ! which is the fortran 90 style comment.
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
user routine, user funcion, or fortran compile effect on the memroy? princeps11 CFX 1 May 13, 2009 18:37
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
CFX 10 User Routine NOT in Fortran Andre CFX 14 August 8, 2006 23:03
user defined function cfduser CFX 0 April 29, 2006 10:58
user sub Routine sam CD-adapco 2 June 11, 2005 12:37


All times are GMT -4. The time now is 23:37.