Browse code

2.17.4

ramon diaz-uriarte (at Phelsuma) authored on 19/12/2019 08:27:20
Showing11 changed files

... ...
@@ -1,8 +1,8 @@
1 1
 Package: OncoSimulR
2 2
 Type: Package
3 3
 Title: Forward Genetic Simulation of Cancer Progression with Epistasis 
4
-Version: 2.17.3
5
-Date: 2019-12-17
4
+Version: 2.17.4
5
+Date: 2019-12-19
6 6
 Authors@R: c(person("Ramon", "Diaz-Uriarte", role = c("aut", "cre"),
7 7
 		     email = "rdiaz02@gmail.com"),
8 8
 	      person("Mark", "Taylor", role = "ctb", email = "ningkiling@gmail.com"))
... ...
@@ -1,3 +1,6 @@
1
+Changes in version 2.17.4 (2019-12-19):
2
+	- fno-common: better way of dealing with verbose in magellan.
3
+
1 4
 Changes in version 2.17.3 (2019-12-17):
2 5
 	- Compiles with fno-common (for gcc 10).
3 6
 	
... ...
@@ -14,7 +14,8 @@
14 14
 
15 15
 #define DEFAULT_FITNESS -99999999999
16 16
 
17
-extern char verbose;   /* if set to non-0 , become verbose */
17
+/* extern char verbose; */
18
+/* if set to non-0 , become verbose */
18 19
 
19 20
 
20 21
 /*
... ...
@@ -13,7 +13,7 @@
13 13
 #include "random.h"
14 14
 #include "summary_statistics.h"
15 15
 #include "models.h"
16
-
16
+#include "verbose.h"
17 17
 
18 18
 
19 19
 
... ...
@@ -95,7 +95,7 @@ int main( int argc, char ** argv ){
95 95
 	int i;
96 96
 
97 97
 	/* extern char verbose; */                  /* level of verbosity */
98
-	char verbose;    
98
+	/* char verbose;     */
99 99
 	
100 100
 	int opt;
101 101
 	extern char *optarg;                /* external variables, see man 3 getopt */
... ...
@@ -11,6 +11,8 @@
11 11
 
12 12
 #include "calculus.h"
13 13
 
14
+#include "verbose.h"
15
+
14 16
 #define DATE "18 NOV 2013"
15 17
 
16 18
 
