gfortran 10 compilation
I found a bug when compiling some model when gfortran version larger than 10.
I use a 2HDM type I model, and merge it with sm-lepton-mass model to provide tau decay.
This new model works fine with gfortran version 4.8.5
But I met errors when using it in a new PC, with almalinux in which the default gfortran version is 11.4
The following is the Error messgae:
Error detected in "generate_events run_01"
write debug file /home/yancywww/
If you need help with this issue please contact us on https:/
str : A compilation Error occurs when trying to compile /home/yancywww/
The compilation fails with the following output message:
ar cru ../lib/libdsample.a dsample.o ranmar.o DiscreteSampler.o StringCast.o
cd MODEL; make
552 | FFCT2=FRHO(S,1)
| 1
Error: Type mismatch in argument ‘s’ at (1); passed COMPLEX(8) to REAL(8)
561 | FFCT3=FA1(S,1)
| 1
Error: Type mismatch in argument ‘s’ at (1); passed COMPLEX(8) to REAL(8)
570 | FFCT3F1=BRHO(S,1)
| 1
Error: Type mismatch in argument ‘s’ at (1); passed COMPLEX(8) to REAL(8)
579 | FFCT3F0=BRHO(S,0)
| 1
Error: Type mismatch in argument ‘s’ at (1); passed COMPLEX(8) to REAL(8)
make: *** [makefile:59: ../lib/libmodel.a] Error 2
make: *** Waiting for unfinished jobs....
ranlib ../lib/libdsample.a
Please try to fix this compilations issue and retry.
Help might be found at https:/
If you think that this is a bug, you can report this at https:/
So I checked the code, and found that it is because in function FRHO(S,1), it need a real argument, but S is decleared as a Complex variable. Actually, there is a switch in the code : S = real(S), but this wouldn't work in new gfortran.
The old gnu compilers only print a warning message and still work and wouldn't stop compilation, but this has been changed in version 10, where it now will give an error and stop compilation.
It can be solved that go to the source code and find the model folder : "Source/MODEL" , and add a new flags in the makefile: -fallow-
This bug seems only happen when merge some old UFO models, I search the forum, it seems no other report such bugs yet.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask yancywww123 for more information if necessary.