- 积分
- 9
- 注册时间
- 2019-3-23
- 积分
- 9
![Rank: 4](static/image/common/star_level3.gif)
|
最近要借鉴一个Aspen的煤气化的示例模型,~\AspenTech\Aspen Plus V11.0\GUI\Examples\Power\Coal\
GasificationAspen_Plus_Model_for_Moving_Bed_Coal_Gasifier
但是卡在用户动力学子模型里面,文件是~\AspenTech\Aspen Plus V11.0\Engine\User\USRKIN.f
然后就在Aspen自带的Help教程里找了一个Getting Started with Aspen Plus\Tutorials\Customizing Unit Operation Models的教程跟着练,
到了Revising the User Subroutine这一步的时候,卡在了编译.f的Fortran子程序上,在使用Customize Aspen Plus V11这个程序编译的时候
命令行窗口报出下列的错误:
ASPCOMP: Warning! Intel Fortran compiler ifort.exe not found in %PATH%
ASPCOMP: Warning! Microsoft C runtime library msvcrt.lib not found in %LIB%
ASPCOMP: Warning! Microsoft C runtime library is needed for Dynamic Linking.
ASPCOMP: Warning! Intel Fortran runtime library libifcoremd.lib not found in %LIB%
ASPCOMP: Warning! Intel Fortran runtime library is needed for Dynamic Linking.
之后折腾了一天找问题,也没有解决。
最后在Aspen自带的Help里搜了一下aspcomp(aspen compile)这个编译命令,找到了一个自带的Troubleshooting Compiling Fortran指南,
里面有一句这样的话:
Ensure your compilers are set correctly in the Set Compiler for V11 tool.
确保你在Set Compiler for V11工具程序中正确设置了编译器。
然后在开始菜单的Aspen Plus下找到了一个程序Set Compiler for V11,里面有这些选项:
1 IVF14_VS12 ERROR Intel Fortran 2013SP1 and Microsoft Visual Studio 12/2013
2 IVF15_VS12 ERROR Intel Fortran 15/2015 and Microsoft Visual Studio 12/2013
3 IVF16_VS12 ERROR Intel Fortran 16/2016 and Microsoft Visual Studio 12/2013
4 IVF16_VS14 ERROR Intel Fortran 16/2016 and VS 2015 WITH C++ (and express)
5 IVF17_VS14 ERROR Intel Fortran 17/2017 and VS 2015 WITH C++ (and express)
6 IVF17_VS15 ERROR Intel Fortran 17/2017 and VS 2017 WITH C++ (and community)
7 IVF18_VS14 ERROR Intel Fortran 18/2018 and VS 2015 WITH C++ (and express)
8 IVF18_VS15 ERROR Intel Fortran 18/2018 and VS 2017 WITH C++ (and community)
9 IVF19_VSB ERROR Intel Fortran 19/2019 and Bundled VS 2015 shell and Win10 SDK
10 IVF19_VS14 ERROR Intel Fortran 19/2019 and VS 2015 WITH C++ (and express)
11 IVF19_VS15 OK Intel Fortran 19/2019 and VS 2017 WITH C++ (and community)
这时候找到了问题的解决办法,你需要安装上面的某个软件组合,比如我一开始安装的IVF2020(Intel Visual Fortran 2020)和VS2019(Microsoft Visual Studio Community 2019)这个组合就不在其中。
只好卸掉重来,用默认配置装了一套IVF2019和VS2017,当然,这些操作都是在虚拟机中搞的,不然我的电脑早就因为瞎装软件GG了。
先装VS后装IVF,不然IVF会报错说无法把IVF集成在VS里。
VS和IVF可以自行到官网找对应的版本下载,我这里贴两个我自己的下载链接
VS: https://download.visualstudio.mi ... 6d/vs_Community.exe
IVF: http://registrationcenter-downlo ... r_edition_setup.exe
我不知道第二个链接是不是有我的个人信息,IVF可以用教育邮箱申请,所以这个解决方法可能主要面向的还是学生。
装好之后再试了一下编译,发现此时仍然会报错,报错信息为上面的后两条,即:
ASPCOMP: Warning! Intel Fortran runtime library libifcoremd.lib not found in %LIB%
ASPCOMP: Warning! Intel Fortran runtime library is needed for Dynamic Linking.
此时再打开Set Compiler for V11,根据安装的对应版本输入一个编号,比如说我这里就是装的IVF2019+VS2017,所以输入11
设置好后再打开Customize Aspen Plus V11进行编译和链接就没有错误了。
以上的解决步骤总结一下就是:
1、安装特定的IVF+VS软件组合,最好能使用默认安装路径,其实也不明白到底配置如何,IVF只需要安装Fortran组件,VS只需要桌面C++组件,也许VS可以安装的更少一些。
2、在Set Compiler for V11程序中输入对应的软件组合编号设定某个组合,保证对应组合的状态(State)为OK
然后应该就可以正常编译和保存了。
虽然某些帖子没能解决问题,但是还是表示感谢。
https://meng.horse/thread-83872-1-1.html
https://wenku.baidu.com/view/bef3f3379b89680202d8253f.html
有些生硬的解决办法有在环境变量Path中增加ifort.exe的安装文件夹,ifort.exe是Intel Fortran的执行文件,可以在安装目录下找到,但是这个方法只能解决第一个报错信息。
|
|