首先按照如下链接配置mpi库
windows 中intel mpi library 的配置
然后参考如下文件
windows 中配置 Intel visual fortran 2019 && sublime text 3
建立mpiifort的.sublime-build文件如下
{
"shell_cmd": "start cmd /c \" ipsxe-comp-vars intel64 vs2017 && echo ******************************************** && mpif90 \"${file}\" & pause\"",
"working_dir":"${file_path}",
"selector":"source.f ,source.for ,source.ftn ,source.f90 ,source.fpp ,source.i ,source.i90,source.modern-fortran, source.fixedform-fortran,source.fortran",
"encoding":"cp936",
"path":"D:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2019.4.245\\windows\\bin;${path};",
"variants":
[
{
"name": "Compile and Run with 2 cores",
"shell_cmd": "start cmd /c \" ipsxe-comp-vars intel64 vs2017 && echo ******************************************** && mpif90 \"${file}\" && echo ******************************************** && mpiexec -n 2 \"${file_base_name}\" & pause\"",
},
{
"name": "Compile and Run with 4 cores",
"shell_cmd": "start cmd /c \" ipsxe-comp-vars intel64 vs2017 && echo ******************************************** && mpif90 \"${file}\" && echo ******************************************** && mpiexec -n 4 \"${file_base_name}\" & pause\"",
},
{
"name": "Compile and Run with 8 cores",
"shell_cmd": "start cmd /c \" ipsxe-comp-vars intel64 vs2017 && echo ******************************************** && mpif90 \"${file}\" && echo ******************************************** && mpiexec -n 8 \"${file_base_name}\" & pause\"",
}
]
}
以上提供了2核、4核、8核的运行编译选项。