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

Compiling User Fortran with CFX 14.0 on Win64

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

Like Tree6Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   December 20, 2013, 11:12
Default Compiling User Fortran with CFX 14.0 on Win64
  #1
Member
 
JESS
Join Date: Nov 2010
Posts: 31
Rep Power: 7
Raijin Thunderkeg is on a distinguished road
I installed Microsoft Visual Studio 2012 and Intel Visual Fortran Composer XE 2013 on my PC.
I try to compile the TStat_Control.F (No.19 in tutorial file).
I have added the enviroment variables as below:
include:
C:\Program Files (x86)\Intel\Composer XE 2013\compiler;
C:\Program Files (x86)\Intel\Composer XE 2013\compiler\include\intel64

lib:
C:\Program Files (x86)\Intel\Composer XE 2013\compiler\lib;
C:\Program Files (x86)\Intel\Composer XE 2013\compiler\lib\intel64

path:
C:\Program Files\ANSYS Inc\v140\CFX\bin;
C:\Program Files (x86)\Intel\Composer XE 2013\bin;
C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64;
C:\Program Files (x86)\Intel\Composer XE 2013\redist;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64compiler;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64\mkl;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64\mpirt;

Then I run the "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars" in command line, it appears:

Then I type the following command in the Command Editor dialog box
! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";
The error message is like this:
/*ERROR
CCL parser failed with message:
Perl Syntax errors detected:
cfx5mkext failed at (eval 103) line 1.*/


Can someone help me ? Thanks a lot.
Attached Images
File Type: png 1.png (83.4 KB, 35 views)
File Type: jpg 2.jpg (61.2 KB, 30 views)
aldlemy likes this.
Raijin Thunderkeg is offline   Reply With Quote

Old   December 20, 2013, 11:49
Default
  #2
Senior Member
 
Join Date: Feb 2011
Posts: 283
Rep Power: 9
Antanas is on a distinguished road
Quote:
Originally Posted by Raijin Thunderkeg View Post
I installed Microsoft Visual Studio 2012 and Intel Visual Fortran Composer XE 2013 on my PC.
I try to compile the TStat_Control.F (No.19 in tutorial file).
I have added the enviroment variables as below:
include:
C:\Program Files (x86)\Intel\Composer XE 2013\compiler;
C:\Program Files (x86)\Intel\Composer XE 2013\compiler\include\intel64

lib:
C:\Program Files (x86)\Intel\Composer XE 2013\compiler\lib;
C:\Program Files (x86)\Intel\Composer XE 2013\compiler\lib\intel64

path:
C:\Program Files\ANSYS Inc\v140\CFX\bin;
C:\Program Files (x86)\Intel\Composer XE 2013\bin;
C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64;
C:\Program Files (x86)\Intel\Composer XE 2013\redist;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64compiler;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64\mkl;
C:\Program Files (x86)\Intel\Composer XE 2013\redist\intel64\mpirt;

Then I run the "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars" in command line, it appears:

Then I type the following command in the Command Editor dialog box
! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";
The error message is like this:
/*ERROR
CCL parser failed with message:
Perl Syntax errors detected:
cfx5mkext failed at (eval 103) line 1.*/


Can someone help me ? Thanks a lot.
1. Open CFX Launcher
2. Open Command Line (Tools -> Command Line)
3. Inside Command Line execute: call "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars" Intel64
4. Inside Command Line change directory to that where your source file is located.
5. Execute cfx5mkext <your_source_file_name>.F
aldlemy likes this.
Antanas is offline   Reply With Quote

Old   December 20, 2013, 21:38
Default
  #3
Member
 
