GithubHelp home page GithubHelp logo

skyfactory's Introduction

SkyFactory

Set up and run large suites of mock sky simulations.

Setup

Clone this repository: git clone https://github.com/j-dr/SkyFactory.git

To set up all the other pieces of code required to run the simulations, just run

sh setup.sh <email>

Running jobs

If running on NERSC, you should run module load python3. To setup a job, run the command python setup_sky.py chinchilla {num} cori-haswell. Then cd {SkyFactoryDir}/chinchilla-herd/Chinchilla-{num}.

First you will need to move the preprocessed input files off of HPSS. If you have never accessed HPSS before, you will first need to run the command hsi. This will open an interface to HPSS. You can exit from it immediately. Once you have done that, run cd unarchivepreprocess && module load esslurm && sbatch job.unarchivepreprocess.sh. This will begin a job transferring the nbody simulation from HPSS. You will receive an email when it starts and finishes.

Once the transfer has completed, navigate to cd {SkyFactoryDir}/chinchilla-herd/Chinchilla-{num} and run sbatch job.all.sh. This will submit the full job. You will again receive an email when the job starts and finishes. Once it has completed, notify Joe and once you have the okay, then run cd archive && sbatch job.archive.sh in the {SkyFactoryDir}/chinchilla-herd/Chinchilla-{num}/archive directory. This will move the simulation to HPSS.

Finding Outputs

  1. Outputs for a given simulation go to the global output dir in the system config file, followed by the simulation name, followed by the simulation number like this {global output dir}/{sim name}-{sim number}.
  2. Outputs for a given task always go to the global output dir for the sim from 1 followed by the task name in in all lower case (i.e., {global output dir}/{sim name}-{sim number}/calcrnn for task CalcRnn).

Notes on Adding New Tasks

  1. Make a file for the task under templates/{taskname}.py
  2. In the file from 1, make a child class of BaseTemplate which looks like
from .basetemplate import BaseTemplate

class MyTask(BaseTemplate):
    def write_config(self, data_output_path, box_size):
        """
        write the job configs
        
        write job config to self.sysparams['JobBase']
        any outputs go to data_output_path
        """

    def write_jobscript(self, data_output_path, box_size):
        """
        write the job submission script
        
        write job submission script to self.sysparams['JobBase']
        outputs got to data_output_path
        """

If you need to run the task only once, instead of for all N-body boxes, add the following to code above

    def __init__(self, simnum, system, cosmo):
        super(DensMap, self).__init__(simnum, system, cosmo, allboxes=True)
  1. Make sure to import the class from 2 in templates/__init__.py
  2. Make sure to write and put your job submission script in systems/{all systems}/MyTask.{Sched} where {Sched} is the corresponding parameter in the {system}.yaml file.
  3. Make sure to add task to setup_sky.py script

skyfactory's People

Contributors

j-dr avatar beckermr avatar

Watchers

James Cloos avatar  avatar

skyfactory's Issues

edison scripts buggy

  • need to have #!/bin/bash -l instead of #!/bin/bash
  • a lot of them have cd {OPath} in them, but now edison scripts start in the submission dir, so no cd needed

add calclens

  • fill in base info
  • put in paths to input pixLC files
  • put in paths to input galaxy catalogs

add calclens-postprocess

  • put scripts to do this in another repo
  • add config and template files
  • do cleanup of duplicate outputs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.