Problem compiling output for micromegas

Questions concerning the different calculations performed by SARAH and the output of the information into other formats
Post Reply
katelynn
Posts: 12
Joined: 4. May 2017, 01:44

Problem compiling output for micromegas

Post by katelynn » 4. May 2017, 01:55

Dear Florian,

After loading the MSSM model that comes with SARAH I request the output for micromegas with MakeCHep[] but when I try to compile the .cpp file generated by SARAH I get several errors. I attach a text file with the errors. I have tried also with other model (THDM) but I get the same errors.

I have micromegas 4.3.2, gcc version 6.3.1 in fedora 25.

Would you point me to what I am missing here?

Kind regards.
Attachments
err.txt
(22.29 KiB) Downloaded 213 times

FStaub
Site Admin
Posts: 822
Joined: 13. Apr 2016, 14:05

Re: Problem compiling output for micromegas

Post by FStaub » 5. May 2017, 08:25

Hi,

it seems that the paths in MicrOmegas 4.3.2 have changed with respect to earlier versions. You need to replace at top of the cpp files

Code: Select all

#include "../sources/micromegas.h"
#include "lib/pmodel.h"
#include"../sources/micromegas_aux.h"
#include <string>
by

Code: Select all

#include "../include/micromegas.h"
#include "lib/pmodel.h"
#include"../include/micromegas_aux.h"
#include <string>
Cheers
Florian

katelynn
Posts: 12
Joined: 4. May 2017, 01:44

Re: Problem compiling output for micromegas

Post by katelynn » 5. May 2017, 14:56

Hello Florian,

Yes I made those changes, but still I get the same errors shown in the attached file, I rewrite the first few lines below.

I appreciate any advice,
Thanks a lot.

----------------------------------------


In file included from ../include/micromegas.h:504:0,
from CalcOmega_with_DDetection_MOv4.2.cpp:1:
../include/../CalcHEP_src/c_source/SLHAplus/include/SLHAplus.h:31:23: error: expected initializer before ‘cslhaVal’
extern double complex cslhaVal(char * Block, double Q, int nKey, ...);
^~~~~~~~
../include/../CalcHEP_src/c_source/SLHAplus/include/SLHAplus.h:43:76: error: expected ‘,’ or ‘...’ before ‘*’ token
extern int allBlocks(int i,int j,char*name,int*Len,int*key, double complex * val);
^
../include/../CalcHEP_src/c_source/SLHAplus/include/SLHAplus.h:48:28: error: expected ‘,’ or ‘...’ before ‘*’ token
extern int cJacobiH(COMPLEX* a, int n, REAL *d, COMPLEX* v);
^
../include/../CalcHEP_src/c_source/SLHAplus/include/SLHAplus.h:49:28: error: expected ‘,’ or ‘...’ before ‘*’ token
extern int cJacobiS(COMPLEX* a, int n, REAL *d, COMPLEX* v);
^
../include/../CalcHEP_src/c_source/SLHAplus/include/SLHAplus.h:50:28: error: expected ‘,’ or ‘...’ before ‘*’ token
extern int cJacobiA(COMPLEX* a, int n, REAL *d, COMPLEX* u,COMPLEX * v);

katelynn
Posts: 12
Joined: 4. May 2017, 01:44

Re: Problem compiling output for micromegas

Post by katelynn » 6. May 2017, 16:30

Update:

I thought that maybe I have a problem with the compiler which was
installed from the fedora repository, so I tried upgrading to gcc v7.1
bypassing the repository and building directly from the gcc source code.

Unfortunately with this update of gcc I get the same errors when
trying to compile CalcOmega_with_DDetection_MOv4.2.cpp

Suggestions are welcome :)

Thank you.

FStaub
Site Admin
Posts: 822
Joined: 13. Apr 2016, 14:05

Re: Problem compiling output for micromegas

Post by FStaub » 7. May 2017, 17:05

Hi,

(unfortunately?) I can't reproduce this problem. After the changes mentioned above, it compiles fine for me. I'm using here g++ 4.8.5.
Maybe, it's worth to contact the MicrOmegas authors since it doesn't really look to me that this is a problem coming from the SARAH files. Did you try to compile examples delivered with MicrOmegas?

Cheers,
Florian

katelynn
Posts: 12
Joined: 4. May 2017, 01:44

Re: Problem compiling output for micromegas

Post by katelynn » 8. May 2017, 20:41

Hi

Yes, for the example from micromegas it also fails to compile main.cpp
with similar errors.

So the problem seems to be gcc's bad backward compatibility.
I don't know of other linux distributions, but for those using fedora
if you're thinking of upgrading to a new release, your compiler will
probably get updated, so keep this in mind,

Regards.

Post Reply