Setting up Rosetta 3

The current build system is based on the tool SCons (“Software Constructor”) with some extensions. scons.py is implemented as a Python script.

SCons (Mac/Linux)

You have multiple options for compiling Rosetta 3 with SCons. You can build either only the core libraries or both the libraries and the executables. Rosetta 3 can be compiled in two major modes:

  • Debug mode — for development — no mode option, or mode=debug
  • Release mode — faster/tested and ready to go &mdashl mode=release
  1. Change directory to main/source .

  2. Type one of the following commands:

    • Build all binaries

      ./scons.py -j<number_of_processors_to_use> bin

      ./scons.py -j<number_of_processors_to_use> mode=release bin

    • Build a specific binary

      Just passing the name works:

      ./scons.py -j<num_of_proc> mode=release extras=hdf5 rosetta_scripts

      If you specify the path with bin/ you must also pass the correct extension:

      ./scons.py -j<num_of_proc> bin/rosetta_scripts.linuxgccdebug ./scons.py -j<num_of_proc> mode=release bin/rosetta_scripts.linuxgccrelease

    • Build libraries only ./scons.py -j<number_of_processors_to_use>

      ./scons.py -j<number_of_processors_to_use> mode=release

The -j8 flag would mean, “use at most 8 processes for building,” and can be reasonably set as the number of free processors on your machine. Be aware that setting -j to a very high value will cause the operating system to have difficulty scheduling jobs.

By default scons hashes and processes every file in the tree before performing a build. On a large tree (e.g. rosetta) and filesystem with high io latency (e.g. a NFS or GPFS filesystem) this causes ridiculously slow build times. In order to improve build times disable file hashing and allow caching of build dependency metadata. Add the follow lines to the project’s root SConscript file:

Decider('MD5-timestamp') SetOption('implicit_cache', 1)

These settings are described on the scons gofast page.

By default, scons uses GCC to compile. To use an alternate compiler, such as CLang, use the cxx option:

./scons.py -j<number_of_processors_to_use> cxx=clang

To use an alternate version of the compiler, you can use the option cxx_ver option with whatever version you have (here 4.5):

./scons.py -j<number_of_processors_to_use> cxx=clang cxx_ver=4.5

For more build options, such as only compiling only one executable or apbs - Please take a look at the SConstruct File in main/source

If you get an error like /usr/bin/ld: cannot find -lz, SCons may be looking for 32 bit libraries on a 64 bit machine. Look up how to install the missing dependency; in this case sudo apt-get install lib32z1-dev installs the required library.

本站由齐鲁工业大学网络信息中心支持创办,由网络运维部进行维护。

齐鲁工业大学网络信息中心网络运维部,负责办公区与教学区的网络设施维护、以及学校教育网的建设保障工作。

本站相关源码可在 这里获取。

本站基于清华大学TUNA开源的mirror-webtunasync项目,感谢TUNA为国内开源生态作出的伟大贡献

Contact Us

Powered By

resp

本镜像服务器由国家超级计算济南中心
山河超级计算平台强力驱动。

本站由齐鲁工业大学网络信息中心支持创办,由网络运维部进行维护。

齐鲁工业大学网络信息中心网络运维部,负责办公区与教学区的网络设施维护、以及学校教育网的建设保障工作。

本站相关源码可在 这里获取。

本站基于清华大学TUNA开源的mirror-webtunasync项目,感谢TUNA为国内开源生态作出的伟大贡献

Contact Us

Powered By

resp

本镜像服务器由国家超级计算济南中心
山河超级计算平台强力驱动。

github