Compiler error or code error?

Ive been working with a code for a montecarlo simulation using fortran and the intel compiler for ubuntu. The program used to work correctly in my laptop but now I added another file which counts the number of interactions between particles. Before adding the new code the program runs ok but with the new file or copying the code in other already existing file I get this

ifort: remark #10448: Intel(R) Fortran Compiler Classic (ifort) is now deprecated and will be discontinued late 2024. Intel recommends that customers transition now to using the LLVM-based Intel(R) Fortran Compiler (ifx) for continued Windows* and Linux* support, new language support, new language features, and optimizations. Use ‘-diag-disable=10448’ to disable this message.
** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

fortcom: Severe: Internal compiler error: internal abort Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.

ifort: error #10105: /home/dan/intel/oneapi/compiler/2024.1/bin/…/bin/fortcom: core dumped
ifort: warning #10102: unknown signal(-417131280)
ifort: error #10106: Fatal error in /home/dan/intel/oneapi/compiler/2024.1/bin/…/bin/fortcom, terminated by unknown
ifort: error #10014: problem during multi-file optimization compilation (code 1)

The code works (not correctly but still compiles and work) in the computers I use in the university so I dont understand what is wrong. Sorry if its something obvious I would appreciate any help.

This part is not a problem:

For the rest, it’s clearly a compiler bug.

Which version of ifort are you using? You may upgrade to the lastest ifx version and see if the bug is still present or not.

Or, you can try finding a workaround. You may progressively comment parts of the new code, until the error disappear. At least you will have an idea about which part of the code results in the internal compiler error.

this indicates that the crash was in the Interprocedural Optimization. I wager you have -ipo or perhaps you use -fast. In any event, you can add ‘-#’ to your compilation option for this file and dump all the compiler defines and options going to the backend compiler.

ifx has a completely different scheme for IPO, so its unlikely that ifx would crash in this manner. For ifort, it is deprecated and therefore we cannot get a fix for this crash if it’s in IPO. So remove -ipo from the compiler options ( or remove -fast ) and that should avoid this crash in ifort.

Im using ubuntu 20.04 and the compiler is the new one the 2024.1
greenrongreen solution worked, thanks for replying friend

thanks, deleting the -fast fix it idk why I didnt think of that thank you so much

This is why I do not like -fast. It hides all the options it sets. In addition, the set it contains does change over time. I am glad this is working.
Make sure to try the “-#” option to dump all the defines and options to the backend compiler. It is super helpful when you want to know exactly what the compiler is doing for any given option set.