Skip to content

cmontemuino/mlcoalsim-v2

 
 

Repository files navigation

mlcoalsim-v2

Quick Start

This project requires both OpenMPI and CMake.

If you are running on Mac OSX and you happen to use Homebrew, then you might want to check a custom for installing OpenMPI here.

Enabling MPI in the IDE

If you open the project with a contextual IDE, for example CLion, then you will notice that all the code related to MPI will not be "clickable". One way to resolve this is by setting the environment variable WITH_MPI. You just need to provide whatever value to it.

Note: what I do is setting the environment variable inside the IDE, so that I do not have problems with building the project (Preferences -> Build, Execution, Deployment -> CMake -> Environment: WITH_MPI=1 ZNS_ACTIVE=1).

How to Build

Please refer to the maskfile.md file that contains a section for building the project.

How to Run the Examples

Several examples are provided in the examples folder. You can run most of them in the following way:

mpirun -np 4 build/mlcoalsimXmpi_ZnS  examples/example00/Example1locus_1pop_mhit0_rec100.txt build/Example1locus_1pop_mhit0_rec100.out

# Without MPI:
# build/mlcoalsimX  examples/example00/Example1locus_1pop_mhit0_rec100.txt build/Example1locus_1pop_mhit0_rec100.out

In the case of the example01 and example10, where a "prior" file is being used, you need to switch the directory first. For example:

pushd examples/example10
mpirun -np 4 ../../build/mlcoalsimXmpi  Example10loci.txt ../../build/Example10loci.out
popd

Other examples you might want to run:

  • build/mlcoalsimX examples/example00/Example1locus_1pop_mhit0_rec100.txt build/Example1locus_1pop_mhit0_rec100.out
  • mpirun -np 4 build/mlcoalsimXmpi examples/example00/Example1locus_1pop_mhit0_rec100.txt build/Example1locus_1pop_mhit0_rec100.out
  • build/mlcoalsimX_ZnS examples/example00/Example1locus_1pop_mhit0_rec100_S20_n100.txt build/Example1locus_1pop_mhit0_rec100_S20_n100.out
  • mpirun -np 4 build/mlcoalsimXmpi_ZnS examples/example00/Example1locus_1pop_mhit0_rec100_S20_n100.txt build/Example1locus_1pop_mhit0_rec100_S20_n100.out

How to Verify the Results

Please refer to the validation section in maskfile.md file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 98.2%
  • Other 1.8%