JESS
Join Date: Nov 2010
Posts: 31
Rep Power: 7
Raijin Thunderkeg is on a distinguished road
Quote:
Originally Posted by Antanas View Post
1. Open CFX Launcher
2. Open Command Line (Tools -> Command Line)
3. Inside Command Line execute: call "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars" Intel64
4. Inside Command Line change directory to that where your source file is located.
5. Execute cfx5mkext <your_source_file_name>.F
Thanks for your help.
I do it in steps as you told me. A warning message is shown in the pic underlined with red color. Is this OK?
Attached Images
File Type: jpg 3.jpg (73.7 KB, 45 views)
aldlemy likes this.

Last edited by Raijin Thunderkeg; December 21, 2013 at 08:59.
Raijin Thunderkeg is offline   Reply With Quote

Old   December 20, 2013, 22:57
Default
  #4
Member
 
JESS
Join Date: Nov 2010
Posts: 31
Rep Power: 7
Raijin Thunderkeg is on a distinguished road
Quote:
Originally Posted by Antanas View Post
1. Open CFX Launcher
2. Open Command Line (Tools -> Command Line)
3. Inside Command Line execute: call "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars" Intel64
4. Inside Command Line change directory to that where your source file is located.
5. Execute cfx5mkext <your_source_file_name>.F
Thanks very much. It really works that the .def can be run in CFX solvermanager. What's the matter with the warning message "unrecognized source type" and why the compile succeed in the command line but fail in the CFX command editor using "! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";" ? It really makes me confused. Could you explain more about this? I am sincerely grateful for your help.
aldlemy likes this.

Last edited by Raijin Thunderkeg; December 21, 2013 at 09:09.
Raijin Thunderkeg is offline   Reply With Quote

Old   December 23, 2013, 16:03
Default
  #5
Senior Member
 
ali
Join Date: Oct 2009
Posts: 182
Rep Power: 8
alinik is on a distinguished road
Hey guys,

When I want to compile my fortran code in command editor I also receive this message. Seems that you have resolved it before.
I am running CFX on a linux machine.

p, li { white-space: pre-wrap; } ERROR
CCL parser failed with message:
Perl Syntax errors detected:
cfx5mkext failed at (eval 106) line 1.


Any ideas?
aldlemy likes this.
alinik is offline   Reply With Quote

Old   May 14, 2015, 07:36
Smile Fortran Compiler error
  #6
Senior Member
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 128
Rep Power: 5
sunilpatil is on a distinguished road
Hi,
I am trying to simulate Air conditioning simulation tutorial 19.I have installed visual studio 2015 and intel FORTRAN compiler. when i run "C:\Program Files (x86)\Intel\Composer XE 2015\bin\ifortvars.bat" from CFX command editor i get following error

ERROR CCL parser failed with message:
invalid object type ""C": leading character must be alphabetic or '_'


and when i run cfx5mkext TStat_Control from the windows command prompt it again gives some error and i am unable to generate .dll file for my simulation. I have attached error message, please help me to solve this problem




aldlemy likes this.
sunilpatil is offline   Reply With Quote

Old   December 15, 2015, 04:43
Default
  #7
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by Antanas View Post
1. Open CFX Launcher
2. Open Command Line (Tools -> Command Line)
3. Inside Command Line execute: call "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars" Intel64
4. Inside Command Line change directory to that where your source file is located.
5. Execute cfx5mkext <your_source_file_name>.F
Hello,

Working through tutorial 19, I have the same problem. Asking Google and searching through the forum, I've tried a lot of things but still can't compile the example-sorce code TStat_Control.F. I'm working on a win7 64bit machine with ANSYS 15. The Visual Fortran Compiler XE 12.0 is installed.

Processing the command

! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";

in Command Editor gives me the error:

ERROR
CCL parser failed with message:
Perl Syntax errors detected:
cfx5mkext failed at (eval 548) line 1.


Processing the command


call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ifortvars" Intel64

in Command Editor gives me the error:

ERROR
CCL parser failed with message:
invalid object type "call "C": contains invalid character '"'

Do I have to add any "enviroment variables" like Raijin Thunderkeg did? If yes, where?

Do I have to make any changes in cfx5mkext.ccl?

Please, can anyone help me? I'm dealing with this problem for days now.


