FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_main/main.cpp at develop · samomoyed/abacus-develop · GitHub
samomoyed
/
abacus-develop
Public
forked from
deepmodeling/abacus-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
abacus-develop
/
source
/
source_main
/
main.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
56 lines (50 loc) · 1.39 KB
Breadcrumbs
abacus-develop
/
source
/
source_main
/
main.cpp
Copy path
File metadata and controls
56 lines (50 loc) · 1.39 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
==========================================================
//
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
"
#
ifdef
_OPENMP
#
include
<
omp.h
>
#
endif
int
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);
#
ifdef
_OPENMP
//
ref: https://www.fftw.org/fftw3_doc/Usage-of-Multi_002dthreaded-FFTW.html
fftw_init_threads
();
fftw_plan_with_nthreads
(
omp_get_max_threads
());
#
endif
PARAM
.
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
__MPI
Parallel_Global::finalize_mpi
();
#
endif
#
ifdef
_OPENMP
fftw_cleanup_threads
();
#
endif
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL