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

Cannot compile user FORTRAN

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2022, 17:10
Default Cannot compile user FORTRAN
  #1
New Member
 
Rodrigo Villarreal
Join Date: Nov 2016
Posts: 25
Rep Power: 9
rodrigovime is on a distinguished road
Hello everybody! I'm trying to compile the first tutorial on user FORTRAN (parabolic profile in inlet) but the following message appears when I'm trying to compile the user function from cfx command line.

ifort: command line warning #10434: option '/real_size' use with underscore is deprecated; use '/real-size' instead
ifort: command line warning #10434: option '/integer_size' use with underscore is deprecated; use '/integer-size' instead
usr_velfunc.F(107): error #6717: This name has not been given an explicit type. [RET]
CALL SET_A_0( RET, NLOC*NRET )
--------------------^
usr_velfunc.F(107): error #6717: This name has not been given an explicit type. [NLOC]
CALL SET_A_0( RET, NLOC*NRET )
-------------------------^
usr_velfunc.F(107): error #6717: This name has not been given an explicit type. [NRET]
CALL SET_A_0( RET, NLOC*NRET )
------------------------------^
usr_velfunc.F(110): error #6717: This name has not been given an explicit type. [ARGS]
CALL SET_A_B( RET, ARGS, NLOC )
-------------------------^
usr_velfunc.F(113): error #6717: This name has not been given an explicit type. [CRESLT]
CRESLT = 'GOOD'
------^
compilation aborted for usr_velfunc.F (code 1)
An error has occurred in cfx5mkext:

C:\Program Files
(x86)\Intel\oneAPI\compiler\latest\windows\bin\int el64\ifort exited with
return code 1.

Does anyone know how to fix this?
I'm using Visual Studio 2022 and Intel oneAPI 2022
Thank you in advance.
rodrigovime is offline   Reply With Quote

Old   August 3, 2022, 19:50
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
It looks like those variables have not been defined. The example has them defined a few lines before the line flagged with an error. Are you sure you have included the whole example file in your case?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 6, 2022, 20:23
Default
  #3
New Member
 
Rodrigo Villarreal
Join Date: Nov 2016
Posts: 25
Rep Power: 9
rodrigovime is on a distinguished road
Thanks for your kind answer. I just found that I added one extra end statement in between two commentaries. After erasing it, everything worked fine!
rodrigovime is offline   Reply With Quote

Old   August 6, 2022, 20:48
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
If you use a code editor to write your fortran rather than a plain text editor errors like this become obvious. So make sure you are using a code editor which understands your version of fortran.
diegopena likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 7, 2022, 00:01
Default
  #5
New Member
 
Rodrigo Villarreal
Join Date: Nov 2016
Posts: 25
Rep Power: 9
rodrigovime is on a distinguished road
Thanks, it is good advice.
rodrigovime is offline   Reply With Quote

Reply

Tags
cfx, cfx + fortran, user cel function


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
adding velocity fluctuations on inlet by user fortran Sergeyevichsky CFX 2 May 18, 2017 22:42
User fortran to input/output file in a parallel run doublestrong CFX 5 March 31, 2017 08:15
problem about user fortran xyq916 CFX 0 January 27, 2015 07:38
user routine, user funcion, or fortran compile effect on the memroy? princeps11 CFX 1 May 13, 2009 18:37
User Fortran and Particle momentum source alvio CFX 0 July 30, 2008 22:52


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