Best Regards,
Emil
CFXNewbie is offline   Reply With Quote

Old   December 15, 2015, 06:09
Default
  #8
Senior Member
 
Join Date: Feb 2011
Posts: 283
Rep Power: 9
Antanas is on a distinguished road
Quote:
Originally Posted by CFXNewbie View Post
Hello,

Working through tutorial 19, I have the same problem. Asking Google and searching through the forum, I've tried a lot of things but still can't compile the example-sorce code TStat_Control.F. I'm working on a win7 64bit machine with ANSYS 15. The Visual Fortran Compiler XE 12.0 is installed.

Processing the command

! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";

in Command Editor gives me the error:

ERROR
CCL parser failed with message:
Perl Syntax errors detected:
cfx5mkext failed at (eval 548) line 1.


Processing the command


call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ifortvars" Intel64

in Command Editor gives me the error:

ERROR
CCL parser failed with message:
invalid object type "call "C": contains invalid character '"'

Do I have to add any "enviroment variables" like Raijin Thunderkeg did? If yes, where?

Do I have to make any changes in cfx5mkext.ccl?

Please, can anyone help me? I'm dealing with this problem for days now.


Best Regards,
Emil
Of course it won't work because I wrote about Command Line but not Command Editor. Start CFX Launcher (Win Start menu -> All programs -> Ansys -> Fluid Dynamics -> CFX) and then go to Tools -> Command Line, it will bring up console window.
Antanas is offline   Reply With Quote

Old   December 15, 2015, 06:18
Default
  #9
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by Antanas View Post
Of course it won't work because I wrote about Command Line but not Command Editor. Start CFX Launcher (Win Start menu -> All programs -> Ansys -> Fluid Dynamics -> CFX) and then go to Tools -> Command Line, it will bring up console window.
Thank you very much for your answer.

Executing the ifortvars.bat in this window works. But I'm getting still the same error.

I think the Environment variables are missing. Where and how do I have to set them?

Edit: I've tried to add the Environment variables, therefore I typed into the command line (is this correct???):

set include=C:\Program Files (x86)\Intel\ComposerXE-2011\compiler;C:\Program Files (x86)\Intel\ComposerXE-2011\compiler\include\intel64

set lib=C:\Program Files (x86)\Intel\ComposerXE-2011\compiler\lib;C:\Pr......

set path=C:\Prog..............

now the error after trying to compile is :

ERROR
CCL parser failed with message:
Perl Syntax errors detected:
cfx5mkext failed at (eval 14) line 5.


Thanks for your help!
CFXNewbie is offline   Reply With Quote

Old   December 15, 2015, 09:20
Default
  #10
Senior Member
 
Join Date: Feb 2011
Posts: 283
Rep Power: 9
Antanas is on a distinguished road
Quote:
Originally Posted by CFXNewbie View Post
Thank you very much for your answer.

Executing the ifortvars.bat in this window works. But I'm getting still the same error.
What exactly you did to get this error? I suggest you to do exactly the same steps that I wrote.
Antanas is offline   Reply With Quote

Old   December 15, 2015, 09:40
Default
  #11
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by Antanas View Post
What exactly you did to get this error? I suggest you to do exactly the same steps that I wrote.
Thank you very much for your help again!

I started CFX-Pre and used command Editor for compiling, as described in the tutorial.

Now I've checked your recommended procedure: executing the ifortvars.bat and cfx5mkext TStat_Control.F, both in command line.

In the attached Picture you can check the procedure an see the error.



EDIT 2:

I think I finally got it now!!!!! it works without error, I added Intel64 after the ifortvars.bat command and tried to compile again. In the working Directory the Folder winnt-amd64 was created. The ...dll file is the Thing I Need, correct? Do I Need the other filles ( .manifest .exp .lib .o ) as well?

thanks a lot!!!
Attached Images
File Type: png error.PNG (61.5 KB, 74 views)
File Type: png error2.PNG (66.8 KB, 7 views)

