Sign inSign up

robizzard/binary_c

By robizzard

•Updated over 3 years ago

binary_c : a single and binary-star population nucleosynthesis code

Image
0

666

robizzard/binary_c repository overview

Binary_c Version 2.2.3, including binary_c-python 0.9.6

The binary_c code, an enhanced C-port of the Binary Star Evolution (BSE) code of Hurley et al. (2002) with many updates, provides stellar evolution for stars in the range 0.1 to 100 solar masses. Many enhancements have been implemented especially in the binary-star interaction algorithms and to bring other prescriptions up to date, such as stellar wind mass loss, mass transfer by Roche-lobe overflow and the treatment of stellar mergers. The latest physics additions include runaway stars, circumbinary discs and X-ray binaries with Be stars. Binary_c has a full C (hence C++) and FORTRAN API, as well as a Python module for running either individual stellar systems or full populations, including on HPC architecture (Condor or Slurm).

The binary_c homepage is https://binary_c.gitlab.io/⁠

The binary_c gitlab code page is https://gitlab.com/binary_c⁠

Documentation is at https://binary_c.gitlab.io/binary_c.html⁠

When running, use docker with something like:

docker run --ulimit stack=-1 -it robizzard/binary_c:latest /bin/bash --login

You need a large stack to run binary_c - especially when multithreading - hence the ulimit option.

My typical setup is the following which has an X11 connection as well as a data space that is persistent between invocations (so you can save your work).

#!/bin/bash

############################################################
# run binary_c using docker on Linux/Unix
############################################################

############################################################
# we create a volume in binary_c_persistent : this
# is a persistent file space that is stored even when
# binary_c stops
############################################################
docker volume create binary_c_volume >/dev/null

############################################################
# Allow connections to our X display
############################################################
XAUTH=$(mktemp)
xauth nlist $DISPLAY |  sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
chmod 755 $XAUTH

############################################################
# run a bash login shell in the container : 
# this leaves us in an X-connected shell.
#
# Note the chown/chgrp to make the persistent directory
# writable by the user "binary_c"
############################################################
docker run \
       --name=binary_c \
       -it \
       --rm \
       -e DISPLAY=$DISPLAY \
       --ipc=host \
       --net=host \
       --mount source=binary_c_volume,target=/home/binary_c/binary_c_persistent \
       -v /tmp/.X11-unix \
       -v $XAUTH \
       -v $HOME/.Xauthority:/home/binary_c/.Xauthority \
       robizzard/binary_c:master2.0pre32 \
       /bin/bash -c "sudo chown binary_c binary_c_persistent ; sudo chgrp binary_c binary_c_persistent; cat /home/binary_c/progs/stars/binary_c/doc/README.docker; bash --login"



# to clean the BINARY_C volume run:
# docker volume rm binary_c_volume

# clean up XAUTH
rm $XAUTH

Tag summary

Content type

Image

Digest

sha256:fd737c81c…

Size

1.2 GB

Last updated

over 3 years ago

docker pull robizzard/binary_c