c++ - Compiler flags for diagnosing slow compilation -


i have code compiles in ~6 seconds under g++ 4.8.5, takes extremely long time compile under icpc 17.0.1. 30 minutes, though haven't measured exactly. know why icpc taking long, cannot find flags or options might reveal me stage of compilation icpc stalling at.

for g++ discovered nice option "-ftime-report", cannot find similar intel compilers. there anything? or there other way try , diagnose problem?

edit: found problem via simple search of source files, commenting out , adding until found slowdown, still nice know if there flags or tools intel compilers sort of thing.

for might curious or seeing similar, issue me had boost variadic macros using, suppose preprocessor has got in knot somehow. have attached culprit macro below. ugly, bit of automated debugging output. outer product doing 6x6 @ shouldn't serious burden (and g++ handled no problem), seems have somehow broken intel preprocessor.

     #define get_m2_matrix_el(r, product)                                    \      {                                                                       \         str label = boost_pp_seq_elem(0, product);                           \         str block = boost_pp_seq_elem(1, product);                           \         int = boost_pp_seq_elem(2, product);                               \         int j = boost_pp_seq_elem(3, product);                               \         std::ostringstream echo1;                                            \        try {                                                                 \         std::ostringstream echo2;                                            \         echo1 <<     "  spec.get(par::mass2,"<<label<<","<<i<<","<<j<<") = "; \         double value1 = spec.get(par::mass2,label,i,j); \         echo2 <<     "  slhaea::to<double>( slhaea.at("<<block<<").at("<<i<<","<<j<<").at(2) ) = "; \         double value2 = slhaea::to<double>( slhaea.at(block).at(i,j).at(2) ); \         cout << echo1.str() << value1 <<endl;                                \         cout << echo2.str() << value2 <<endl;                                \         cout << endl;                                                        \        } catch (const std::exception& e)                                       \        { add_error(report,e,label+": "+block); }                             \     }       #define get_m2_matrix(name,block,__ind1,__ind2) boost_pp_seq_for_each_product(get_m2_matrix_el, ((name))((block))(boost_pp_tuple_to_seq(__ind1))(boost_pp_tuple_to_seq(__ind2))) 


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -