CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Compiling User Fortran with CFX 14.0 on Win64 (http://www.cfd-online.com/Forums/cfx/127785-compiling-user-fortran-cfx-14-0-win64.html)

Raijin Thunderkeg December 20, 2013 11:12

Compiling User Fortran with CFX 14.0 on Win64
 
2 Attachment(s)
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.

Antanas December 20, 2013 11:49

Quote:

Originally Posted by Raijin Thunderkeg (Post 467210)
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

Raijin Thunderkeg December 20, 2013 21:38

1 Attachment(s)
Quote:

Originally Posted by Antanas (Post 467217)
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?

Raijin Thunderkeg December 20, 2013 22:57

Quote:

Originally Posted by Antanas (Post 467217)
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.

alinik December 23, 2013 16:03

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?

sunilpatil May 14, 2015 07:36

Fortran Compiler error
 
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


http://s26.postimg.org/o1wwrnos5/error_1.jpg

http://s26.postimg.org/ra1e4pb1x/error_2.jpg

CFXNewbie December 15, 2015 04:43

Quote:

Originally Posted by Antanas (Post 467217)
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

Antanas December 15, 2015 06:09

Quote:

Originally Posted by CFXNewbie (Post 577610)
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.

CFXNewbie December 15, 2015 06:18

Quote:

Originally Posted by Antanas (Post 577623)
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!

Antanas December 15, 2015 09:20

Quote:

Originally Posted by CFXNewbie (Post 577626)
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.

CFXNewbie December 15, 2015 09:40

2 Attachment(s)
Quote:

Originally Posted by Antanas (Post 577652)
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.

http://www.cfd-online.com/Forums/att...1&d=1450186790

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!!!

Antanas December 15, 2015 11:31

Quote:

Originally Posted by CFXNewbie (Post 577655)
Do I Need the other filles ( .manifest .exp .lib .o ) as well?

No you need not

CFXNewbie December 17, 2015 07:57

2 Attachment(s)
Quote:

Originally Posted by Antanas (Post 577671)
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:
http://www.cfd-online.com/Forums/att...1&d=1450353143

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.

http://www.cfd-online.com/Forums/att...1&d=1450353362

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!

Antanas December 17, 2015 10:08

Quote:

Originally Posted by CFXNewbie (Post 577896)
Any Ideas?

Check your library path. I don't think it may include spaces.

CFXNewbie February 11, 2016 08:03

Quote:

Originally Posted by Antanas (Post 577922)
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

PeMo February 11, 2016 08:52

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

CFXNewbie February 11, 2016 08:59

Quote:

Originally Posted by PeMo (Post 584681)
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.

Opaque February 11, 2016 12:42

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,

CFXNewbie February 12, 2016 09:22

Quote:

Originally Posted by Opaque (Post 584714)
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?

PeMo February 12, 2016 11:21

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.


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