计算化学公社

 找回密码 Forget password
 注册 Register
Views: 14119|回复 Reply: 17
打印 Print 上一主题 Last thread 下一主题 Next thread

[其它量化程序] BAGEL编译求助

[复制链接 Copy URL]

263

帖子

4

威望

5805

eV
积分
6148

Level 6 (一方通行)

跳转到指定楼层 Go to specific reply
楼主
不知道论坛上有没有用过这个程序的。问一个编译问题:按手册编译时有这么一步:
  1. export BOOST_ROOT=/path/to/boost
  2. $ export LD_LIBRARY_PATH=$BOOST_ROOT/lib:$LD_LIBRARY_PATH

  3. $ ../configure --enable-mkl --with-boost=$BOOST_ROOT
复制代码
但是无论是系统自带的boost路径,还是自己下载的boost,配置时都会报这个错:
  1. ...
  2. checking dynamic linker characteristics... (cached) GNU/Linux ld.so
  3. checking how to hardcode library paths into programs... immediate
  4. checking for boostlib >= 1.53... yes
  5. checking whether the Boost::Regex library is available... yes
  6. configure: error: Could not find a version of the Boost::Regex library!
复制代码
如果没有正确配置boost库,下一步make时会报错:
  1. ...
  2. /usr/include/boost/serialization/export.hpp:142:61:   required from ‘const boost::archive::detail::extra_detail::guid_initializer<T>& boost::archive::detail::extra_detail::guid_initializer<T>::export_guid() const [with T = bagel::SMITH::Tensor_<double>]’
  3. ../../../src/smith/tensor.cc:167:1:   required from here
  4. /usr/include/boost/serialization/access.hpp:118:9: 错误:‘class std::unordered_set<long unsigned int>’没有名为‘serialize’的成员
复制代码
所以想问问BAGEL要怎么正确编译呢?
贫困U 退学与疯子工程学院

4289

帖子

4

威望

9546

eV
积分
13915

Level 6 (一方通行)

MOKIT开发者

2#
发表于 Post on 2020-11-9 21:58:02 | 只看该作者 Only view this author
boost编译没通过的话,后面的步骤就不用看了。

“配置时都会报这个错”啥意思?配置谁?boost到底成功编译了没有?
自动做多参考态计算的程序MOKIT

744

帖子

21

威望

5351

eV
积分
6515

Level 6 (一方通行)

3#
发表于 Post on 2020-11-9 22:28:38 | 只看该作者 Only view this author
ubuntu应用仓库已经有编译好的bagel了。装个ubuntu或衍生系统

928

帖子

1

威望

8263

eV
积分
9211

Level 6 (一方通行)

4#
发表于 Post on 2020-11-9 23:12:24 | 只看该作者 Only view this author
本帖最后由 hebrewsnabla 于 2020-11-9 23:29 编辑

装了boost不等于装对了,你看看你有没有libboost_regex.so

如果有的话,看一下这个 https://github.com/qsimulate-open/bagel/issues/162
类似的问题有人问过了

评分 Rate

参与人数
Participants 1
eV +3 收起 理由
Reason
wxhwbh + 3

查看全部评分 View all ratings

92

帖子

0

威望

2260

eV
积分
2352

Level 5 (御坂)

5#
发表于 Post on 2020-11-10 12:40:01 | 只看该作者 Only view this author
我推测你就是单纯的没编译boost,boost不是一个单纯的头文件库,有的部分是需要编译的,照着官方手册编译一下boost

4289

帖子

4

威望

9546

eV
积分
13915

Level 6 (一方通行)

MOKIT开发者

6#
发表于 Post on 2020-11-10 13:16:46 | 只看该作者 Only view this author
wangxubo 发表于 2020-11-10 12:40
我推测你就是单纯的没编译boost,boost不是一个单纯的头文件库,有的部分是需要编译的,照着官方手册编译一下b ...

你的意思是他解压之后,啥也没做就开始写环境变量了么哈哈哈哈,有可能

我记得Eigen库就是这样的,解压即用。但是boost得编译。
自动做多参考态计算的程序MOKIT

263

帖子

4

威望

5805

eV
积分
6148

Level 6 (一方通行)

