Skip to content

Commit 39bafe6

Browse files
Changed optimization settings for FreeRate parameters
1 parent 605ec85 commit 39bafe6

7 files changed

Lines changed: 79 additions & 69 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ AUTOMAKE = ${SHELL} '/Users/guindon/phyml/missing' automake-1.16
209209
AWK = awk
210210
CC = gcc
211211
CCDEPMODE = depmode=gcc3
212-
CFLAGS = -march=native -Wall -std=c99 -g
212+
CFLAGS = -std=gnu99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native
213213
CPPFLAGS =
214214
CSCOPE = cscope
215215
CTAGS = ctags

config.log

Lines changed: 35 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ running configure, to aid debugging if configure makes a mistake.
44
It was created by PhyML configure 3.3.20250429, which was
55
generated by GNU Autoconf 2.71. Invocation command line was
66

7-
$ ./configure --enable-debug --no-create --no-recursion
7+
$ ./configure
88

99
## --------- ##
1010
## Platform. ##
1111
## --------- ##
1212

13-
hostname = Mac
13+
hostname = guindon.lirmm.fr
1414
uname -m = arm64
1515
uname -r = 24.3.0
1616
uname -s = Darwin
@@ -30,16 +30,12 @@ Kernel configured for up to 8 processors.
3030
Processor type: arm64e (ARM64E)
3131
Processors active: 0 1 2 3 4 5 6 7
3232
Primary memory available: 8.00 gigabytes
33-
Default processor set: 477 tasks, 2534 threads, 8 processors
34-
Load average: 2.33, Mach factor: 5.66
33+
Default processor set: 410 tasks, 2472 threads, 8 processors
34+
Load average: 3.15, Mach factor: 4.84
3535
/bin/machine = unknown
3636
/usr/bin/oslevel = unknown
3737
/bin/universe = unknown
3838

39-
PATH: /Users/guindon/anaconda3/bin/
40-
PATH: /Users/guindon/anaconda3/condabin/
41-
PATH: /Users/guindon/anaconda3/bin/
42-
PATH: /Users/guindon/anaconda3/bin/
4339
PATH: /opt/local/bin/
4440
PATH: /opt/local/sbin/
4541
PATH: /opt/homebrew/bin/
@@ -57,6 +53,11 @@ PATH: /opt/X11/bin/
5753
PATH: /Library/Apple/usr/bin/
5854
PATH: /Library/TeX/texbin/
5955
PATH: /usr/local/ncbi/blast/bin/
56+
PATH: /Users/guindon/anaconda3/bin/
57+
PATH: /Users/guindon/anaconda3/condabin/
58+
PATH: /opt/local/bin/
59+
PATH: /opt/local/sbin/
60+
PATH: /Users/guindon/.vscode/extensions/ms-python.debugpy-2025.6.0-darwin-arm64/bundled/scripts/noConfigScripts/
6061

6162

6263
## ----------- ##
@@ -385,6 +386,31 @@ configure:5248: checking that generated files are newer than configure
385386
configure:5254: result: done
386387
configure:5325: creating ./config.status
387388

389+
## ---------------------- ##
390+
## Running config.status. ##
391+
## ---------------------- ##
392+
393+
This file was extended by PhyML config.status 3.3.20250429, which was
394+
generated by GNU Autoconf 2.71. Invocation command line was
395+
396+
CONFIG_FILES =
397+
CONFIG_HEADERS =
398+
CONFIG_LINKS =
399+
CONFIG_COMMANDS =
400+
$ ./config.status
401+
402+
on guindon.lirmm.fr
403+
404+
config.status:899: creating Makefile
405+
config.status:899: creating src/Makefile
406+
config.status:899: creating doc/Makefile
407+
config.status:899: creating config.h
408+
config.status:1080: config.h is unchanged
409+
config.status:1128: executing depfiles commands
410+
config.status:1205: cd src && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles
411+
make: Nothing to be done for `am--depfiles'.
412+
config.status:1210: $? = 0
413+
388414
## ---------------- ##
389415
## Cache variables. ##
390416
## ---------------- ##
@@ -465,7 +491,7 @@ AUTOMAKE='${SHELL} '\''/Users/guindon/phyml/missing'\'' automake-1.16'
465491
AWK='awk'
466492
CC='gcc'
467493
CCDEPMODE='depmode=gcc3'
468-
CFLAGS='-march=native -Wall -std=c99 -g'
494+
CFLAGS='-std=gnu99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native'
469495
CPPFLAGS=''
470496
CSCOPE='cscope'
471497
CTAGS='ctags'
@@ -617,44 +643,3 @@ target_alias=''
617643
#define PHYML 1
618644

619645
configure: exit 0
620-
621-
## ---------------------- ##
622-
## Running config.status. ##
623-
## ---------------------- ##
624-
625-
This file was extended by PhyML config.status 3.3.20250429, which was
626-
generated by GNU Autoconf 2.71. Invocation command line was
627-
628-
CONFIG_FILES =
629-
CONFIG_HEADERS =
630-
CONFIG_LINKS =
631-
CONFIG_COMMANDS =
632-
$ ./config.status
633-
634-
on Mac
635-
636-
config.status:899: creating Makefile
637-
config.status:899: creating src/Makefile
638-
config.status:899: creating doc/Makefile
639-
config.status:899: creating config.h
640-
config.status:1128: executing depfiles commands
641-
config.status:1205: cd src && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles
642-
make[1]: Nothing to be done for `am--depfiles'.
643-
config.status:1210: $? = 0
644-
645-
## ---------------------- ##
646-
## Running config.status. ##
647-
## ---------------------- ##
648-
649-
This file was extended by PhyML config.status 3.3.20250429, which was
650-
generated by GNU Autoconf 2.71. Invocation command line was
651-
652-
CONFIG_FILES =
653-
CONFIG_HEADERS =
654-
CONFIG_LINKS =
655-
CONFIG_COMMANDS =
656-
$ ./config.status config.h
657-
658-
on Mac
659-
660-
config.status:899: creating config.h

config.status

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ $config_commands
420420
421421
Report bugs to <stephane.guindon@lirmm.fr>."
422422

423-
ac_cs_config='--enable-debug'
423+
ac_cs_config=''
424424
ac_cs_version="\
425425
PhyML config.status 3.3.20250429
426426
configured by ./configure, generated by GNU Autoconf 2.71,
@@ -512,7 +512,7 @@ if $ac_cs_silent; then
512512
fi
513513

514514
if $ac_cs_recheck; then
515-
set X /bin/sh './configure' '--enable-debug' $ac_configure_extra_args --no-create --no-recursion
515+
set X /bin/sh './configure' $ac_configure_extra_args --no-create --no-recursion
516516
shift
517517
\printf "%s\n" "running CONFIG_SHELL=/bin/sh $*" >&6
518518
CONFIG_SHELL='/bin/sh'
@@ -655,7 +655,7 @@ S["EXEEXT"]=""
655655
S["ac_ct_CC"]="gcc"
656656
S["CPPFLAGS"]=""
657657
S["LDFLAGS"]=""
658-
S["CFLAGS"]="-march=native -Wall -std=c99 -g"
658+
S["CFLAGS"]="-std=gnu99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native"
659659
S["CC"]="gcc"
660660
S["host_os"]="darwin24.3.0"
661661
S["host_vendor"]="apple"

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ AUTOMAKE = ${SHELL} '/Users/guindon/phyml/missing' automake-1.16
162162
AWK = awk
163163
CC = gcc
164164
CCDEPMODE = depmode=gcc3
165-
CFLAGS = -march=native -Wall -std=c99 -g
165+
CFLAGS = -std=gnu99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native
166166
CPPFLAGS =
167167
CSCOPE = cscope
168168
CTAGS = ctags

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ AUTOMAKE = ${SHELL} '/Users/guindon/phyml/missing' automake-1.16
638638
AWK = awk
639639
CC = gcc
640640
CCDEPMODE = depmode=gcc3
641-
CFLAGS = -march=native -Wall -std=c99 -g
641+
CFLAGS = -std=gnu99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native
642642
CPPFLAGS =
643643
CSCOPE = cscope
644644
CTAGS = ctags

src/mixt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4291,14 +4291,14 @@ void MIXT_Kfold_Pos_Cv(t_tree *mixt_tree)
42914291
weights = NULL;
42924292
tree = NULL;
42934293

4294-
// kfold = 5;
4295-
kfold = 1;
4294+
kfold = 5;
4295+
// kfold = 1;
42964296
n_prob_vectors = 0;
42974297

