{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {},
  "_ordered_sections": [],
  "item_file": null,
  "item_line": null,
  "item_type": null,
  "aliases": [],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "f2py:windows:intel",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "As of NumPy 1.23, only the classic Intel compilers ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ifort"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") are supported."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "note",
          "base_type": "note",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "note "
                }
              ]
            },
            {
              "__type": "Blockquote",
              "__tag": 4059,
              "children": [
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "The licensing restrictions for beta software "
                          },
                          {
                            "__type": "Link",
                            "__tag": 4049,
                            "children": [
                              {
                                "__type": "Text",
                                "__tag": 4046,
                                "value": "have been relaxed"
                              }
                            ],
                            "url": "https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-fortran-compiler-release-notes.html",
                            "title": ""
                          },
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": " during"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "the transition to the LLVM backed "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "ifx/icc"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " family of compilers.  However this document does not endorse the usage of Intel in downstream  projects due to the issues pertaining to "
                            },
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "disassembly of components and \tliability",
                              "domain": null,
                              "role": null,
                              "inventory": null
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        },
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Neither the Python Intel installation nor the "
                            },
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "Classic Intel C/C++ \tCompiler",
                              "domain": null,
                              "role": null,
                              "inventory": null
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " are required."
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The "
                    },
                    {
                      "__type": "Link",
                      "__tag": 4049,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Intel Fortran Compilers"
                        }
                      ],
                      "url": "https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#inpage-nav-6-1",
                      "title": ""
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " come in a combined installer providing both   Classic and Beta versions; these also take around a gigabyte and a half or so."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "We will consider the classic example of the generation of Fibonnaci numbers, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "fib1.f"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", given by:"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "cmd.exe"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " fans, using the Intel oneAPI command prompt is the easiest approach, as it loads the required environment for both "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ifort"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "msvc"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". Helper batch scripts are also provided."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "# cmd.exe\n\"C:\\Program Files (x86)\\Intel\\oneAPI\\setvars.bat\"\npython -m numpy.f2py -c fib1.f -m fib1\npython -c \"import fib1; import numpy as np; a=np.zeros(8); fib1.fib(a); print(a)\"",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Powershell usage is a little less pleasant, and this configuration now works with MSVC as:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "# Powershell\npython -m numpy.f2py -c fib1.f -m fib1 --f77exec='C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\intel64\\ifort.exe' --f90exec='C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\intel64\\ifort.exe' -L'C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\compiler\\lib\\ia32'\npython -c \"import fib1; import numpy as np; a=np.zeros(8); fib1.fib(a); print(a)\"\n# Alternatively, set environment and reload Powershell in one line\ncmd.exe /k '\"C:\\Program Files (x86)\\Intel\\oneAPI\\setvars.bat\" && powershell'\npython -m numpy.f2py -c fib1.f -m fib1\npython -c \"import fib1; import numpy as np; a=np.zeros(8); fib1.fib(a); print(a)\"",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Note that the actual path to your local installation of "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "ifort",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " may vary, and the command above will need to be updated accordingly."
            }
          ]
        },
        {
          "__type": "Target",
          "__tag": 4061,
          "label": "have been relaxed"
        },
        {
          "__type": "Target",
          "__tag": 4061,
          "label": "disassembly of components and liability"
        },
        {
          "__type": "Target",
          "__tag": 4061,
          "label": "Intel Fortran Compilers"
        },
        {
          "__type": "Target",
          "__tag": 4061,
          "label": "Classic Intel C/C++ Compiler"
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "F2PY and Windows Intel Fortran"
        }
      ],
      "level": 0,
      "target": "f2py-win-intel"
    }
  ],
  "local_refs": []
}