Error compiling veggies with fpm and ifx


Like the title already says, I have trouble to get the unittest framework ‘veggies’ running with intel ifx compiler. I added it to my project via fpm and compiling the test with ‘fpm build --tests --compiler ifx --profile debug --flag “-Qmkl” --link-flag “-stack:64000000000”’ (I’m using intels mkl, which is why I have to use the ifx compiler) results in the error

result_m.f90                           failed.
[  1%] Compiling...
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.2 Build 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

build\dependencies\veggies\src\veggies\result_m.f90(98): error #6764: A unary defined OPERATOR definition is missing or incorrect.   [NOT]
            allocate(failed, source = .not.self%results%passed())
build\dependencies\veggies\src\veggies\result_m.f90(142): catastrophic error: Too many errors, exiting
compilation aborted for build\dependencies\veggies\src\veggies\result_m.f90 (code 1)

I have a different project, where I’m not using the intel compiler, but instead gfortran and this one compiles just fine. So I assume the error happens because of the different compilers, but I might be mistaken.

Summoning @everythingfunctional, author of said unittest framework to hopefully give an explanation :smiley:

There are known (@greenrongreen correct if I’m wrong) issues compiling veggies with ifx. I have a branch that was trying to work around them:

but there is one that I submitted via the Intel Forum that I have not heard back on yet:

It’d be great if Intel knew there was interest in seeing this fixed.

Well that’s a bummer. I can try to raise attention to this issue, but in the meantime I would need an alternative. Do you know of similar libraries, that are compatible with ifx? It might be a bit impolite from me to ask the author of a library to give recommendations to another lib with the same basic functionality, but since this issue stems from the Intel compiler rather from your code, I wanted to ask anyway :stuck_out_tongue:

It depends exactly what functionality you want, but there is a pretty good list here: Unit testing frameworks in Fortran Wiki. Hopefully you find something that ticks all your boxes (and doesn’t stumble upon ifx bugs along the way!).

No problem. My second recommendation would be the fortran-lang maintained one which is reasonably close in functionality/style:

While I’m happy people are using and enjoying my framework, I’m more interested in seeing people write good test suites than caring about which particular framework they use.

1 Like