Last edited by CFXNewbie; December 15, 2015 at 10:45.
CFXNewbie is offline   Reply With Quote

Old   December 15, 2015, 11:31
Default
  #12
Senior Member
 
Join Date: Feb 2011
Posts: 283
Rep Power: 9
Antanas is on a distinguished road
Quote:
Originally Posted by CFXNewbie View Post
Do I Need the other filles ( .manifest .exp .lib .o ) as well?
No you need not
Antanas is offline   Reply With Quote

Old   December 17, 2015, 07:57
Default
  #13
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by Antanas View Post
No you need not
Thank you again for your answer.

After compiling some example-routines, unfortunately I have an other problem now. First of all, I want so start with a Routine which just gives one argument-value back. Therefore I copied the ucf_template.F. I didn't change anything but the calling name, filename and some comments. The code Looks like this:

#include "cfx5ext.h"
dllexport(sourcetest)
SUBROUTINE SOURCETEST (
& NLOC, NRET, NARG, RET, ARGS, CRESLT, CZ,DZ,IZ,LZ,RZ )
C
INTEGER NLOC,NARG,NRET
C
CHARACTER CRESLT*(*)
C
REAL ARGS(NLOC,NARG), RET(NLOC,NRET)
C
INTEGER IZ(*)
CHARACTER CZ(*)*(1)
DOUBLE PRECISION DZ(*)
LOGICAL LZ(*)
REAL RZ(*)
C
C Send any diagnostic messages via master process.
CALL MESAGE( 'WRITE','Hello World!' )
C
C Initialise RET(1:NLOC*NRET) to zero.
CALL SET_A_0( RET, NLOC*NRET )
C
C Copy first argument ARGS(1:NLOC,1) to RET(1:NLOC,1).
CALL SET_A_B( RET, ARGS, NLOC )
C
C Set success flag.
CRESLT = 'GOOD'
C
C================================================= ======================
END


If I insert the subroutine like this:


gives me the following error (code 2) after starting the solver in workbench, although I didn't use the Routine anywhere in my modell so far.



If I delete the Routine, the modell works as it did before.

Any Ideas?

EDIT:

error in out file is:


+================================================= ===================+
| ****** PROBLEM REPORT ****** |
|--------------------------------------------------------------------|
| Subsystem: Input and Output |
| Subroutine name: ErrAction |
| Severity level: Fatal Error |
| Error message number: 001100279 |
|--------------------------------------------------------------------|
| Message: |
| |
| Unable to find library winnt-amd64/double/testreibw.dll on path "- |
| D:\Benutzer\feld24\grob151125_pending_tasks\dp0_CF X_Solution-1\wi- |
| nnt-amd64" |
| |
| |
| |
+================================================= ===================+

+================================================= ===================+
| ****** PROBLEM REPORT ****** |
|--------------------------------------------------------------------|
| Subsystem: Input and Output |
| Subroutine name: ErrAction |
| Severity level: Fatal Error |
| Error message number: 001100279 |
|--------------------------------------------------------------------|
| Message: |
| |
| USER ROUTINE: sourcetry could not be loaded. Please check the Lib- |
| rary Path, Library Name and Calling Name. For FORTRAN user routin- |
| es, the Calling Name should be in lower case. |
| |
| |
| |
+================================================= ===================+

+================================================= ===================+
| ****** PROBLEM REPORT ****** |
|--------------------------------------------------------------------|
| Subsystem: Input and Output |
| Subroutine name: ErrAction |
| Severity level: Fatal Error |
| Error message number: 001100279 |
|--------------------------------------------------------------------|
| Message: |
| |
| Stopped in routine UR_REGISTER |
| |
| |
| |
| |
| |
+================================================= ===================+

how can I compile with command line for double precision?


Thanks a lot!
Attached Images
File Type: png UserRoutine.PNG (8.2 KB, 66 views)
File Type: png error.PNG (12.3 KB, 64 views)

