Skip to content

Commit

Permalink
buf fix for scale always
Browse files Browse the repository at this point in the history
  • Loading branch information
ayresdl committed Nov 14, 2018
1 parent e859dd3 commit 8b8b03e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/mcmc-nucleotide-medium.nex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ charset 3rd_pos = 3-18792\3;
partition by_codon = 3:1st_pos,2nd_pos,3rd_pos;
[partition by_codon = 10:1st_pos,2nd_pos,3rd_pos,4th_pos,5th_pos,6th_pos,7th_pos,8th_pos,9th_pos,10th_pos;]

[set partition=by_codon;]
set partition=by_codon;

lset applyto=(all) nst=6 rates=invgamma;

Expand All @@ -47,6 +47,6 @@ set seed=1 swapseed=1;

[mcmc ngen=50000 nruns=1 nchains=1;]
[mcmc ngen=492 nruns=1 nchains=1 printFreq=1;]
mcmc ngen=5000 nruns=1 nchains=1 printFreq=1000;
mcmc ngen=1 nruns=1 nchains=1 printFreq=1000;

end;
2 changes: 1 addition & 1 deletion src/bayes.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#if defined (BEAGLE_ENABLED)
#include "libhmsbeagle/beagle.h"
#define BEAGLE_LEVELPASS_ENABLED /* define to send operations to BEAGLE in reverse level order */
#undef BEAGLE_LEVELPASS_ENABLED /* define to send operations to BEAGLE in reverse level order */
#endif

/* uncomment the following line when releasing, also modify the VERSION_NUMBER below */
Expand Down
5 changes: 4 additions & 1 deletion src/mbbeagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ int createBeagleInstance(ModelInfo *m, int nCijkParts, int numGammaCats, int num
preferredFlags = beagleFlags;
requiredFlags = 0L;

if (beagleScalingScheme == MB_BEAGLE_SCALE_ALWAYS) {
requiredFlags |= BEAGLE_FLAG_SCALERS_LOG; //BEAGLE_FLAG_SCALERS_RAW;
}

if (beagleResourceNumber >= 0 && beagleResourceNumber != 99)
{
resource = beagleResourceNumber;
Expand All @@ -212,7 +216,6 @@ int createBeagleInstance(ModelInfo *m, int nCijkParts, int numGammaCats, int num

long benchmarkFlags = BEAGLE_BENCHFLAG_SCALING_NONE;
if (beagleScalingScheme == MB_BEAGLE_SCALE_ALWAYS) {
requiredFlags |= BEAGLE_FLAG_SCALERS_LOG; //BEAGLE_FLAG_SCALERS_RAW;
benchmarkFlags = BEAGLE_BENCHFLAG_SCALING_ALWAYS;
} else if (beagleScalingScheme == MB_BEAGLE_SCALE_DYNAMIC) {
benchmarkFlags = BEAGLE_BENCHFLAG_SCALING_DYNAMIC;
Expand Down

0 comments on commit 8b8b03e

Please sign in to comment.