Answers.Body: <p>The machine is important because of the introduction of M1 type chips which will run GPU.</p>
  <p>From historical use of beast1 the following will work ...</p>
  <pre><code>beast -overwrite -beagle_auto -seed 2001 mydata.xml &gt; myfile.runtime.log
  </code></pre>
  <p>This will parallelise happily within the number of processors available. I would recommend it. This is because it may not parallelise across 144 CPUs. It depends on the machine architecture. Also from memory (mine not RAM) it dynamically readjusts, so even if it was 144 CPUs parallelised when another job lands on a CPU that drops to 143 CPUs for beast1.</p>
  <p>Anyway, I use the Cloud so I no longer keep up with computer architecture.</p>
  <p>If this floods 144 processors and there's no dynamic readjustment I would suggest,</p>
  <pre><code> beast -beagle -beagle_SSE -beagle_CPU -threads 10 -overwrite mydata.xml &gt; myfile.runtime.log
  </code></pre>
  <p>I would limit the number of threads to get it working before considering e.g. 40.</p>
  <p>However, shifting to GPU is strongly recommended, this will solve any beast2 issues and its very fast. However, I don't know about beast1 for GPU, I've never used it for that.</p>
  <hr />
  <p>If none of the above work and you've not get any sort of M1 or higher chip (to move to GPU) then you need to look at the error log, especially if you see this error.</p>
  <blockquote>
  <p>Error 122 parsing the xml input file
  Cannot create class: ThreadedTreeLikelihood.</p>
  </blockquote>
  <hr />
  <p><strong>Note</strong> although you've got a nice CPU heavy machine, simple fairly modern Mac will do the same operation probably quicker via GPU, at least for beast2, beast1 I dunno</p>
  <hr />
  <p>Just to note I'm acting in solidarity with an SE strike until an internal matter is resolved about ChatGPT and requested a meeting with staff to explain why. I've formally notified SE. I'll be answering very select questions and doing only essential admin  (breaches of CoC and spam). Hopefully all is back to normal shortly.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-27T10:02:41.543Z
Answers.Text: Thanks! Unfortunately I couldn't get either to work (the first suggestion doesn't run at all), however, I followed your general advice to use more/different resources to speed up beast worked for me.
Answers.UserDisplayName: flaszlok
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-13T17:02:40.013Z
Answers.LastActivityDate: 2023-06-13T23:53:49.743Z
Answers.LastEditDate: 2023-06-13T23:53:49.743Z
Answers.UserDisplayName: M__
Body: <p>I'm running <strong>BEAST v1.10.4</strong> with <strong>BEAGLE v4.0.0</strong>. My dataset has one large partition and I have access to a machine with many CPUs so I would like to optimize performance by parallelizing the process. Following the <a href="https://beast.community/performance" rel="nofollow noreferrer">documentation</a> and various (quite old and probably outdated) help Q&amp;A pages I tried</p>
  <pre><code>beast -beagle -beagle_CPU -beagle_instances X -beagle_thread_count Y -threads Z mydata.xml
  </code></pre>
  <p>with different values for XYZ but BEAST is ever only using a single CPU regardless.</p>
  <p><strong>How do I make BEAST use on more than one CPU?</strong></p>
  <p>We have a 'server' in-house, that is essentially a big computer with 144 CPUs that is shared by all users. That's why it would be important to limit the max amount of threads with the -threads option. No queuing system, no GPUs. I want to do some tip date sampling which afaik is not available in Beast2.</p>
  
Tags: <phylogenetics><phylogeny><beast>
Title: How to parallelize BEAST
ThreadText: # How to parallelize BEAST
  
  (Asked by: username_0 on 2023-06-13)
  
  I'm running **BEAST v1.10.4** with **BEAGLE v4.0.0**. My dataset has one large partition and I have access to a machine with many CPUs so I would like to optimize performance by parallelizing the process. Following the [documentation](https://beast.community/performance) and various (quite old and probably outdated) help Q&A pages I tried
  
  ```
  beast -beagle -beagle_CPU -beagle_instances X -beagle_thread_count Y -threads Z mydata.xml
  
  ```
  
  with different values for XYZ but BEAST is ever only using a single CPU regardless.
  
  **How do I make BEAST use on more than one CPU?**
  
  We have a 'server' in-house, that is essentially a big computer with 144 CPUs that is shared by all users. That's why it would be important to limit the max amount of threads with the -threads option. No queuing system, no GPUs. I want to do some tip date sampling which afaik is not available in Beast2.
  
  **Tags:** phylogenetics, phylogeny, beast
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-06-13. Score: 1 | Accepted answer
  
  The machine is important because of the introduction of M1 type chips which will run GPU.
  
  From historical use of beast1 the following will work ...
  
  ```
  beast -overwrite -beagle_auto -seed 2001 mydata.xml > myfile.runtime.log
  
  ```
  
  This will parallelise happily within the number of processors available. I would recommend it. This is because it may not parallelise across 144 CPUs. It depends on the machine architecture. Also from memory (mine not RAM) it dynamically readjusts, so even if it was 144 CPUs parallelised when another job lands on a CPU that drops to 143 CPUs for beast1.
  
  Anyway, I use the Cloud so I no longer keep up with computer architecture.
  
  If this floods 144 processors and there's no dynamic readjustment I would suggest,
  
  ```
   beast -beagle -beagle_SSE -beagle_CPU -threads 10 -overwrite mydata.xml > myfile.runtime.log
  
  ```
  
  I would limit the number of threads to get it working before considering e.g. 40.
  
  However, shifting to GPU is strongly recommended, this will solve any beast2 issues and its very fast. However, I don't know about beast1 for GPU, I've never used it for that.
  
  ---
  
  If none of the above work and you've not get any sort of M1 or higher chip (to move to GPU) then you need to look at the error log, especially if you see this error.
  
  > Error 122 parsing the xml input file
  > Cannot create class: ThreadedTreeLikelihood.
  
  ---
  
  **Note** although you've got a nice CPU heavy machine, simple fairly modern Mac will do the same operation probably quicker via GPU, at least for beast2, beast1 I dunno
  
  ---
  
  Just to note I'm acting in solidarity with an SE strike until an internal matter is resolved about ChatGPT and requested a meeting with staff to explain why. I've formally notified SE. I'll be answering very select questions and doing only essential admin (breaches of CoC and spam). Hopefully all is back to normal shortly.
  
  > **Comments:**
  > **username_0**: Thanks! Unfortunately I couldn't get either to work (the first suggestion doesn't run at all), however, I followed your general advice to use more/different resources to speed up beast worked for me.  
  
  ---
  
  