Last edited by CFXNewbie; December 17, 2015 at 10:09.
CFXNewbie is offline   Reply With Quote

Old   December 17, 2015, 10:08
Default
  #14
Senior Member
 
Join Date: Feb 2011
Posts: 283
Rep Power: 9
Antanas is on a distinguished road
Quote:
Originally Posted by CFXNewbie View Post
Any Ideas?
Check your library path. I don't think it may include spaces.
Antanas is offline   Reply With Quote

Old   February 11, 2016, 08:03
Default
  #15
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by Antanas View Post
Check your library path. I don't think it may include spaces.
Thanks a lot for your help again! I've managed to run my subroutine now successfuly.

But I've got an other Problem now. In each iteration loop (im doing a steady state simulation) the solver is calling the subroutine many many times. As my routine is only calculating on single scalar value as a function of a temperature wich is a result of the cfx-calculation, it would be enough to call the subroutine once per iteration loop (as the calculated value is always the same).

In terms of saving computing time, is there a posibility to call the subroutine only once per iteration loop? The same modell (same mesh) using Expressions (in CFX-Pre) ist about 25% faster than using the subroutine. As my task is to replace the confusing expressions by a subroutine, I cannot go back and use expressions.

I've tried to use a junction box routine with location "Start of Coefficient Loop: Called at the start of each iteration loop. For a transient run, this relates to the
inner loop.", but this isn't changing anything.

Any ideas?

Thanks a lot!!

A part out of the *.out file looks like this:

================================================== ====================
OUTER LOOP ITERATION = 1 CPU SECONDS = 4.289E+02
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+
| Wallscale-Luft | 0.00 | 6.1E-03 | 2.8E-02 | 10.4 4.6E-02 OK|
+----------------------+------+---------+---------+------------------+
| Wallscale-Bulk-Oelra | 0.00 | 6.2E-03 | 1.7E-02 | 14.7 4.0E-02 OK|
+----------------------+------+---------+---------+------------------+
| U-Mom-Luft | 0.00 | 1.1E-06 | 5.9E-05 | 1.2E+01 F |
| V-Mom-Luft | 0.00 | 2.0E-02 | 2.1E-01 | 4.6E-03 OK|
| W-Mom-Luft | 0.00 | 2.0E-02 | 2.1E-01 | 4.0E-03 OK|
| P-Mass-Luft | 0.00 | 3.4E-11 | 4.1E-10 | 41.5 4.6E+01 F |
+----------------------+------+---------+---------+------------------+
| U-Mom-Bulk-Oelraum | 0.00 | 1.2E-06 | 1.1E-05 | 1.6E+01 ok|
| V-Mom-Bulk-Oelraum | 0.00 | 1.6E-02 | 1.8E-01 | 1.1E-02 ok|
| W-Mom-Bulk-Oelraum | 0.00 | 1.6E-02 | 1.8E-01 | 9.4E-03 OK|
| Mass-OelInOelraum-Oe | 0.00 | 8.8E-05 | 7.0E-04 | 5.1E-03 OK|
| Mass-LuftInOelraum-O | 0.00 | 3.6E-04 | 4.5E-03 | 23.6 5.5E-03 OK|
+----------------------+------+---------+---------+------------------+
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
Call Subroutine "ReibwaermeModell"
| H-Energy-Luft | 0.00 | 3.2E-02 | 5.6E-01 | 8.5E-02 OK|
| T-Energy | 0.00 | 1.7E-02 | 4.8E-01 | 8.5E-02 OK|
| H-Energy-OelInOelrau | 0.00 | 4.5E-08 | 2.1E-06 | 8.5E-02 OK|
| H-Energy-LuftInOelra | 0.00 | 6.0E-08 | 1.2E-06 | 15.5 1.3E+03 ok|
+----------------------+------+---------+---------+------------------+
| K-TurbKE-Luft | 0.00 | 3.5E-02 | 1.2E-01 | 5.7 2.1E-03 OK|
| O-TurbFreq-Luft | 0.00 | 7.3E-02 | 1.0E+00 | 10.2 6.3E-03 OK|
+----------------------+------+---------+---------+------------------+
| K-TurbKE-Bulk-Oelrau | 0.00 | 3.2E-02 | 1.2E-01 | 10.0 1.2E-02 OK|
| O-TurbFreq-Bulk-Oelr | 0.00 | 7.1E-02 | 1.0E+00 | 8.4 2.9E-02 OK|
+----------------------+------+---------+---------+------------------+
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 2 Call Subroutine "ReibwaermeModell"
Slave: 3 Call Subroutine "ReibwaermeModell"
Slave: 3 Call Subroutine "ReibwaermeModell"
Slave: 3 Call Subroutine "ReibwaermeModell"
Slave: 3 Call Subroutine "ReibwaermeModell"
Slave: 4 Call Subroutine "ReibwaermeModell"
Slave: 4 Call Subroutine "ReibwaermeModell"
Slave: 4 Call Subroutine "ReibwaermeModell"
Slave: 4 Call Subroutine "ReibwaermeModell"
Slave: 4 Call Subroutine "ReibwaermeModell"
Slave: 4 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 5 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"
Slave: 6 Call Subroutine "ReibwaermeModell"

