//==========================================================// AUTHOR : mohan// DATE : 2008年11月10日//==========================================================#include "source_main/driver.h"#include "fftw3.h"#include "source_base/parallel_global.h"#include "source_io/parse_args.h"#include "source_io/module_parameter/parameter.h"#include "source_base/version.h"#ifdef _OPENMP#include <omp.h>#endif#include <ctime>#include <iostream>namespace{void print_welcome_banner(){#ifdef VERSIONconst char* version = VERSION;#elseconst char* version = "unknown";#endif#ifdef COMMIT_INFO#include "commit.h"const char* commit = COMMIT;#elseconst char* commit = "unknown";#endifstd::cout << std::endl<< " ▄████▄ █████▄ ▄████▄ ▄█████ ██ ██ ▄█████ " << std::endl<< " ██▄▄██ ██▄▄██ ██▄▄██ ██ ██ ██ ▀▀▀▄▄▄ " << std::endl<< " ██ ██ ██▄▄█▀ ██ ██ ▀█████ ▀████▀ █████▀ " << std::endl<< std::endl;std::cout << " "<< std::endl<< " " << version << std::endl<< std::endl<< " Atomic-orbital Based Ab-initio Computation at UStc "<< std::endl<< std::endl<< " Website: http://abacus.ustc.edu.cn/ "<< std::endl<< " Documentation: https://abacus.deepmodeling.com/ "<< std::endl<< " Repository: https://github.com/abacusmodeling/abacus-develop "<< std::endl<< " https://github.com/deepmodeling/abacus-develop "<< std::endl<< " Commit: " << commit << std::endl<< std::endl;time_t time_now = time(nullptr);std::cout << " " << ctime(&time_now);}} // namespaceint main(int argc, char** argv){/*read the arguement in the command-line,with "abacus -v", the program exit and returns version info,with no arguments, the program continues.*/ModuleIO::parse_args(argc, argv);/*read the mpi parameters in the command-line,initialize the mpi environment.*/int nproc = 1;int my_rank = 0;int nthread_per_proc = 1;Parallel_Global::read_pal_param(argc, argv, nproc, nthread_per_proc, my_rank);if (my_rank == 0){print_welcome_banner();}#ifdef _OPENMP// ref: https://www.fftw.org/fftw3_doc/Usage-of-Multi_002dthreaded-FFTW.htmlfftw_init_threads();fftw_plan_with_nthreads(omp_get_max_threads());#endifPARAM.set_pal_param(my_rank, nproc, nthread_per_proc);/*main program for doing electronic structure calculations.*/Driver DD;DD.init();/*After running mpi version of abacus, release the mpi resources.*/#ifdef __MPIParallel_Global::finalize_mpi();#endif#ifdef _OPENMPfftw_cleanup_threads();#endifreturn 0;}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。