# Performance of vectorized code in ifort and ifx

**URL:** <https://fortran-lang.discourse.group/t/performance-of-vectorized-code-in-ifort-and-ifx/7783>\
**Category:** Uncategorized\
**Created:** [April 7, 2024, 12:55pm UTC](https://fortran-lang.discourse.group/t/performance-of-vectorized-code-in-ifort-and-ifx/7783 "2024-04-07T12:55:12Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![aledinola](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aledinola](https://fortran-lang.discourse.group/u/aledinola)\
**Post date:** [April 7, 2024, 6:56pm UTC](https://fortran-lang.discourse.group/t/performance-of-vectorized-code-in-ifort-and-ifx/7783/16 "2024-04-07T18:56:48Z")

</div>

Since in the code I use the `matmul` intrinsic function to multiply two matrices, I was looking into ways of optimizing this (without invoking the subroutine `dgemm`, since I would like to keep the code at a basic level). So I came across [this](https://fortran-lang.discourse.group/t/testing-the-performance-of-matmul-under-default-compiler-settings/4096/23?page=2) excellent post by @zaikunzhang. One suggestion given in the comments to that post by @ivanpribec was to compile with

> ifort -O3 -xHost -qopenmp -qmkl=parallel -heap-arrays 40 -qopt-matmul test\_matmul.f90

In my example I am compiling with these flags:

> SWITCH = /O3 /fast /Qipo /Qmkl=parallel /Qopenmp /Qparallel -qopt-matmul

The problem is that ifort does not recognize `-qopt-matmul`. In particular, it gives this warning:

> ifort: command line warning #10006: ignoring unknown option ‘/qopt-matmul’

I am a bit puzzled by this…

---

_[View the full topic](https://fortran-lang.discourse.group/t/performance-of-vectorized-code-in-ifort-and-ifx/7783)._