42984298
do
42994299
{
4300-
// for (int i = 0; i < kfold*5; ++i)
4301-
for (int i = 0; i < kfold * 1; ++i)
4300+
for (int i = 0; i < kfold*5; ++i)
4301+
// for (int i = 0; i < kfold * 1; ++i)
43024302
{
43034303
// Create a copy of the original alignment
43044304
c_seq_cpy = Copy_Cseq(mixt_tree->data, mixt_tree->io, mixt_tree);

src/optimiz.c

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,8 +3102,6 @@ void Optimize_Free_Rate(t_tree *mixt_tree, int verbose)
31023102
phydbl lk_before, lk_after;
31033103
tree = mixt_tree;
31043104

3105-
/* PhyML_Printf("\n. Optimizing Free_Rate --> %f",mixt_tree->next->a_edges[0]->l->v); */
3106-
31073105
lk_before = lk_after = UNLIKELY;
31083106

31093107
do
@@ -3119,7 +3117,27 @@ void Optimize_Free_Rate(t_tree *mixt_tree, int verbose)
31193117
Optimize_Free_Rate_Rr(tree,fast,verbose);
31203118
lk_after = mixt_tree->c_lnL;
31213119

3122-
if(lk_after < lk_before - tree->mod->s_opt->min_diff_lk_global)
3120+
3121+
if (lk_after < lk_before - tree->mod->s_opt->min_diff_lk_global)
3122+
{
3123+
PhyML_Fprintf(stderr, "\n. lk_before: %f lk_after: %f diff: %G",
3124+
lk_before, lk_after, lk_before - lk_after);
3125+
PhyML_Fprintf(stderr, "\n. Err. in file %s at line %d\n",
3126+
__FILE__, __LINE__);
3127+
Exit("");
3128+
}
3129+
}
3130+
else
3131+
{
3132+
fast = YES;
3133+
lk_before = mixt_tree->c_lnL;
3134+
Optimize_Free_Rate_Weights(tree,fast,verbose);
3135+
lk_after = mixt_tree->c_lnL;
3136+
Optimize_Free_Rate_Rr(tree,fast,verbose);
3137+
lk_after = mixt_tree->c_lnL;
3138+
3139+
3140+
if (lk_after < lk_before - tree->mod->s_opt->min_diff_lk_global)
31233141
{
31243142
PhyML_Fprintf(stderr,"\n. lk_before: %f lk_after: %f diff: %G",lk_before,lk_after,lk_before-lk_after);
31253143
PhyML_Fprintf(stderr,"\n. Err. in file %s at line %d\n",__FILE__,__LINE__);
@@ -3230,8 +3248,10 @@ void Optimize_Free_Rate_Rr(t_tree *tree, int fast, int verbose)
32303248
{
32313249
phydbl a,c;
32323250

3233-
a = tree->mod->ras->gamma_rr_unscaled->v[i] - 2.0;
3234-
c = tree->mod->ras->gamma_rr_unscaled->v[i] + 2.0;
3251+
// a = tree->mod->ras->gamma_rr_unscaled->v[i] - 2.0;
3252+
// c = tree->mod->ras->gamma_rr_unscaled->v[i] + 2.0;
3253+
a = - 2.0;
3254+
c = + 2.0;
32353255

32363256
Generic_Brent_Lk(&(tree->mod->ras->gamma_rr_unscaled->v[i]),
32373257
a,c,
@@ -3258,8 +3278,10 @@ void Optimize_Free_Rate_Rr(t_tree *tree, int fast, int verbose)
32583278
{
32593279
phydbl a,c;
32603280

3261-
a = tree->mod->ras->gamma_rr_unscaled->v[i] - 2.0;
3262-
c = tree->mod->ras->gamma_rr_unscaled->v[i] + 2.0;
3281+
// a = tree->mod->ras->gamma_rr_unscaled->v[i] - 2.0;
3282+
// c = tree->mod->ras->gamma_rr_unscaled->v[i] + 2.0;
3283+
a = - 2.0;
3284+
c = + 2.0;
32633285

32643286
Generic_Brent_Lk(&(tree->mod->ras->gamma_rr_unscaled->v[i]),
32653287
a,c,
@@ -3302,8 +3324,10 @@ void Optimize_Free_Rate_Weights(t_tree *tree, int fast, int verbose)
33023324
{
33033325
phydbl a,c;
33043326

3305-
a = tree->mod->ras->gamma_r_proba_unscaled->v[i] - 2.0;
3306-
c = tree->mod->ras->gamma_r_proba_unscaled->v[i] + 2.0;
3327+
// a = tree->mod->ras->gamma_r_proba_unscaled->v[i] - 2.0;
3328+
// c = tree->mod->ras->gamma_r_proba_unscaled->v[i] + 2.0;
3329+
a = - 2.0;
3330+
c = + 2.0;
33073331

33083332
Generic_Brent_Lk(&(tree->mod->ras->gamma_r_proba_unscaled->v[i]),
33093333
a,c,
@@ -3312,6 +3336,7 @@ void Optimize_Free_Rate_Weights(t_tree *tree, int fast, int verbose)
33123336
tree->mod->s_opt->quickdirty,
33133337
Wrap_Lk,NULL,tree,NULL,NO,NO);
33143338

3339+
33153340
if(fast == YES)
33163341
{
33173342
wm = Weighted_Mean(tree->mod->ras->gamma_rr->v,

0 commit comments

Comments
 (0)