7#
 楼主 Author| 发表于 Post on 2020-11-10 14:30:21 | 只看该作者 Only view this author
zjxitcc 发表于 2020-11-10 13:16
你的意思是他解压之后,啥也没做就开始写环境变量了么哈哈哈哈,有可能

我记得Eigen库就是这样的,解 ...

不是,在我的系统的/use/lib64里是有libboost_regex.so等库文件的。按四楼给的链接的做法,在./configure这一步里写成:
  1. --with-boost=yes --with-boost-libdir=/usr/lib64
复制代码

那么./configure这一步就不会报错了。但下一步make还是会报错:
  1. libtool: compile:  mpicxx -DHAVE_CONFIG_H -I. -I../../../src/smith -I../.. -I/usr/include -I../../.. -DNDEBUG -O3 -mavx -std=c++11 -MT tensor.lo -MD -MP -MF .deps/tensor.Tpo -c ../../../src/smith/tensor.cc  -fPIC -DPIC -o .libs/tensor.o
  2. In file included from /usr/include/boost/serialization/split_member.hpp:23:0,
  3.                  from /usr/include/boost/serialization/nvp.hpp:33,
  4.                  from /usr/include/boost/serialization/array.hpp:19,
  5.                  from ../../../btas/serialization.h:6,
  6.                  from ../../../btas/varray/varray.h:6,
  7.                  from ../../../btas/range.h:19,
  8.                  from ../../../btas/defaults.h:15,
  9.                  from ../../../btas/tensor.h:11,
  10.                  from ../../../btas/generic/axpy_impl.h:8,
  11.                  from ../../../btas/btas.h:8,
  12.                  from ../../../src/util/math/btas_interface.h:38,
  13.                  from ../../../src/util/math/vectorb.h:30,
  14.                  from ../../../src/util/math/matrix_base.h:33,
  15.                  from ../../../src/util/math/matrix.h:32,
  16.                  from ../../../src/smith/tensor.h:34,
  17.                  from ../../../src/smith/tensor.cc:28:
  18. /usr/include/boost/serialization/access.hpp: In instantiation of ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’:
  19. /usr/include/boost/serialization/serialization.hpp:69:69:   required from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’
  20. /usr/include/boost/serialization/serialization.hpp:128:27:   required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’
  21. /usr/include/boost/archive/detail/iserializer.hpp:192:5:   required from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’
  22. /usr/include/boost/archive/detail/iserializer.hpp:120:1:   required from ‘class boost::archive::detail::iserializer<boost::archive::binary_iarchive, std::unordered_set<long unsigned int> >’
  23. /usr/include/boost/archive/detail/iserializer.hpp:387:13:   required from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_standard::invoke(Archive&, const T&) [with T = std::unordered_set<long unsigned int>; Archive = boost::archive::binary_iarchive]’
  24. /usr/include/boost/archive/detail/iserializer.hpp:439:28:   [ skipping 21 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
  25. /usr/include/boost/serialization/export.hpp:86:1:   required from ‘struct boost::archive::detail::ptr_serialization_support<boost::archive::binary_iarchive, bagel::SMITH::Tensor_<double> >’
  26. /usr/include/boost/archive/detail/register_archive.hpp:25:8:   required from ‘struct boost::archive::detail::_ptr_serialization_support<boost::archive::binary_iarchive, bagel::SMITH::Tensor_<double> >’
  27. /usr/include/boost/archive/binary_iarchive.hpp:96:1:   required by substitution of ‘template<class Serializable> typename boost::archive::detail::_ptr_serialization_support<boost::archive::binary_iarchive, Serializable>::type boost::archive::detail::instantiate_ptr_serialization(Serializable*, boost::archive::binary_iarchive*, boost::archive::detail::adl_tag) [with Serializable = bagel::SMITH::Tensor_<double>]’
  28. /usr/include/boost/serialization/export.hpp:132:58:   required from ‘void boost::archive::detail::extra_detail::guid_initializer<T>::export_guid(mpl_::false_) const [with T = bagel::SMITH::Tensor_<double>; mpl_::false_ = mpl_::bool_<false>]’
  29. /usr/include/boost/serialization/export.hpp:142:61:   required from ‘const boost::archive::detail::extra_detail::guid_initializer<T>& boost::archive::detail::extra_detail::guid_initializer<T>::export_guid() const [with T = bagel::SMITH::Tensor_<double>]’
  30. ../../../src/smith/tensor.cc:167:1:   required from here
  31. /usr/include/boost/serialization/access.hpp:118:9: 错误:‘class std::unordered_set<long unsigned int>’没有名为‘serialize’的成员
  32.          t.serialize(ar, file_version);
  33.          ^
  34. /usr/include/boost/serialization/access.hpp: In instantiation of ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’:
  35. /usr/include/boost/serialization/serialization.hpp:69:69:   required from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’
  36. /usr/include/boost/serialization/serialization.hpp:128:27:   required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’
  37. /usr/include/boost/archive/detail/oserializer.hpp:152:5:   required from ‘void boost::archive::detail::oserializer<Archive, T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’
  38. /usr/include/boost/archive/detail/oserializer.hpp:101:1:   required from ‘class boost::archive::detail::oserializer<boost::archive::binary_oarchive, std::unordered_set<long unsigned int> >’
  39. /usr/include/boost/archive/detail/oserializer.hpp:253:13:   required from ‘static void boost::archive::detail::save_non_pointer_type<Archive>::save_standard::invoke(Archive&, const T&) [with T = std::unordered_set<long unsigned int>; Archive = boost::archive::binary_oarchive]’
  40. /usr/include/boost/archive/detail/oserializer.hpp:308:28:   [ skipping 21 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
  41. /usr/include/boost/serialization/export.hpp:86:1:   required from ‘struct boost::archive::detail::ptr_serialization_support<boost::archive::binary_oarchive, bagel::SMITH::Tensor_<double> >’
  42. /usr/include/boost/archive/detail/register_archive.hpp:25:8:   required from ‘struct boost::archive::detail::_ptr_serialization_support<boost::archive::binary_oarchive, bagel::SMITH::Tensor_<double> >’
  43. /usr/include/boost/archive/binary_oarchive.hpp:59:1:   required by substitution of ‘template<class Serializable> typename boost::archive::detail::_ptr_serialization_support<boost::archive::binary_oarchive, Serializable>::type boost::archive::detail::instantiate_ptr_serialization(Serializable*, boost::archive::binary_oarchive*, boost::archive::detail::adl_tag) [with Serializable = bagel::SMITH::Tensor_<double>]’
  44. /usr/include/boost/serialization/export.hpp:132:58:   required from ‘void boost::archive::detail::extra_detail::guid_initializer<T>::export_guid(mpl_::false_) const [with T = bagel::SMITH::Tensor_<double>; mpl_::false_ = mpl_::bool_<false>]’
  45. /usr/include/boost/serialization/export.hpp:142:61:   required from ‘const boost::archive::detail::extra_detail::guid_initializer<T>& boost::archive::detail::extra_detail::guid_initializer<T>::export_guid() const [with T = bagel::SMITH::Tensor_<double>]’
  46. ../../../src/smith/tensor.cc:167:1:   required from here
  47. /usr/include/boost/serialization/access.hpp:118:9: 错误:‘class std::unordered_set<long unsigned int>’没有名为‘serialize’的成员
  48. make[3]: *** [tensor.lo] 错误 1
  49. make[3]: 离开目录“/home/public/wbh/soft/bagel/obj/src/smith”
  50. make[2]: *** [all-recursive] 错误 1
  51. make[2]: 离开目录“/home/public/wbh/soft/bagel/obj/src”
  52. make[1]: *** [all-recursive] 错误 1
  53. make[1]: 离开目录“/home/public/wbh/soft/bagel/obj”
  54. make: *** [all] 错误 2
复制代码

所以还是想问要怎么处理呢?
贫困U 退学与疯子工程学院

263

帖子

4

威望

5805

eV
积分
6148

Level 6 (一方通行)

8#
 楼主 Author| 发表于 Post on 2020-11-10 14:33:00 | 只看该作者 Only view this author
hebrewsnabla 发表于 2020-11-9 23:12
装了boost不等于装对了,你看看你有没有libboost_regex.so

如果有的话,看一下这个 https://github.com/ ...

谢谢。libboost_regex.so在/usr/lib64里是有的。按照链接里的写法在./configure这一步里改成
  1. --with-boost=yes --with-boost-libdir=/usr/lib64
复制代码

那么这一步就不会报错。
但是下一步make还是会报错:
  1. libtool: compile:  mpicxx -DHAVE_CONFIG_H -I. -I../../../src/smith -I../.. -I/usr/include -I../../.. -DNDEBUG -O3 -mavx -std=c++11 -MT tensor.lo -MD -MP -MF .deps/tensor.Tpo -c ../../../src/smith/tensor.cc  -fPIC -DPIC -o .libs/tensor.o
  2. In file included from /usr/include/boost/serialization/split_member.hpp:23:0,
  3.                  from /usr/include/boost/serialization/nvp.hpp:33,
  4.                  from /usr/include/boost/serialization/array.hpp:19,
  5.                  from ../../../btas/serialization.h:6,
  6.                  from ../../../btas/varray/varray.h:6,
  7.                  from ../../../btas/range.h:19,
  8.                  from ../../../btas/defaults.h:15,
  9.                  from ../../../btas/tensor.h:11,
  10.                  from ../../../btas/generic/axpy_impl.h:8,
  11.                  from ../../../btas/btas.h:8,
  12.                  from ../../../src/util/math/btas_interface.h:38,
  13.                  from ../../../src/util/math/vectorb.h:30,
  14.                  from ../../../src/util/math/matrix_base.h:33,
  15.                  from ../../../src/util/math/matrix.h:32,
  16.                  from ../../../src/smith/tensor.h:34,
  17.                  from ../../../src/smith/tensor.cc:28:
  18. /usr/include/boost/serialization/access.hpp: In instantiation of ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’:
  19. /usr/include/boost/serialization/serialization.hpp:69:69:   required from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’
  20. /usr/include/boost/serialization/serialization.hpp:128:27:   required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’
  21. /usr/include/boost/archive/detail/iserializer.hpp:192:5:   required from ‘void boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::archive::binary_iarchive; T = std::unordered_set<long unsigned int>]’
  22. /usr/include/boost/archive/detail/iserializer.hpp:120:1:   required from ‘class boost::archive::detail::iserializer<boost::archive::binary_iarchive, std::unordered_set<long unsigned int> >’
  23. /usr/include/boost/archive/detail/iserializer.hpp:387:13:   required from ‘static void boost::archive::detail::load_non_pointer_type<Archive>::load_standard::invoke(Archive&, const T&) [with T = std::unordered_set<long unsigned int>; Archive = boost::archive::binary_iarchive]’
  24. /usr/include/boost/archive/detail/iserializer.hpp:439:28:   [ skipping 21 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
  25. /usr/include/boost/serialization/export.hpp:86:1:   required from ‘struct boost::archive::detail::ptr_serialization_support<boost::archive::binary_iarchive, bagel::SMITH::Tensor_<double> >’
  26. /usr/include/boost/archive/detail/register_archive.hpp:25:8:   required from ‘struct boost::archive::detail::_ptr_serialization_support<boost::archive::binary_iarchive, bagel::SMITH::Tensor_<double> >’
  27. /usr/include/boost/archive/binary_iarchive.hpp:96:1:   required by substitution of ‘template<class Serializable> typename boost::archive::detail::_ptr_serialization_support<boost::archive::binary_iarchive, Serializable>::type boost::archive::detail::instantiate_ptr_serialization(Serializable*, boost::archive::binary_iarchive*, boost::archive::detail::adl_tag) [with Serializable = bagel::SMITH::Tensor_<double>]’
  28. /usr/include/boost/serialization/export.hpp:132:58:   required from ‘void boost::archive::detail::extra_detail::guid_initializer<T>::export_guid(mpl_::false_) const [with T = bagel::SMITH::Tensor_<double>; mpl_::false_ = mpl_::bool_<false>]’
  29. /usr/include/boost/serialization/export.hpp:142:61:   required from ‘const boost::archive::detail::extra_detail::guid_initializer<T>& boost::archive::detail::extra_detail::guid_initializer<T>::export_guid() const [with T = bagel::SMITH::Tensor_<double>]’
  30. ../../../src/smith/tensor.cc:167:1:   required from here
  31. /usr/include/boost/serialization/access.hpp:118:9: 错误:‘class std::unordered_set<long unsigned int>’没有名为‘serialize’的成员
  32.          t.serialize(ar, file_version);
  33.          ^
  34. /usr/include/boost/serialization/access.hpp: In instantiation of ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’:
  35. /usr/include/boost/serialization/serialization.hpp:69:69:   required from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’
  36. /usr/include/boost/serialization/serialization.hpp:128:27:   required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’
  37. /usr/include/boost/archive/detail/oserializer.hpp:152:5:   required from ‘void boost::archive::detail::oserializer<Archive, T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::binary_oarchive; T = std::unordered_set<long unsigned int>]’
  38. /usr/include/boost/archive/detail/oserializer.hpp:101:1:   required from ‘class boost::archive::detail::oserializer<boost::archive::binary_oarchive, std::unordered_set<long unsigned int> >’
  39. /usr/include/boost/archive/detail/oserializer.hpp:253:13:   required from ‘static void boost::archive::detail::save_non_pointer_type<Archive>::save_standard::invoke(Archive&, const T&) [with T = std::unordered_set<long unsigned int>; Archive = boost::archive::binary_oarchive]’
  40. /usr/include/boost/archive/detail/oserializer.hpp:308:28:   [ skipping 21 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
  41. /usr/include/boost/serialization/export.hpp:86:1:   required from ‘struct boost::archive::detail::ptr_serialization_support<boost::archive::binary_oarchive, bagel::SMITH::Tensor_<double> >’
  42. /usr/include/boost/archive/detail/register_archive.hpp:25:8:   required from ‘struct boost::archive::detail::_ptr_serialization_support<boost::archive::binary_oarchive, bagel::SMITH::Tensor_<double> >’
  43. /usr/include/boost/archive/binary_oarchive.hpp:59:1:   required by substitution of ‘template<class Serializable> typename boost::archive::detail::_ptr_serialization_support<boost::archive::binary_oarchive, Serializable>::type boost::archive::detail::instantiate_ptr_serialization(Serializable*, boost::archive::binary_oarchive*, boost::archive::detail::adl_tag) [with Serializable = bagel::SMITH::Tensor_<double>]’
  44. /usr/include/boost/serialization/export.hpp:132:58:   required from ‘void boost::archive::detail::extra_detail::guid_initializer<T>::export_guid(mpl_::false_) const [with T = bagel::SMITH::Tensor_<double>; mpl_::false_ = mpl_::bool_<false>]’
  45. /usr/include/boost/serialization/export.hpp:142:61:   required from ‘const boost::archive::detail::extra_detail::guid_initializer<T>& boost::archive::detail::extra_detail::guid_initializer<T>::export_guid() const [with T = bagel::SMITH::Tensor_<double>]’
  46. ../../../src/smith/tensor.cc:167:1:   required from here
  47. /usr/include/boost/serialization/access.hpp:118:9: 错误:‘class std::unordered_set<long unsigned int>’没有名为‘serialize’的成员
  48. make[3]: *** [tensor.lo] 错误 1
  49. make[3]: 离开目录“/home/public/wbh/soft/bagel/obj/src/smith”
  50. make[2]: *** [all-recursive] 错误 1
  51. make[2]: 离开目录“/home/public/wbh/soft/bagel/obj/src”
  52. make[1]: *** [all-recursive] 错误 1
  53. make[1]: 离开目录“/home/public/wbh/soft/bagel/obj”
  54. make: *** [all] 错误 2
复制代码
贫困U 退学与疯子工程学院

92

帖子

0

威望

2260

eV
积分
2352

Level 5 (御坂)

9#
发表于 Post on 2020-11-10 15:18:16 | 只看该作者 Only view this author
wxhwbh 发表于 2020-11-10 14:30
不是,在我的系统的/use/lib64里是有libboost_regex.so等库文件的。按四楼给的链接的做法,在./configure ...

不要用源里的boost,自己编译一遍boost,确保boost用的编译器和编译bagel用的编译器一样.

928

帖子

1

威望

8263

eV
积分
9211

Level 6 (一方通行)

10#
发表于 Post on 2020-11-10 18:31:50 | 只看该作者 Only view this author
wxhwbh 发表于 2020-11-10 14:33
谢谢。libboost_regex.so在/usr/lib64里是有的。按照链接里的写法在./configure这一步里改成

那么这一 ...

我make并无问题。

不过我的gcc和boost都是最新的,没有兼容问题。估计你的不是,你可能得按照9楼的建议自己编译boost。

263

帖子

4

威望

5805

eV
积分
6148

Level 6 (一方通行)

11#
 楼主 Author| 发表于 Post on 2020-11-22 16:02:08 | 只看该作者 Only view this author
找到解决方法了,在编译boost后进入boost的头文件目录的propetry_tree目录(我的是/usr/local/include/boost/propetry_tree),编辑ptree_serialization.hpp, 找到下面这个namespace(前面数字是行号):
...
51      namespace detail
52     {      
53         template <class Archive, class K, class D, class C>
54         inline void load_children(Archive &ar,
55                                   basic_ptree<K, D, C> &t)
56         {   
57             namespace bsl = boost::serialization;
58             namespace bsa = boost::archive;
59            
60             typedef basic_ptree<K, D, C> tree;
61             typedef typename tree::value_type value_type;
62            
63             bsl::collection_size_type count;
64             ar >> BOOST_SERIALIZATION_NVP(count);
65             bsl::item_version_type item_version(0);
66             const bsa::library_version_type library_version(
67                 ar.get_library_version()
68             );
69             if(bsa::library_version_type(3) < library_version){
...

把标记的bsa改成bsl,然后重新编译就没问题了。


贫困U 退学与疯子工程学院

1245

帖子

1

威望

3860

eV
积分
5125

Level 6 (一方通行)

12#
发表于 Post on 2021-2-22 13:07:29 | 只看该作者 Only view this author
beefly 发表于 2020-11-9 22:28
ubuntu应用仓库已经有编译好的bagel了。装个ubuntu或衍生系统

还是最新版本的,一键安装就能用,并行啥的都有了

2425

帖子

1

威望

6196

eV
积分
8641

Level 6 (一方通行)

13#
发表于 Post on 2021-2-22 20:04:34 | 只看该作者 Only view this author
测试全通过,
intel2020 update2 全套。
BAGEL v1.2.2。
High-Performance Computing for You
为您专属定制的高性能计算解决方案

更多讯息,请访问:
https://labitc.top
http://tophpc.top:8080
电邮: ask@hpc4you.top

482

帖子

10

威望

6938

eV
积分
7620

Level 6 (一方通行)

BSJ Institute

14#
发表于 Post on 2022-1-5 14:29:30 | 只看该作者 Only view this author
我按照http://bbs.keinsci.com/thread-27002-1-1.html的方法编译BAGEL时也出现了类似的现象,不过与楼主不同的是写--with-boost=yes --with-boost-libdir=/usr/local/lib/后就可以解决,并且后续make时一切正常。无论是自己编译的boost 1.71.0还是ubuntu apt安装的boost都可以。另外如果按照11楼的做法修改命名空间,反而会造成make时报错。
用apt-get安装BAGEL虽然方便,并且也可以并行(需要apt安装openblas,否则只能单核运算;不要使用mpirun,装了openblas后直接BAGEL xxx.json,就可以自动并行),但并行效率很低,CPU占用率在100%到满核之间反复横跳。还是要自己编译。
用mpirun BAGEL运行时记得修改MKL_NUM_THREADS和BAGEL_NUM_THREADS两个环境变量,我测试的结果是设为1到2效率比较高。如果按照默认值,则并行时反而比串行要慢10倍左右。

1665

帖子

5

威望

4788

eV
积分
6553

Level 6 (一方通行)

喵星人

15#
发表于 Post on 2022-1-5 15:23:26 | 只看该作者 Only view this author
Accelerator 发表于 2022-1-5 14:29
我按照http://bbs.keinsci.com/thread-27002-1-1.html的方法编译BAGEL时也出现了类似的现象,不过与楼主不 ...

确实,是1-2核每个mpi比较快,但不是所有功能都可以mpi并行

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-22 13:53 , Processed in 0.166506 second(s), 21 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list