在Linux服务器上编译c++程序时,Intel编译器的语法
Syntax of Intel compiler while compiling C++ program on Linux server
我是Linux上shell和编译c++程序的新手。
我有一个c++程序,我习惯用下面的命令用c++编译它:
g++ lapack.cpp generators.cpp SimpleRNG.cpp testabc.cpp -O3 -o examplexi.o;
该命令工作良好,testabc.cpp需要从Eigen库调用函数,然而,当我试图使用以下命令与英特尔编译器:
icpc lapack.cpp generators.cpp SimpleRNG.cpp testabc.cpp -O3 -o examplexi.o;
有很多错误,这里我只挑了一个放在下面:
Eigen::Matrix<double, -1, -1, 0, -1, -1>>, const Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, 5>>>>]" at line 274 of "testabc.cpp"
我没有找到任何关于英特尔编译器的特殊语法,谁能帮助我在这里?
非常感谢!
Ps:实际上我发现所有的错误信息都是警告的,程序最终可以编译。但是所有这些警告信息仍然令人讨厌,所以我在这里发布了前几行,希望你能帮助我!
eigen/Eigen/src/Core/Product.h(453): warning #2196: routine is both "inline" and "noinline"
general_matrix_vector_product
^
detected during:
instantiation of "void Eigen::internal::gemv_selector<2, 0, true>::run(const ProductType &, Dest &, ProductType::Scalar) [with ProductType=Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>, 4>, Dest=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false, true>]" at line 340
instantiation of "void Eigen::GeneralProduct<Lhs, Rhs, 4>::scaleAndAddTo(Dest &, Eigen::GeneralProduct<Lhs, Rhs, 4>::Scalar) const [with Lhs=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Rhs=Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>, Dest=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false, true>]" at line 124 of "eigen/Eigen/src/Core/ProductBase.h"
instantiation of "void Eigen::ProductBase<Derived, Lhs, Rhs>::scaleAndAddTo(Dest &, Eigen::ProductBase<Derived, Lhs, Rhs>::Scalar) const [with Derived=Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>, 4>, Lhs=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Rhs=Eigen::Transpose<const
Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>, Dest=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false, true>]" at line 121 of "eigen/Eigen/src/Core/ProductBase.h"
instantiation of "void Eigen::ProductBase<Derived, Lhs, Rhs>::subTo(Dest &) const [with Derived=Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>, 4>, Lhs=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Rhs=Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>,
Dest=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false, true>]" at line 87 of "eigen/Eigen/src/Core/NoAlias.h"
instantiation of "ExpressionType &Eigen::NoAlias<ExpressionType, StorageBase>::operator-=(const Eigen::ProductBase<ProductDerived, Lhs, Rhs> &) [with ExpressionType=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false, true>, StorageBase=Eigen::MatrixBase, ProductDerived=Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>,
4>, Lhs=Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false, true>, Rhs=Eigen::Transpose<const Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1, -1, false, true>>]" at line 219 of "eigen/Eigen/src/Cholesky/LLT.h"
instantiation of "MatrixType::Index Eigen::internal::llt_inplace<1>::unblocked(MatrixType &) [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 232 of "eigen/Eigen/src/Cholesky/LLT.h"
instantiation of "MatrixType::Index Eigen::internal::llt_inplace<1>::blocked(MatrixType &) [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 282 of "eigen/Eigen/src/Cholesky/LLT.h"
instantiation of "bool Eigen::internal::LLT_Traits<MatrixType, 1>::inplace_decomposition(MatrixType &) [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 311 of "eigen/Eigen/src/Cholesky/LLT.h"
instantiation of "Eigen::LLT<_MatrixType, _UpLo> &Eigen::LLT<_MatrixType, _UpLo>::compute(const Eigen::LLT<_MatrixType, _UpLo>::MatrixType &) [with _MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>, _UpLo=1]" at line 101 of "eigen/Eigen/src/Cholesky/LLT.h"
instantiation of "Eigen::LLT<_MatrixType, _UpLo>::LLT(const Eigen::LLT<_MatrixType, _UpLo>::MatrixType &) [with _MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>, _UpLo=1]" at line 373 of "eigen/Eigen/src/Cholesky/LLT.h"
instantiation of "const Eigen::LLT<Eigen::Matrix<Eigen::internal::traits<Derived>::Scalar, Eigen::internal::traits<Derived>::RowsAtCompileTime, Eigen::internal::traits<Derived>::ColsAtCompileTime, <expression>, Eigen::internal::traits<Derived>::MaxRowsAtCompileTime, Eigen::internal::traits<Derived>::MaxColsAtCompileTime>, 1> Eigen::MatrixBase<Derived>::llt() const [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 66 of "generators.cpp"
正如评论中所讨论的,这些警告/错误是由旧版本的Eigen引起的。升级Eigen修复了这个问题
相关文章:
- 功能模板与Variadic模板过载:Intel C 编译器版本18产生的结果不同于其他编译器.英特尔是错误的
- 如何将现有的矢量化函数与Intel编译器自动化的现有标量函数相关
- C STD ::排序Intel编译器错误:访问违规
- 我可以在不安装Visual Studio [Windows]的情况下使用Intel C 编译器
- Intel C 编译器的编译非常慢,无法编译递归声明返回
- 已安装的Intel C 编译器,缺失 /位 /C 配置
- Intel c++编译器ICC似乎忽略了SSE/AVX设置
- 在Linux服务器上编译c++程序时,Intel编译器的语法
- Armadillo与intel c++编译器错误
- 为什么Intel编译器忽略了Intel MIC的非时序预取指令
- 在用intel编译器编译代码时排除/usr/include/c++/4.3/
- 使用Intel编译器集作为平台工具集
- 为什么NaN - NaN == 0.0与Intel c++编译器
- 在linux上使用intel编译器编译Eigen库时出现错误
- 一段代码不能被intel编译器编译,但是clang可以编译它
- Intel c++编译器- const string是可修改的
- int128在Linux上的Intel编译器
- Intel编译器生成的代码比MSVC慢68%(提供了完整的示例)
- 如何配置Eclipse(或任何IDE),以便在远程SSH主机上使用Intel编译器编译c++
- 使用c++ /intel c++编译器调用fortran函数