Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lamp/cs206
  • bwermeil/cs206-2020
  • zabifade/cs206-2020
  • cauderan/cs206-2020
  • malonga/cs206-2020
  • dumoncel/cs206
  • bounekhe/cs206
  • bergerault/cs206
  • flealsan/cs206
  • hsu/cs206
  • mouchel/cs206
  • vebraun/cs206
  • vcanard/cs206
  • ybelghmi/cs206
  • belghmi/cs206
  • bousbina/cs206
  • waked/cs206
  • gtagemou/cs206
  • arahmoun/cs206
  • elhachem/cs206
  • benrahha/cs206
  • benslima/cs206
22 results
Show changes
Commits on Source (80)
Showing
with 11 additions and 687 deletions
This repository will be used as the website for Parallelism and Concurrency CS-206. It will be updated weekly throughout the semester. This README contains general information about the class.
- [previous-exams](previous-exams) contains PDFs for the previous exams.
- [exercises](exercises) contains markdown documents for exercises and solutions.
- [slides](slides) contains the slides presented in class.
- [labs](labs) contains markdown documents for the labs.
We will use GitLab's issue tracker as a discussion forum. Feel free to [open an issue](https://gitlab.epfl.ch/lamp/cs206/issues) if you have any comments or questions.
# First-week tasks
1. Join [the Discord](https://discord.gg/tgbPcCFSm2)
1. Log into gitlab: https://gitlab.epfl.ch/users/sign_in
1. Please fill in [this form](https://forms.gle/N6F3Q3jZm71AASby9) with your GASPAR and SCIPER number
1. Please fill in [this doodle](https://doodle.com/poll/yi2c33zkb8nre3ug) by picking the room in which you will do the exercises.
1. Follow the [Tools Setup](labs/tools-setup.md) page.
1. Do the [example lab](labs/example-lab.md).
1. Watch all videos under *Parallelism 1: Introduction to Parallel Programming* below
1. Do the [first graded lab](labs/lab1-parallel-box-blur-filter/).
# Grading
The grading of the course is divided between labs (30%), midterm exam (30%) and final exam (40%).
# Staff
| Role | People |
| :--- | :--- |
| Professors | [Martin Odersky](https://people.epfl.ch/martin.odersky), [Kashyap Sanidhya](https://people.epfl.ch/sanidhya.kashyap) |
| TAs | [Dragana Milovancevic](https://people.epfl.ch/dragana.milovancevic), [Matthieu Bovel](https://people.epfl.ch/matthieu.bovel), [Simon Guilloud](https://people.epfl.ch/simon.guilloud), [Tao Lyu](https://people.epfl.ch/tao.lyu), [Gupta Vishal](https://people.epfl.ch/vishal.gupta)|
| Student TAs | Mohamed Boukhari, Nicolas Matekalo, Tuomas Pääkkönen, Abel Wilkinson |
# Course Schedule
Lectures are partially live and partially prerecorded (on YouTube).
Live sessions will be held on Wednesdays from 14:15 to 16:00 if it is a week with live lecture.
Exercise sessions will be held on Wednesdays from 14:15 to 16:00 if it is a week with exercises.
Lab sessions will be held on Wednesdays from 16:15 to 18:00.
You should watch the prerecorded lectures before doing the exercies.
<!-- seq 0 7 100 | xargs -i date -d "02/24/2021 {} days" +"%d.%m.%Y" -->
| Week | Date | Topic | Lectures (14:15-16:00) | Exercises (14:15-16:00) | Labs (16:15-18:00) |
| :-- | :-- | :-- | :-- | :-- | :-- |
| 1 | 2022.02.23 | Parallelism 1 | Prerecorded | Welcome session | Lab 1 |
Solutions to the exercises are released after each deadline. We do not provide solutions for the labs.
Before each Exercise session, students should watch videos corresponding to that week's topic:
### Intro
- [Welcome Zoom session][Zoom1]
### Parallelism 1: Introduction to Parallel Programming
- [Introduction to Parallel Computing](https://www.youtube.com/watch?v=94O72nyNFY0)
- [Parallelism on the JVM I](https://www.youtube.com/watch?v=I8w-q1TPtjA)
- [Parallelism on the JVM II](https://www.youtube.com/watch?v=BbVWGWTNAXw)
- [Running Computations in Parallel](https://www.youtube.com/watch?v=KkMZGJ3M2-o)
- [Monte Carlo Method to Estimate Pi](https://www.youtube.com/watch?v=VBCf-aTgpPU)
- [First-Class Tasks](https://www.youtube.com/watch?v=mrVVaXCuhBc)
- [How Fast are Parallel Programs?](https://www.youtube.com/watch?v=Lpnexp_Qxgo)
- [Benchmarking Parallel Programs](https://www.youtube.com/watch?v=LvS_kjCssfg)
### Parallelism 2: Basic Task Parallel Algorithms
- [Parallel Sorting](https://www.youtube.com/watch?v=AcuvVgQbphg)
- [Data Operations and Parallel Mapping](https://www.youtube.com/watch?v=ghYtMLrphZw)
- [Parallel Fold (Reduce) Operation](https://www.youtube.com/watch?v=hEBgyhIoWww)
- [Associativity I](https://www.youtube.com/watch?v=q-Cl3whISCY)
- [Associativity II](https://www.youtube.com/watch?v=XBjqYavDUB8)
- [Parallel Scan (Prefix Sum) Operation](https://www.youtube.com/watch?v=CYr3YaQiMwo)
### Parallelism 3: Data-Parallelism
- [Data-Parallel Programming](https://www.youtube.com/watch?v=WW7TabCiOV8)
- [Data-Parallel Operations I](https://www.youtube.com/watch?v=Vd35YQ8DEO4)
- [Data-Parallel Operations II](https://www.youtube.com/watch?v=dcMgKtuAh3s)
- [Scala Parallel Operations](https://www.youtube.com/watch?v=NjkxjAT7ohE)
- [Splitters and Combiners](https://www.youtube.com/watch?v=Redz85Nlle4)
### Parallelism 4: Data-Structures for Parallel Computing
- [Implementing Combiners](https://www.youtube.com/watch?v=dTP0ntniB2I)
- [Parallel Two-phase Construction](https://www.youtube.com/watch?v=XcMtq3OdjQ0)
- [Conc-Tree Data Structure](https://www.youtube.com/watch?v=cUXHXKL8Xvs)
- [Amortized, Constant-Time Append Operation](https://www.youtube.com/watch?v=Ic5DUZLITVI)
- [Conc-Tree Combiners](https://www.youtube.com/watch?v=aLfFlCC1vjc)
# Labs
Labs are individual assignments where you get to write Scala programs using the concepts learned during lectures.
Labs are submitted by pushing your code on GitLab, see details in the [grading and submission](labs/grading-and-submission.md) page.
| Labs | Name | Start date | Due date (23:59 [AoE](https://en.wikipedia.org/wiki/Anywhere_on_Earth)) |
| :-- | :-- | :-- | :-- |
| Lab 1 | Parallel Box Blur Filter | 2022.02.23 | 2022.03.06 |
# Exercises
Exercises are pen and paper style questions that will help you consolidate the knowledge learned during lectures.
Exercises should be done in groups during the lecture.
# Exams
The midterm exam will take place on 2022.??.??. The midterm exam will cover all the material seen in the class up to week 6 (included).
The final exam will take place on 2022.??.??. The final exam will cover all material seen during the semester.
Information about exams organization will be communicated by email.
[YouTubeConcurrency1]: https://www.youtube.com/watch?v=5oUpSoUoII4
[YouTubeConcurrency2]: https://www.youtube.com/watch?v=Jvo-vrxaGnk
[YouTubeConcurrency3]: https://www.youtube.com/watch?v=t4tqMzfvclk
Moved to [Moodle](https://moodle.epfl.ch/course/view.php?id=14388).
# Exercise 1
Use the following commands to make a fresh clone of your repository:
```
git clone -b exercise-1 git@gitlab.epfl.ch:lamp/student-repositories-s21/cs206-GASPAR.git exercise-1
```
Update the README.md file with your solutions. Don't forget to list the group members' SCIPER numbers.
# Problem 1: Introduction to Concurrency
Freshly graduated from EPFL, you all have been hired as contractors for a successful and rapidly growing bank. The bank has recently been experiencing problems with their money management system, coded in Scala, and so they hired the best and brightest young engineers they could find: you! The system has been working perfectly fine so far, they tell you. In the past days, due to an increased number of customers, they had to switch from a single threaded sequential execution environment to a multithreaded concurrent environment, in which multiple threads may perform transactions concurrently. That's when problems started, your manager says…
Below is the code responsible to withdraw money from the account from and transfer it to the account to, within the same bank.
```scala
def transfer(from: Account, to: Account, amount: BigInt) {
require(amount >= 0)
val balanceFrom = from.balance
if (balanceFrom >= amount) {
from.balance = balanceFrom - amount
val balanceTo = to.balance
to.balance = balanceTo + amount
}
}
```
For the bank, it is very important that the following two properties hold after any sequence of completed transfer transactions:
1. The balance of an account never goes below 0.
2. The total sum of money held by the bank is constant.
## Question 1
Does the above transfer method respect the two properties in a *sequential* execution environment, that is, when there is only one thread in the program?
## Question 2
What can go wrong in a setting where multiple threads can execute the `transfer` method concurrently? For each of the two desired properties of the system, check if its holds in this concurrent environment. If not, come up with an example execution which exhibits a violation of the property.
# Question 3
For each of the proposed implementations of `transfer` below, check which of the properties hold. Additionally, check if the system is vulnerable to *deadlocks*.
Variant 1
```scala
def transfer(from: Account, to: Account, amount: Long): Unit = {
require(amount >= 0)
val balanceFrom = from.balance
if (balanceFrom >= amount) {
from.synchronized {
from.balance = balanceFrom - amount
}
to.synchronized {
val balanceTo = to.balance
to.balance = balanceTo + amount
}
}
}
```
Variant 2
```scala
def transfer(from: Account, to: Account, amount: Long): Unit = {
require(amount >= 0)
from.synchronized {
val balanceFrom = from.balance
if (balanceFrom >= amount) {
from.balance = balanceFrom - amount
to.synchronized {
val balanceTo = to.balance
to.balance = balanceTo + amount
}
}
}
}
```
Variant 3
```scala
object lock // Global object
def transfer(from: Account, to: Account, amount: Long): Unit = {
require(amount >= 0)
lock.synchronized {
val balanceFrom = from.balance
if (balanceFrom >= amount) {
from.balance = balanceFrom - amount
val balanceTo = to.balance
to.balance = balanceTo + amount
}
}
}
```
# Problem 2: Parallel Reductions
## Question 1
As a group, write a function called `minMax`, which should take a non-empty array as input and return a pair containing the smallest and the largest element of the array.
```scala
def minMax(a: Array[Int]): (Int, Int) = ???
```
Now write a parallel version of the function. You may use the constructs `task` and/or `parallel`, as seen in the lectures.
## Question 2
Imagine that the data structure you are given, instead of an `Array[A]`, is one called `ParSeq[A]`. This class offers the two following methods, which work in parallel:
```scala
def map[B](f: A => B): ParSeq[B]
def reduce(f: (A, A) => A): A
```
Can you write the following `minMax` function in terms of `map` and/or `reduce` operations ?
```scala
def minMax(data: ParSeq[Int]): (Int, Int) = ???
```
## Question 3
What property does the function `f` passed to reduce need to satisfy in order to have the same result regardless on how reduce groups the applications of the operation f to the elements of the data structure? Prove that your function `f` indeed satisfies that property.
......@@ -12,57 +12,33 @@ stages:
- build
- grade
variables:
OUTPUT_DIR: "-"
compile:
stage: build
timeout: 15m
image: lampepfl2022/cs206:compile
timeout: 10m
image: ${DOCKER_REPO}/compile
tags:
- cs210
except:
- tags
- master
- exercise-1
- exercise-2
- exercise-3
- exercise-4
- exercise-5
- exercise-6
- exercise-7
- exercise-8
- main
script:
- sbt packageSubmission
# Output of this job that needs to be stored to be reused in the grade job below
artifacts:
expire_in: 1 day
expire_in: 24h
paths:
- submission.jar
grade:
stage: grade
timeout: 15m
timeout: 10m
except:
- tags
- master
- exercise-1
- exercise-2
- exercise-3
- exercise-4
- exercise-5
- exercise-6
- exercise-7
- exercise-8
- main
tags:
- cs210
image:
name: lampepfl2022/cs206:grader-${CI_COMMIT_BRANCH}
entrypoint: [""]
variables:
JAR_PATH: "${CI_PROJECT_DIR}/submission.jar"
image: ${DOCKER_REPO}/grader-${CI_COMMIT_BRANCH}
allow_failure: true
before_script:
- mkdir -p /shared/submission/
- cp submission.jar /shared/submission/submission.jar
script:
- cd /grader
- /grader/grade
script: "😎"
# Example lab
The goal of this lab is to familiarize yourself with the infrastructure and tools used in this class. Even though the grade in this lab won't influence your grade for the course, it is important that you work through this lab carefully.
## Part 1: Obtaining the Project Files
First, make sure you've followed the [Tools Setup](tools-setup.md) page.
**At this point, we strongly encourage you to take the time to read at least the first three chapters of the [Git Book](https://git-scm.com/book/en/v2). If you just copy-paste the commands we give you without understanding them, it's likely that you'll make a mistake somewhere and waste time. Git can be a huge productivity enhancer when used correctly, so it's definitely worth the investment!**
We'll starting by cloning the repository containing all our lab (make
sure to replace `GASPAR` with your EPFL username (the one with letters, not the
one with number) in the following command).
```shell
git clone -b example git@gitlab.epfl.ch:lamp/student-repositories-s21/cs206-GASPAR.git cs206-example
```
**If this command fails, make sure you've [logged into
gitlab](https://gitlab.epfl.ch/users/sign_in) and [registered in a
group](https://gitlab.epfl.ch/lamp/cs206/-/blob/master/exercises/Group%20workspaces.md),
then wait a few minutes.
If it still doesn't work it's likely that you didn't correctly upload your ssh
key to gitlab, look at the last part of the [Tools Setup](tools-setup.md) page again.**
```shell
cd cs206-example
```
Now that we've obtained the project, let's take a look at its structure:
```shell
.
├── build.sbt
├── project
│ ├── ...
└── src
├── main
│ └── scala
│ └── example
│ └── Lists.scala
└── test
└── scala
└── example
└── ListsSuite.scala
```
- All the files ending with `.sbt` or in the `project/` directory are build tool configuration files: you don't need to modify them or look at them for any of the labs
- The project sources are in `src/main/scala/`
- The sources of the unit tests are in `src/test/scala/`. You will need to make all the tests pass to complete the labs, and you should write additional tests to check for cases that our tests do not cover.
## Part 2: Using sbt
Start sbt by running:
```shell
sbt
```
Once it's finished starting (this may take a while), you'll be able to enter sbt
commands. You can compile your project using `compile` and run the tests with
`test` (this automatically compiles your code if needed to). Note that if
compilation fails, no tests will be run. The first time you'll run `test` in an
lab you should see many errors: that's normal, your job is to make the
tests pass! But first, let's look at a failed test in detail:
![](images/sbt-test-error.png)
This tells us several things:
- There's a test named `sum of a few numbers (10pts)` in the class `ListsSuite` in the package `example`
- The test failed (that's why it's in red and starts with `==> X`) with an exception: `NotImplementedError`.
- This exception was thrown from the method `???` in `scala.Predef` in the file
`Predef.scala`, this file is not part of our project (that's why it's in
grey), to find the actual error in our code we have to look at where this
method was called from.
- This method was called from method `max` in `example.Lists` in the file
`Lists.scala` at line 40, this is where the bug is!
- It's also important to see where in our test this was called from, here
it's line 102 of `ListsSuite.scala`.
Time to go fix that bug! The next section will show you how to do that using the IDE.
## Part 3: Using the IDE
### Setup
Let's upgrade the IDE support first, close VSCode if it's open and run:
```shell
code --force --install-extension scalameta.metals
```
### Startup
To start Code, run the following in the project directory (the same directory where you
previously ran `sbt`), it's important to run Code in the correct directory or
it won't be able to import your project:
```shell
code .
```
(In this command the `.` is important, it's how we tell Code to run in the
current directory)
(if you see an error `Expected ';'` it means you're inside sbt, open a new
terminal in the same directory)
The first time the IDE starts, it will take some time to download more
components, eventually it will ask you to import the build, please click "Import
build":
![](images/metals-import.png)
You'll need to wait a bit for the import to finish, if an error appears try
closing and restarting Code in the same way we started it above.
### Usage
It's now time to dig in! Earlier we talked about a failing test, the stack trace
told us that it was failing on line 102 of the file `ListsSuite.scala`, so let's open that file:
![](images/open-test.png)
Here's the source code of the test:
![](images/test-source.png)
The first line gives a name to the test, the second line runs
`sum(List(1, 2, 0))` and tests that it equals 3, but in our case we never got to
this point because an exception was thrown, recall that the second line
of the stack trace was:
```scala
at example.Lists$.sum(Lists.scala:25)
```
This tells us that the crash happened when calling `sum`, we can hover with our mouse over the call to `sum` in the test method to get more information on it:
![](images/hover.png)
**If hovering doesn't show this see the [Troubleshooting](#troubleshooting) section.**
The hover is split into two parts: the first part is:
```scala
def sum(xs: List[Int]): Int
```
This means that `sum` is a method that takes a `List` of `Int` as argument and
returns an `Int`. The second part is the documentation of `sum`. We can jump to
the definition of sum by `Ctrl+click` (`Cmd+click` on Mac) or by `right click ->
Go to Definition`. Once there we see:
![](images/sum-def.png)
Now we know why the test failed: `sum` calls `???`, which is a method defined in
the Scala standard library that simply crashes your program: whenever you see it
in a lab it means that this is something you need to replace by your own
implementation.
Once you've implemented this method, you can run `test` from sbt again to see if
the test passed, if you want to run a single test instead of all tests you can
use `testOnly` instead and specify part of the name of the test:
```scala
testOnly -- "--tests=.*max of a few.*"
```
You now know enough to be able to work with the IDE, here are some additional tips:
- When you press `Enter` to make a new line, the IDE will automatically indent the
line if needed (for example, if the last word on the previous line was
`then`), however it will never unindent code for you (for example, when
writing `else`). You can indent code manually by pressing `Tab` and
unindent it by pressing `Backspace` or `Shift + Tab`.
- When working on an lab, you are free to create as many methods, classes and objects as you want. **But you shouldn't change the name of existing methods, classes and objects, because that may break the automated grading system, this is important!**.
- You can see a list of all warnings and errors reported by the compiler by clicking on ![](images/warnings-errors.png) at the bottom left of Code.
- The IDE can show you on hover the documentation of classes, defs and vals defined in the current project but support for external project is currently missing. To compensate for this, you can consult the documentation online:
- The documentation for the Scala standard library is at [https://www.scala-lang.org/files/archive/api/2.13.3/](https://www.scala-lang.org/files/archive/api/2.13.3/)
- The documentation for the Java standard library is at [https://docs.oracle.com/en/java/javase/15/docs/api/index.html](https://docs.oracle.com/en/java/javase/15/docs/api/index.html)
- You can customize Code as much as you want, including installing additional extensions, but please avoid installing other Scala-related extensions: they may conflict with the one we use for this course.
- While working on your lab, you will regularly want to go back to the sbt console to run the tests. You could simply run the command `test` every time, but you can take advantage of the watch mode instead: if a command is prefixed by `~`, sbt will watch the source directory for changes and re-run the command every time a file is saved. So a possible workflow is:
1. Start the IDE
2. Start sbt in the terminal (protip: you can start a terminal inside Code from the
menu: `Terminal -> New Terminal`)
3. Inside sbt, run `~test`
4. Work in the IDE, and check the output of the sbt console from time to time
## Part 4: Running your code
Writing code and running tests is nice, but sometimes more direct feedback is useful, like when you want to experiment with Scala, or try out some methods that you implemented. You can do this using the Scala REPL (Read/Eval/Print Loop) or with a worksheet.
### The REPL
After having started sbt, you can start the REPL by typing `console`, you will see the following prompt:
```scala
scala>
```
At this point you can write any Scala expression you want, for example:
```scala
scala> val l = List(3,7,2)
val l: List[Int] = List(3, 7, 2)
```
(If you write an expression without wrapping it in a `val` or a `def`, the REPL will give it a name for you, starting with `res`)
```scala
scala> l.isEmpty
val res0: Boolean = false
scala> println(res0)
false
scala> l.tail.head
res1: Int = 7
scala> List().isEmpty
res2: Boolean = true
```
The classes of the lab are available inside the REPL, so you can for instance import all the methods from `object Lists` and start using `max`:
```scala
scala> import example.Lists._
import example.Lists._
scala> max(List(1,3,2))
res1: Int = 3
```
You can enter a multiline expression in the REPL by using `Alt+Enter` instead of `Enter`:
```scala
scala> if 1 == 1 then
| "a"
| else
| "b"
val res0: String = a
```
(on macOS, first go to `Terminal -> Preference -> Profiles -> Keyboard` and then
select `Use Option as Meta key`, then `Option+Enter` will work for multiline
expressions.)
In order to exit the Scala REPL and go back to sbt, type `Ctrl+D`.
### The worksheet mode
A *worksheet* is a file where every line of code written in the IDE is executed and its output displayed as a comment.
#### Creating a worksheet
Any file that ends in `.worksheet.sc` is considered to be a worksheet by the IDE. Once Code is launched in a project, all you have to do is create a new file and save it (`Ctrl+N, Ctrl+S`) using any name as long as it ends in `.worksheet.sc`.
#### Using the worksheet mode
Inside this file, you can type any line of code you would type in the REPL. The
worksheet will be automatically run when the code is saved and auto-save is
enabled by default. Each line of code will be executed one by one and its output
will be shown in green on the right.
## Part 5: Submitting your Solution
[Click here to learn how to submit your lab.](grading-and-submission.md)
# Troubleshooting
## sbt fails to start
If you see any kind of error when sbt starts that prevents you from using it,
try cleaning the project cache by running:
```shell
git clean -Xdf
```
Then restarting `sbt`, if this still doesn't work, try deleting the global sbt
cache:
```shell
rm -r ~/.sbt
```
## IDE features like type-on-hover or go-to-definition do not work
It's likely that the build wasn't imported, we can import it manually:
Click on the "m" logo in the left bar (where the red arrow is in the screenshot below):
![](images/menu-metals.png)
In the sidebar that appears, click on "Import build", then wait a bit:
![](images/import-build.png)
If things still don't work, try restarting Code (launch it in the same way you
started it before, using `code .` from the project directory). If you're still
having issues, try clicking on "Clean compile workspace" from the same
sidebar.
## Warning about Bloop installed version
If you get a warning like this:
![](images/bloop-update.png)
Please click the first button "Turn off old server".
# Grading and submission
## Local tests and grading
Each lab is shipped with two sets of tests:
* The tests defined under `src/test/scala`, these are usually incomplete: we
strongly encourage you to write additional tests to exercise every aspect of
your code. You can run these tests from `sbt` using the following command:
```shell
test
```
* The **grading tests**, that we use to grade your labs, these are
provided as a "black box": you can run them but are not allowed to see their
content, to encourage you to write your own tests. You can run them from
`sbt` using the following command:
```shell
Grading/test
```
Your grade is determined by the number of these tests that pass, see the
next section to see how to actually get a grade.
(remember that you can always put `~` before an sbt command to automatically
re-run it when you save a file)
## Committing and pushing your code
**You need to push your code to gitlab before the deadline for the lab to
receive a grade. If you forget, your grade will be zero.**
If you've read the first few chapters of [Git
book](https://git-scm.com/book/en/v2) as recommended, you must already be
familiar with committing and pushing, but let's go over the basics once again:
At any point while working on an lab, you can see what changes you
haven't committed by writing:
```shell
git status
```
(If you get the error `Not a valid command: git`, it means you're inside sbt,
you can't run git from sbt itself, you need to open another terminal in the same
directory)
This will display the list of files you have modified since the last commit, to
see the exact changes you made, run:
```shell
git diff
```
To save these changes in a commit, run: (replace `"My message"` by a message
describing the changes since the last commit, see [How to Write a Git Commit
Message](https://chris.beams.io/posts/git-commit/) for some tips on writing
good commit messages)
```shell
git commit -am "My message"
```
(It's good practice to commit your code regularly to document your changes)
You can then synchronize your local git repository with the gitlab server by
first running:
```shell
git pull --no-rebase
```
This will merge in your local repository any change we made to the lab
(we only change labs to fix critical bugs found after it's been released,
so most of the time this will not do anything).
Finally, you can push your changes to gitlab:
```shell
git push
```
Note that there are also graphical user interfaces to interact with git, for
example [VSCode has built-in git
support](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support).
Once you've pushed your code, you can see the result online by going to
`gitlab.epfl.ch/lamp/student-repositories-s21/cs206-GASPAR/pipelines` where
`GASPAR` is your username (you can also access this page from the main page of
your repository by clicking on the rocket icon on the left side of the gitlab
interface, then clicking on "Pipelines").
![](images/pipeline-tab.png)
The grading pipeline contains two steps:
* *compile*: your code does not compile for grading if the job fail.
* *grade*: the job results in a warning if you do not get the maximum grade
(10.00/10.00)
If a job is marked "pending", it means there are other students running jobs at
the same time and you'll have to wait a bit for your job to run.
You can click on the `grade` job to see its output:
![](images/pipeline-details.png)
![](images/pipeline-logs.png)
Your grade is given on the line that starts with `Your overall score for this
lab is`
**If you push to gitlab multiple times, your final grade will be based on the
last commit you pushed before the deadline.**
labs/images/bloop-update.png

18.1 KiB

labs/images/clone-url.png

41.8 KiB

labs/images/gitlab-public-ssh-key.png

111 KiB

labs/images/gitlab-settings.png

24.8 KiB

labs/images/hover.png

163 KiB

labs/images/import-build.png

35.3 KiB

labs/images/menu-metals.png

54.6 KiB

labs/images/metals-import.png

30.4 KiB

labs/images/open-test.png

17.6 KiB

labs/images/pipeline-details.png

47.1 KiB

labs/images/pipeline-logs.png

157 KiB

labs/images/pipeline-tab.png

48.9 KiB

labs/images/sbt-test-error.png

44.4 KiB

labs/images/sum-def.png

6.75 KiB

labs/images/syntax-error-bug.png

47.3 KiB