CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Fortran Compiler-CFX12.1 (https://www.cfd-online.com/Forums/cfx/85943-fortran-compiler-cfx12-1-a.html)

Araz March 10, 2011 04:08

Fortran Compiler-CFX12.1
 
Hi,

I have seen many posts about my problem but I'm still very confused, I hope you guide me in this regard:

I want to redesign the geometry of a compressor blade using CFX 12.1. I have my Fortran code which accounts for the movement of the blade wall.

According to cfx manual and tutorial19 (Air Conditioning Simulation), in order to use my code + cfx, I will need to compile my Fortran code using Intel Visual Fortran Compiler.

CFX manual says that: "The Intel Fortran 10.1 IA32 compiler is the recommended and supported compiler for ANSYS CFX 12.0".

My machine is Windows XP 32 bit.
and I have trial versions of Intel® Visual Fortran Composer XE 2011 and Microsoft Visual Studio 2010.
I want to know whether CFX 12.1 support these softwares or I should only install the fortran compiler v10.1?
I have also "Microsoft Visual Studio .NET 2003" and "compaq visual fortran 6.6" installed on my os.

I will be grateful if someone tell me what is the best option for me :confused:
Thanks a lot

gypas March 10, 2011 04:17

Hi,

In my experience, all compiler versions work, when home tonight will give you the particulars. What I found tricky when installing was setting the paths correct, you might need some manual tweaking, but otherwise you are good to go.
Best
Cat


Quote:

Originally Posted by Araz (Post 298795)
Hi,

I have seen many posts about my problem but I'm still very confused, I hope you guide me in this regard:

I want to redesign the geometry of a compressor blade using CFX 12.1. I have my Fortran code which accounts for the movement of the blade wall.

According to cfx manual and tutorial19 (Air Conditioning Simulation), in order to use my code + cfx, I will need to compile my Fortran code using Intel Visual Fortran Compiler.

CFX manual says that: "The Intel Fortran 10.1 IA32 compiler is the recommended and supported compiler for ANSYS CFX 12.0".

My machine is Windows XP 32 bit.
and I have trial versions of Intel® Visual Fortran Composer XE 2011 and Microsoft Visual Studio 2010.
I want to know whether CFX 12.1 support these softwares or I should only install the fortran compiler v10.1?
I have also "Microsoft Visual Studio .NET 2003" and "compaq visual fortran 6.6" installed on my os.

I will be grateful if someone tell me what is the best option for me :confused:
Thanks a lot


Araz March 10, 2011 23:08

Hi Dear Catherina,
Thank you for your post,



I tried the trial versions and it worked,


I ran "ifortvars.bat" in cfx launcher command line and added the followings to environment variables:
include: C:\Program Files\Intel\ComposerXE-2011\compiler\include;C:\Program Files\Intel\ComposerXE-2011\compiler\include\ia32

lib: C:\Program Files\Intel\ComposerXE-2011\compiler\lib;C:\Program Files\Intel\ComposerXE-2011\compiler\lib\ia32

PATH: c:\ANSYS Inc\v121\CFX\bin;C:\Program Files\Intel\ComposerXE-2011\bin;C:\Program Files\Intel\ComposerXE-2011\bin\ia32;C:\Program Files\Intel\ComposerXE-2011\redist;C:\Program Files\Intel\ComposerXE-2011\redist\ia32;C:\Program Files\Intel\ComposerXE-2011\redist\ia32\compiler;C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl;C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mpirt

Now, I have two questions:
1- I didn't add any PATH from vs2010 to environment variables since it had already included the old versoin of my vs. However, before installing this new version (vs 2010)I wasn't able to install fortran compiler completely because it couldn't find a supported Microsoft development environment on my pc. so, I don't know which of them is integrated to fortran compiler now?
2- Is "using fortran compiler" the only way to import our own subroutines in cfx? I mean, is it possible to use another programming language like C++ or something else, or even insert our code by hand into cfx in order to get rid of need for fortran compiler?

Thanks a lot

xiaovsfeg May 12, 2011 06:47

Dear Araz:

I install the same software as you, except I use the Windows7-32bit. As you say,"ran "ifortvars.bat" in cfx launcher command line".I run it ,but there will be some errors.Could you tell me the details,thanks a lot.My E-mail is xiaovsfeg@163.com

Araz May 12, 2011 17:07

Hi Xiaovsfeg,
In order to run the "ifortvars.bat", you should find its location under the composer installation directory, for my case it was located at:
c:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat
just copy and paste the path in the launcher command line and remember to surround the command with quotes ("), i.e.:
"c:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat"

visit the following link for more information and follow the instructions :

http://www.mail-archive.com/nmusers@.../msg02986.html

Regards,
Araz

xiaovsfeg May 12, 2011 23:42

1 Attachment(s)
Dear Araz:
1.Thanks for your reply.I run the "c:\ProgramFiles\Intel\ComposerXE-2011\bin\ifortvars.bat"in cfx launcher command line. It appears the follow situation,
I don’t know what that means? or you meet the some problems.
2.I added the include\ path \lib\to the environment variables by my computer- property- environment variables.
And run the :! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed" by Command Editor in CFX-Pre.But the system appears
ERROR
CCL parser failed with message:
Perl Syntax errors detected:
syntax error at (eval 14) line 2, near ""cfx5mkext failed"
$cclmain::p2"
The message “The compiler commamd ‘ifort’ could not be found.please ensure that the compiler is on your PATH and try again”
My question is what is the “ifort” and how to compile on the the ‘path’.
Thanks

Xiaofeng

Araz May 13, 2011 00:30

The attachment shows that "ifortvars.bat" has been run.
But it is not enough for compiling a Fortran routine,
Check if you have put the following in the environment variable ?
PATH:"c:\ANSYS Inc\v121\CFX\bin"
be careful of the correct location of the "bin" file in your pc.

xiaovsfeg May 13, 2011 05:52

1 Attachment(s)
Dear Araz:
Thanks for your help ,I added the path:PATH:"c:\Program files\ANSYS Inc\v121\CFX\bin"in the environment variable.But the message as the following picture.
so I think it's compiling a Fortran routine.It can be some error I don't find.I think you can give me some Suggestions.Thaks a lot .

shanbin June 1, 2011 10:01

Quote:

Originally Posted by xiaovsfeg (Post 307497)
Dear Araz:
Thanks for your help ,I added the path:PATH:"c:\Program files\ANSYS Inc\v121\CFX\bin"in the environment variable.But the message as the following picture.
so I think it's compiling a Fortran routine.It can be some error I don't find.I think you can give me some Suggestions.Thaks a lot .

Hello. It seems I meet the same problem. Have you solved that? Thanks.

xiaovsfeg June 1, 2011 21:13

Quote:

Originally Posted by shanbin (Post 310142)
Hello. It seems I meet the same problem. Have you solved that? Thanks.

I have solved it now.But I used the compaq visual fortran instead of the inter fortran . Steps as below:
1.Install compaq visual fortran 6.0 .
2.Change environment variables in the installation process.
3 Creat the new file in the CFX Root directory.Find and copy the .F and CFX5maket.dll files to he directory.Modify CFX5maket.dll files to correspond the compaq visual fortran.Note:In the CFX5maket.dll "# "Representative comments lines.
4 Run.
Best wishes.

shanbin June 2, 2011 08:11

Thank you very much. I decide to change the Fortran finally.


Quote:

Originally Posted by xiaovsfeg (Post 310211)
I have solved it now.But I used the compaq visual fortran instead of the inter fortran . Steps as below:
1.Install compaq visual fortran 6.0 .
2.Change environment variables in the installation process.
3 Creat the new file in the CFX Root directory.Find and copy the .F and CFX5maket.dll files to he directory.Modify CFX5maket.dll files to correspond the compaq visual fortran.Note:In the CFX5maket.dll "# "Representative comments lines.
4 Run.
Best wishes.


cfd_begin February 14, 2012 07:36

Dear xiovsfeg

can i use compaq visual fortran 6.5 for windows x64 using Ansys 12.1.

ezlidor_shb November 2, 2014 12:46

Hi, dear Araz
At first I wanted to thank u for your helpful post,
I've dove everything u said but after I run "ifort pt_mom_source.F" in the command line the following error appears,
ifort: error #10037: could not find 'link'.
what do u suggest I do?
thanks again.


Quote:

Originally Posted by Araz (Post 298938)
Hi Dear Catherina,
Thank you for your post,



I tried the trial versions and it worked,


I ran "ifortvars.bat" in cfx launcher command line and added the followings to environment variables:
include: C:\Program Files\Intel\ComposerXE-2011\compiler\include;C:\Program Files\Intel\ComposerXE-2011\compiler\include\ia32

lib: C:\Program Files\Intel\ComposerXE-2011\compiler\lib;C:\Program Files\Intel\ComposerXE-2011\compiler\lib\ia32

PATH: c:\ANSYS Inc\v121\CFX\bin;C:\Program Files\Intel\ComposerXE-2011\bin;C:\Program Files\Intel\ComposerXE-2011\bin\ia32;C:\Program Files\Intel\ComposerXE-2011\redist;C:\Program Files\Intel\ComposerXE-2011\redist\ia32;C:\Program Files\Intel\ComposerXE-2011\redist\ia32\compiler;C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl;C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mpirt

Now, I have two questions:
1- I didn't add any PATH from vs2010 to environment variables since it had already included the old versoin of my vs. However, before installing this new version (vs 2010)I wasn't able to install fortran compiler completely because it couldn't find a supported Microsoft development environment on my pc. so, I don't know which of them is integrated to fortran compiler now?
2- Is "using fortran compiler" the only way to import our own subroutines in cfx? I mean, is it possible to use another programming language like C++ or something else, or even insert our code by hand into cfx in order to get rid of need for fortran compiler?

Thanks a lot


doublestrong March 27, 2017 05:37

I got the same problem and solved it finally.

The error is ifort: error #10037: could not find 'link'. I saw this error after running 'cfx5mkext test.F' or 'ifort test.F'. When I run ifortvars.bat in C:\Program Files (x86)\Intel\ComposerXE-2011\bin to setup environmental variables of IVF, it shows that VS2010, which I have installed, has not been detected. I think the error means something goes wrong with the environmental variables of VS2010 (or other IDE you are using).

Since I have modified some files of IVF, I uninstalled it first. I run vcvars64.bat in command line to set the environmental variables of VS2010. The file is in E:\VisualStudio\VC\bin\amd64 for my computer. Then I re-install IVF and run 'ifortvars.bat intel64 VS2010' in command line after installation. No error is threw this time. Then I manage to compile my FORTRAN file.


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