================================================== ====================
OUTER LOOP ITERATION = 2 CPU SECONDS = 1.826E+03
CFXNewbie is offline   Reply With Quote

Old   February 11, 2016, 08:52
Default
  #16
New Member
 
Peter
Join Date: Sep 2011
Location: Germany
Posts: 28
Rep Power: 6
PeMo is on a distinguished road
Every Partition of your Simulation is calling the subroutine. To prevent this you can get the parallel information and only let the master node call your subroutine; i.e.:
CALL GET_PARALLEL_INFO('PARMOD',PARTIT,CNAME,CRESLT)
IF(PARTIT==1) THEN
PeMo is offline   Reply With Quote

Old   February 11, 2016, 08:59
Default
  #17
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by PeMo View Post
Every Partition of your Simulation is calling the subroutine. To prevent this you can get the parallel information and only let the master node call your subroutine; i.e.:
CALL GET_PARALLEL_INFO('PARMOD',PARTIT,CNAME,CRESLT)
IF(PARTIT==1) THEN

Thanks a lot for your answer!

where in my code do I have to apply this?

My fist test doing it before executional statements gives the following error in the *.out file:



================================================== ====================
OUTER LOOP ITERATION = 1 CPU SECONDS = 3.604E+02
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+
| Wallscale-Luft | 0.00 | 6.1E-03 | 2.8E-02 | 10.4 4.6E-02 OK|
+----------------------+------+---------+---------+------------------+
| Wallscale-Bulk-Oelra | 0.00 | 6.2E-03 | 1.7E-02 | 14.7 4.0E-02 OK|
+----------------------+------+---------+---------+------------------+
| U-Mom-Luft | 0.00 | 1.1E-06 | 5.9E-05 | 1.2E+01 F |
| V-Mom-Luft | 0.00 | 2.0E-02 | 2.1E-01 | 4.6E-03 OK|
| W-Mom-Luft | 0.00 | 2.0E-02 | 2.1E-01 | 4.0E-03 OK|
| P-Mass-Luft | 0.00 | 3.4E-11 | 4.1E-10 | 41.5 4.6E+01 F |
+----------------------+------+---------+---------+------------------+
| U-Mom-Bulk-Oelraum | 0.00 | 1.2E-06 | 1.1E-05 | 1.6E+01 ok|
| V-Mom-Bulk-Oelraum | 0.00 | 1.6E-02 | 1.8E-01 | 1.1E-02 ok|
| W-Mom-Bulk-Oelraum | 0.00 | 1.6E-02 | 1.8E-01 | 9.4E-03 OK|
| Mass-OelInOelraum-Oe | 0.00 | 8.8E-05 | 7.0E-04 | 5.1E-03 OK|
| Mass-LuftInOelraum-O | 0.00 | 3.6E-04 | 4.5E-03 | 23.6 5.5E-03 OK|
+----------------------+------+---------+---------+------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Signal caught: Segmentation violation |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Stopped in routine FPX: SIG_HANDLER |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| An error has occurred in cfx5solve: |
| |
| The ANSYS CFX solver exited with return code 1. No results file |
| has been created. |
+--------------------------------------------------------------------+

