Skip to main content
SciNet
  • Home
  • All Courses
  • Calendar
  • Certificates
  • SciNet
    Main Site Documentation my.SciNet
  • CCDB
  • More
Close
Toggle search input
English
English Français
You are currently using guest access
Log in
SciNet
Home All Courses Calendar Certificates SciNet Collapse Expand
Main Site Documentation my.SciNet
CCDB
Expand all Collapse all
  1. Dashboard
  2. PHY1610 - Winter 2021
  3. 3. Git and rarray

3. Git and rarray

Completion requirements
Opened: Thursday, 28 January 2021, 11:59 PM
Due: Thursday, 4 February 2021, 11:59 PM
In this assignment, we are going to use rarrays and git in your modular version of antsontable.  You are expected to do this on the Teach cluster, where rarray has already been installed.  Please see the documentation for the Teach cluster before doing the assignment.

  1. Log into the Teach cluster with ssh, and load the following modules

     module load gcc rarray
    
  2. Clones the original, monolythic ants code from assignment 2 into a new directory with the command

     git clone /scinet/course/phy1610/antsontable.git newants
    
    This will put the code on the directory newants.
  3. Copy your modularized ants code to that directory.
  4. Add the files that are modified or new compared to the original code to git, and commit your modularized code.
    Be sure never to include object files, executables, output, or anything that is derived from or produced from the code and that can easily be regenerated.
  5. Rewrite the ants code to use two-dimensional rarrays (a.k.a. rmatrices) instead of linearized 2d arrays.
    Hint: you can replace the linearized arrays with rarrays and get back a linearize array from the rarray with the .data() method. Using this, you could first rarray-ize the main function, and then one-by-one rarray-ize the other modules.
  6. Change the code so that it writes out only once every 1000 time steps.
  7. Do not leave any unnecessary parts of the code.
  8. We expect to see several meaningful commits to the git repository during this process.
Once you are done and all your code is added and committed, zip up the repository with the (non-standard) command

 git2zip REPODIR
(with REPODIR replaced by the directory where your code and the git repo lives, e.g. newants).

 Copy the resulting zip file off of the teach cluster and submit the zip file together with the screen output of the program to the assignment dropbox by February 4th, 2021 at 23:55 PM. The late policy can be found in the syllabus.
  • git2zip git2zip
    14 August 2023, 3:41 PM
  • newants.zip newants.zip
    14 August 2023, 3:41 PM
  • zip2git zip2git
    14 August 2023, 3:41 PM
Contact site support
You are currently using guest access (Log in)
Data retention summary


All content on this website is made available under the Creative Commons Attribution 4.0 International licence, with the exception of all videos which are released under the Creative Commons Attribution-NoDerivatives 4.0 International licence.
Powered by Moodle