Win11+VS2022 Fortran+IMKL库

win11+VS2022 Fortran

配置见前序文章(OneAPI 2023.1+VS 2022.4.5)win11+VS2022 Fortran+lapack64_win11安装fortran csdn-CSDN博客


注意:intel oneAPI与visual studio版本是否兼容,参考https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html

旧版visual studio安装包下载https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#fixed-version-bootstrappers

准备安装包

通过Evaluate IMSL for Your Project | Free IMSL Trial以学生身份申请并下载

702b2431d12b4b4e84c174658a310972.png

注意:

1.各版本支持的OneAPI与系统版本,详见IMSL(R) Fortran Numerical Library: Platform Support

目前运行发现intel oneAPI 2023.1使用Platform Interl oneAPI 2022.1版本合适。除了下载文件,Readme部分也值得认真研读。

安装IMSL库

双击fnl-2024.1.0-win110in221x64_eval.exe正常安装即可。

注意:

1.记住安装目录,后面会用到

f01ac9867c1f4e388351df585c9fd7a5.png

2.选择FNL Documentation

环境配置

1.WIN11搜索输入“cmd”后回车,进入命令提示符

  • start the Intel Fortran Command Prompt Window
  • cd <ROGUEWAVE_DIR>\imsl\fnl-<VER>\<ENV>\bin\
  • fnlsetup.bat
  • NOTE: Environment variables set by fnlsetup.bat are only available for the duration of the current command prompt session. They are lost once the command prompt session is ended.

 2.键盘按下“Win+R”,输入“control system”,确定→高级系统设置→环境变量后,添加path:

<ROGUEWAVE_DIR>\imsl\fnl-<VER>\<ENV>\lib

许可证安装

把下载下来的许可证,修改成imsl_eval.dat,放到E:\Program Files (x86)\RogueWave\license

注意:许可证文件名为imsl_eval,文件格式为DAT

配置IMSL

  1. Add Source Code to the Project
    • Select Project -> Add Existing Item and add your Fortran source code file or for testing you may use imslmp.f90 from <ROGUEWAVE_DIR>\imsl\fnl-<VER>\<ENV>\examples\validate
  2. Configure the project
    • Click on Project -> Properties in the menu bar.
    • Select Configuration Properties from the popup menu.
    • Under Fortran -> Language, set Process OpenMP Directives to "Generate Parallel Code (/Qopenmp)".e8a98f7eaff14ee28287361ccfab4f90.png
    • Under Fortran -> Floating Point, set Floating Point Exception Handling to "Produce NaN, signed infinity, and denormal results".
    • Under Fortran -> Command Line, add the following switch in the Additional Options box: /F600000008799e71b776d4abea8212cdd9832c018.png
    • Click Apply, then OK to exit the Property Pages dialog box.
  3. Add the Include Files Directory
    • In the Solution Explorer, right click on Project and select Properties.
    • Select Configuration Properties from the menu.
    • Under Fortran -> General, add <ROGUEWAVE_DIR>\imsl\fnl-<VER>\<ENV>\include\dll to the "Additional Include Directories" list.50ce69338d6f46e78fe80b9a81945a1d.png
    • Under Linker -> General, add <ROGUEWAVE_DIR>\imsl\fnl-<VER>\<ENV>\lib to the "Additional Library Directories" list.c4de4ac99ad24df9832899b87e54462a.png
    • Click Apply, then OK to exit the Property Pages dialog box.
  4. Choose compiler
    • Right click on the project in Solution Explorer. Click on Intel Compiler. This will display the currently selected compiler. Click on the compiler and select 'IFORT Intel Fortran Compiler Classic' if it is not already selected.(一般默认IFORT)
  5. Link the IMSL Numerical Library
    • In the Solution Explorer, right click on Project and select Properties.
    • Select Linker -> General from the menu.
    • Add <Roguewave_dir>\imsl\fnl-<ver>\<env>\lib to the "Additional Library Directories" list.
    • Click Apply.
    • Select Linker -> Input from the menu.
    • Add imsl_dll.lib to the "Additional Dependencies" list.3af0daa0518145c8ac03c46fa761dd01.png
    • Click Apply, then OK to exit the Project Property Pages dialog box.

程序注意

use IMSL更换为:

include 'link_fnl_shared.h' !imsl 6.0及以后
use numerical_libraries

并且需要补充:

use operation_i

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值