End of solution stage.

+--------------------------------------------------------------------+
| The following user files have been saved in the directory |
| D:/Benutzer/feld24/20160202/sehrgrob20160121_pending_tasks/dp0_CF- |
| X_Solution/Fluid Flow CFX_030: |
| |
| mon |
+--------------------------------------------------------------------+


This run of the ANSYS CFX Solver has finished.
CFXNewbie is offline   Reply With Quote

Old   February 11, 2016, 12:42
Default
  #18
Senior Member
 
Join Date: Jun 2009
Posts: 507
Rep Power: 12
Opaque is on a distinguished road
Do you understand the fundamentals of how ANSYS CFX discretize the equations? If you read the documentation, you will notice that user subroutines are called on demand on group of elements or faces the software creates.

You can tell what group is the subroutine is called for. See USER_CALC_INFO documentation, and add the information returned to your print statements.

The above applies to parallel and serial simulations. For parallel simulations, the software should only call the user subroutines on the partitions where the information is required. Bypassing the required values for such call will only corrupt the simulation because those partitions will have incomplete information.

Hope the above helps,
Opaque is offline   Reply With Quote

Old   February 12, 2016, 09:22
Default
  #19
New Member
 
Emil GŁnther
Join Date: Nov 2015
Posts: 18
Rep Power: 2
CFXNewbie is on a distinguished road
Quote:
Originally Posted by Opaque View Post
Do you understand the fundamentals of how ANSYS CFX discretize the equations? If you read the documentation, you will notice that user subroutines are called on demand on group of elements or faces the software creates.

You can tell what group is the subroutine is called for. See USER_CALC_INFO documentation, and add the information returned to your print statements.

The above applies to parallel and serial simulations. For parallel simulations, the software should only call the user subroutines on the partitions where the information is required. Bypassing the required values for such call will only corrupt the simulation because those partitions will have incomplete information.

Hope the above helps,
Thanks for your answer!

I understand, that the solution given by PeMo would prevent the solver from calling the subroutine in most cases, which would probably cause abortion of the run, as the result-value from the subroutine is required.

But is there no way to store the result after the first run of the subroutine and use the stored value again always when needed inside current Iteration Loop?
CFXNewbie is offline   Reply With Quote

Old   February 12, 2016, 11:21
Default
  #20
New Member
 
Peter
Join Date: Sep 2011
Location: Germany
Posts: 28
Rep Power: 6
PeMo is on a distinguished road
Jepp, sorry didn't think through and just adapted it from my project. I have two subroutines, the first is evaluating the requested scalar and store it in the Memory Managment System (MMS), and the second (called at the master node) is calling a 1D routine and return a value.

So it depends on your routine but to my understanding it should be possible to let CFX calculate the scalar (via cel), call the subroutine once per iteration and store the return value in the MMS.
PeMo is offline   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
Importing external DLL to Ansys CFX using user Fortran snpradeep CFX 2 May 16, 2014 03:52
How to set environmental variables of Intel Fortran +CFX? Christine MO CFX 0 September 23, 2011 11:11
CFX User Fortran: Multiple Outputs pingub CFX 1 October 26, 2010 14:49
error msg when compiling user fortran Ollimarc CFX 0 March 13, 2008 19:16
how to use USER FORTRAN with CFX cfd_99 Main CFD Forum 1 June 4, 1999 05:42


All times are GMT -4. The time now is 05:06.