... ...
@@ -58,8 +60,9 @@ int main( int argc, char ** argv ){
58 60
 	char *outfile=NULL;
59 61
 
60 62
 	/* prevent confusion with the other extern verbose */
61
-	char verbose_fl_stats=0;
62
-
63
+	/* char verbose_fl_stats=0; */
64
+	verbose = 0;
65
+	
63 66
 	/*
64 67
 		Parse Input
65 68
 	*/
... ...
@@ -86,7 +89,8 @@ int main( int argc, char ** argv ){
86 89
 				break;
87 90
 				
88 91
 			case 'v':
89
-				verbose_fl_stats=1;
92
+				/* verbose_fl_stats=1; */
93
+				verbose=1;				
90 94
 				break;
91 95
 				
92 96
 			case 's':
... ...
@@ -116,7 +120,8 @@ int main( int argc, char ** argv ){
116 120
 	
117 121
 	h = ReadFile( filename, opt_zero );
118 122
 	
119
-	if(verbose_fl_stats)
123
+	/* if(verbose_fl_stats) */
124
+	if(verbose)	  
120 125
 		print_landscape( &h );
121 126
 	
122 127
 	OutputSummaryStats( &h, FitnessRatio, opt_log, opt_short, "coco", outfile );
... ...
@@ -9,8 +9,7 @@
9 9
 #include "genotypes.h"
10 10
 #include "summary_statistics.h"
11 11
 #include "models.h"
12
-
13
-/* extern char verbose; */
12
+#include "verbose.h"
14 13
 
15 14
 
16 15
 /*
... ...
@@ -21,7 +20,7 @@
21 20
 */
22 21
 
23 22
 void HouseOfCards( struct landscape *l, float sigma){
24
-  char verbose;
23
+  /* extern char verbose; */
25 24
 	int i;
26 25
 	
27 26
 	if( sigma <= 0 )
... ...
@@ -56,7 +55,7 @@ void HouseOfCards( struct landscape *l, float sigma){
56 55
 void Multiplicative( struct landscape *l , double s, double stdev, int  opt_single_fitness, float DimRet,  char opt_log )
57 56
 {
58 57
 
59
-  char verbose;
58
+  /* extern char verbose; */
60 59
 	int *genotype=NULL;
61 60
 	float *fa;  
62 61
 	
... ...
@@ -167,7 +166,7 @@ void Multiplicative( struct landscape *l , double s, double stdev, int  opt_sing
167 166
 void Optimum( struct landscape *l , double mean_p, double sigma_p, double mean_o, double sigma_o )
168 167
 {
169 168
 
170
-  char verbose;
169
+  /* extern char verbose; */
171 170
 	int *genotype=NULL;
172 171
 	float *fa;  
173 172
 	
... ...
@@ -268,7 +267,7 @@ void Optimum( struct landscape *l , double mean_p, double sigma_p, double mean_o
268 267
 void Kaufman_NK( struct landscape *l,  int K, short random ){
269 268
 
270 269
 
271
-	char verbose;
270
+	/* extern char verbose; */
272 271
 
273 272
 	int i,j, g;
274 273
 	
... ...
@@ -428,7 +427,7 @@ void Kaufman_NK( struct landscape *l,  int K, short random ){
428 427
 */
429 428
 void Ising( struct landscape *l, float mu_c, float sigma_c, short opt_circ )
430 429
 {
431
-  char verbose;
430
+  /* extern char verbose; */
432 431
 	int i,g;
433 432
 	
434 433
 	float *costs;
... ...
@@ -571,7 +570,7 @@ void MixedModel( struct landscape *fl, struct model_opt myoptions, int opt_log )
571 570
 
572 571
 
573 572
 	struct landscape fl_tmp;
574
-	char verbose;
573
+	/* extern char verbose; */
575 574
 
576 575
 	
577 576
 	int g;
... ...
@@ -10,7 +10,7 @@
10 10
 
11 11
 
12 12
 
13
-extern char verbose;
13
+/* extern char verbose; */
14 14
 
15 15
 
16 16
 
17 17
new file mode 100644
... ...
@@ -0,0 +1,2 @@
1
+#include "verbose.h"
2
+char verbose = 0;
0 3
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+#ifndef _VERBOSE_H_
2
+#define _VERBOSE_H_
3
+
4
+extern char verbose;
5
+
6
+#endif
... ...
@@ -35,7 +35,8 @@ MAGELLAN_SRC = FitnessLandscape/gamma.c\
35 35
         FitnessLandscape/summary_statistics.c\
36 36
         FitnessLandscape/epistasis_type.c\
37 37
         FitnessLandscape/decomposition.c\
38
-        FitnessLandscape/models.c
38
+        FitnessLandscape/models.c\
39
+	FitnessLandscape/verbose.c
39 40
 #        FitnessLandscape/common_drawings.c\ ## I do not use it and gives a warning
40 41
 MAGELLAN_OBJECTS = $(MAGELLAN_SRC:.c=.o)
41 42
 
... ...
@@ -1,15 +1,15 @@
1 1
 \usepackage[%
2
-		shash={a6c95a3},
3
-		lhash={a6c95a3f05c9d32bbdb27c5634bfc9d5dad7a776},
2
+		shash={e7b549e},
3
+		lhash={e7b549e2d6e2de8a97e3169a5622b598dcfa7250},
4 4
 		authname={ramon diaz-uriarte (at Phelsuma)},
5 5
 		authemail={rdiaz02@gmail.com},
6
-		authsdate={2019-12-17},
7
-		authidate={2019-12-17 13:12:29 +0100},
8
-		authudate={1576584749},
6
+		authsdate={2019-12-19},
7
+		authidate={2019-12-19 09:14:58 +0100},
8
+		authudate={1576743298},
9 9
 		commname={ramon diaz-uriarte (at Phelsuma)},
10 10
 		commemail={rdiaz02@gmail.com},
11
-		commsdate={2019-12-17},
12
-		commidate={2019-12-17 13:12:29 +0100},
13
-		commudate={1576584749},
14
-		refnames={ (HEAD -> master)}
11
+		commsdate={2019-12-19},
12
+		commidate={2019-12-19 09:14:58 +0100},
13
+		commudate={1576743298},
14
+		refnames={ (HEAD -> master, verbose)}
15 15
 	]{gitsetinfo}
16 16
\ No newline at end of file