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

Problem with fortran file execution

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2015, 18:56
Default Problem with fortran file execution
  #1
Member
 
Farzin
Join Date: Jul 2014
Posts: 42
Rep Power: 11
FarzinD is on a distinguished road
I'm attending to do CFX tutorial on User Fortran; After setting the compiler path in CFX Command line and trying to execute the fortran source file (located on working directory), It returns these errors:

Code:
D:\Program Files (x86)\Intel\Composer XE 2015\bin\intel64\ifort -Qvec- -iface:cv
f -MD -object:winnt-amd64\\t_step_control.o -c t_step_control.f
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Inte
l(R) 64, Version 15.0.1.148 Build 20141023
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

t_step_control.f(1): warning #5117: Bad # preprocessor line
#include "cfx5ext.h"
-^
t_step_control.f(48): warning #5117: Bad # preprocessor line
#include "MMS.h"
-^
t_step_control.f(49): warning #5117: Bad # preprocessor line
#include "stack_point.h"
-^
t_step_control.f(50): warning #5117: Bad # preprocessor line
#include "cfd_constants.h"
-^
t_step_control.f(99): error #5082: Syntax error, found END-OF-STATEMENT when exp
ecting one of: ( % [ : . = =>
      __stack_point__ pOINT
---------------------------^
t_step_control.f(99): error #6218: This statement is positioned incorrectly and/
or has syntax errors.
      __stack_point__ pOINT
---------------------------^
compilation aborted for t_step_control.f (code 1)
An error has occurred in cfx5mkext:

D:\Program Files (x86)\Intel\Composer XE 2015\bin\intel64\ifort exited with
return code 1.
I'm using Microsoft Visual Studio 2010 with Intel Parallel Studio XE 2015, which ANSYS recommends for Version 16, though I'm using ANSYS 14.5. Is this why it does not work?
I've tested VS by compiling a simple fortran code.

Thanks for any suggestion,
Farzin

Last edited by FarzinD; May 3, 2015 at 04:39.
FarzinD is offline   Reply With Quote

Old   May 3, 2015, 10:42
Default
  #2
Member
 
Farzin
Join Date: Jul 2014
Posts: 42
Rep Power: 11
FarzinD is on a distinguished road
Maybe this is not the place, but is it true that FLUENT's UDF is more recognized than CFX's User Fortran?
Now I'm thinking maybe its better to use Fluent for customized particle tracking and erosion prediction.
FarzinD is offline   Reply With Quote

Old   May 3, 2015, 21:51
Default
  #3
New Member
 
Germán Salazar
Join Date: Apr 2015
Posts: 16
Rep Power: 11
gsal is on a distinguished road
As mentioned in my other thread, I am not a CFD kind of guy, just a computer support and, right now, I am supporting precisely a User Fortran routine.

I am working on Linux, though, and I am not compiling the code with my own standalone compiler, instead, I hand the Fortran routine over to CFX for it to compile it...and, so, I am thinking it itself knows where to find include files like "cfx5ext.h" and the like.

This is what my compilation command looks like
cfx -mode local latest cfx5mkext myroutine.F

I don't know how things are supposed to be done on the Windows side, but if you are supposed to compile on your own using ifort, I am thinking, you need to find out where the CFX include files are located and pass that path to the compiler via some -I flag or something.

So, maybe, you should also browse CFX installation directory and see if it comes with its own instance of a compilation tool-chain, like gcc and/or mingw or something.

Just a thought.

gsal
gsal is offline   Reply With Quote

Old   May 7, 2015, 04:57
Post
  #4
Member
 
Farzin
Join Date: Jul 2014
Posts: 42
Rep Power: 11
FarzinD is on a distinguished road
Quote:
Originally Posted by FarzinD View Post
I'm using Microsoft Visual Studio 2010 with Intel Parallel Studio XE 2015, which ANSYS recommends for Version 16, though I'm using ANSYS 14.5.
Recently I installed ANSYS 16;
After repeating steps (Here) I did before in ANSYS 14.5, the compilation accomplished without errors and .dll, .lib ,... files have been made.
FarzinD is offline   Reply With Quote

Old   March 27, 2017, 11:05
Default
  #5
New Member
 
Tony
Join Date: Mar 2016
Posts: 24
Rep Power: 10
doublestrong is on a distinguished road
I solve this problem after modifying .for or .f to .F
This is what I find in the help document. Please see 'Creating the Shared Libraries'
Important: Use a capital F as the file extension for Fortran source to be run through the preprocessor.
doublestrong is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46


All times are GMT -4. The time now is 08:25.