Skip to content

Instantly share code, notes, and snippets.

@cbuntain
Last active March 3, 2020 23:23
Show Gist options
  • Save cbuntain/16dcf84987dbd8dd9bd404996425924b to your computer and use it in GitHub Desktop.
Save cbuntain/16dcf84987dbd8dd9bd404996425924b to your computer and use it in GitHub Desktop.

Instructions for MediaScores on Kong

  • First, we need to create some files that will specify R settings.

    • Create the file ~/.R/Makevars and add the following lines to it (necessary for building mediascores):

        CXX14FLAGS = -DSTAN_THREADS
        CXX14FLAGS += -O3 -march=native -mtune=native
        CXX14FLAGS += -fPIC
      
    • We need to create a space to put our built version of MediaScores, so create a directory in your home directory, e.g., mkdir ~/lib. Then, create an .Renviron file in your home that points to it with the following content (UPDATE WITH YOUR HOME DIRECTORY):

        R_LIBS=/home/c/cbuntain/lib
      
  • Now create a directory for mediascores, cd into it and git clone https://github.com/SMAPPNYU/mediascores.git

  • load the R and gcc modules to your environment:

      module load gcc/6.3.0
      module load R-Project/3.6.0
    
  • Make sure you're in the directory that contains the cloned repo for media scores, and you can now build mediascores using R CMD INSTALL --library=<your R_LIBS dir> mediascores

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment