planc
Parallel Lowrank Approximation with Non-negativity Constraints
parsecommandline.h
Go to the documentation of this file.
1 /* Copyright Ramakrishnan Kannan 2017 */
2 
3 #ifndef COMMON_PARSECOMMANDLINE_H_
4 #define COMMON_PARSECOMMANDLINE_H_
5 
6 #include <getopt.h>
7 #include "common/utils.h"
8 
9 // usage scenarios
10 // NMFLibrary algotype lowrank AfileName numIteration
11 // NMFLibrary algotype lowrank m n numIteration
12 // NMFLibrary algotype lowrank Afile WInitfile HInitfile numIteration
13 // NMFLibrary algotype lowrank Afile WInitfile HInitfile WoutputFile HoutputFile
14 // numIteration #define WINITFLAG 1000 #define HINITFLAG 1001 #define REGWFLAG
15 // 1002 #define REGHFLAG 1003
16 
17 // distnmf related defines
18 // #define PROCROWS 2002
19 // #define PROCCOLS 2003
20 #define NUMKBLOCKS 2004
21 #define NORMALIZATION 2005
22 #define DIMTREE 2006
23 
24 // enum factorizationtype{FT_NMF, FT_DISTNMF, FT_NTF, FT_DISTNTF};
25 
26 // struct option nmfopts[] = {
27 // {"input", required_argument, 0, 'i'},
28 // {"algo", required_argument, 0, 'a'},
29 // {"lowrank", optional_argument, 0, 'k'},
30 // {"iter", optional_argument, 0, 't'},
31 // {"rows", optional_argument, 0, 'm'},
32 // {"columns", optional_argument, 0, 'n'},
33 // {"winit", optional_argument, 0, WINITFLAG},
34 // {"hinit", optional_argument, 0, HINITFLAG},
35 // {"wout", optional_argument, 0, 'w'},
36 // {"hout", optional_argument, 0, 'h'},
37 // {"regw", optional_argument, 0, REGWFLAG},
38 // {"regh", optional_argument, 0, REGHFLAG},
39 // {0, 0, 0, 0 }
40 // };
41 
42 // usage scenarios
43 // mpirun -np 12 distnmf algotype lowrank AfileName numIteration pr pc
44 // mpirun -np 12 distnmf algotype lowrank m n numIteration pr pc
45 // mpirun -np 12 distnmf algotype lowrank Afile outputfile numIteration pr pc
46 
47 // we are not supporting initfiles for distnmf.
48 // consistent initializations will be distIO
49 // struct option distnmfopts[] = {
50 // {"input", required_argument, 0, 'i'},
51 // {"algo", required_argument, 0, 'a'},
52 // {"error", optional_argument, 0, 'e'},
53 // {"lowrank", required_argument, 0, 'k'},
54 // {"iter", optional_argument, 0, 't'},
55 // {"rows", optional_argument, 0, 'm'},
56 // {"columns", optional_argument, 0, 'n'},
57 // {"output", optional_argument, 0, 'o'},
58 // {"sparsity", optional_argument, 0, 's'},
59 // {"pr", optional_argument, 0, PROCROWS},
60 // {"pc", optional_argument, 0, PROCCOLS},
61 // {"regw", optional_argument, 0, REGWFLAG},
62 // {"regh", optional_argument, 0, REGHFLAG},
63 // {"numkblocks", optional_argument, 0, NUMKBLOCKS},
64 // {0, 0, 0, 0 }
65 // };
66 
67 // usage scenarios
68 // mpirun -np 12 distnmf algotype lowrank AfileName numIteration pr pc
69 // mpirun -np 12 distnmf algotype lowrank m n numIteration pr pc
70 // mpirun -np 12 distnmf algotype lowrank Afile outputfile numIteration pr pc
71 
72 struct option plancopts[] = {
73  {"algo", optional_argument, 0, 'a'},
74  {"dimensions", required_argument, 0, 'd'},
75  {"error", optional_argument, 0, 'e'},
76  {"input", required_argument, 0, 'i'},
77  {"lowrank", required_argument, 0, 'k'},
78  {"output", optional_argument, 0, 'o'},
79  {"processors", optional_argument, 0, 'p'},
80  {"regularizer", optional_argument, 0, 'r'},
81  {"sparsity", optional_argument, 0, 's'},
82  {"iter", optional_argument, 0, 't'},
83  {"numkblocks", optional_argument, 0, NUMKBLOCKS},
84  {"normalization", optional_argument, 0, NORMALIZATION},
85  {"dimtree", optional_argument, 0, DIMTREE},
86  {0, 0, 0, 0}};
87 
88 #endif // COMMON_PARSECOMMANDLINE_H_
89 
#define NUMKBLOCKS
#define DIMTREE
struct option plancopts[]
#define NORMALIZATION