From 0165c922c8eda03c9698da53a4d01cd769db9ec3 Mon Sep 17 00:00:00 2001
From: Will Morris <williamdunstanmorris@gmail.com>
Date: Fri, 7 Dec 2018 10:57:28 +0000
Subject: [PATCH] updated README and output file name ppm

---
 .gitlab-ci.yml |  6 ++++++
 README.md      | 28 ++++++++++++++++++++++------
 mandelbrot.c   |  7 ++++---
 3 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 44ec701..32b6c1e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,14 +1,20 @@
+# The stages where jobs run. Each stage contains one or more jobs that run independently from one another
+# Use stages to define dependencies and artifacts from previous stages.
 stages:
   - compile
   - submit
 
+# Job name
 compile-mandelbrot:
+  # Stage name
   stage: compile
+  # Script in shell - can use other executors: docker-ssh+machine, docker-ssh, virtualbox etc.
   script:
     - gcc mandelbrot.c
   artifacts:
       paths:
         - a.out
+  # Tag - an identifier to match a job with a specified machine. Useful for different provisions required by a machine.
   tags:
     - steve-jobs
 
diff --git a/README.md b/README.md
index 7cc4242..5ddb5b2 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,33 @@
-# Gitlab-CI/Condor: Mandelbrot
+# Gitlab-CI & Condor: Mandelbrot Tutorial
 
-Black and white Mandelbrot in C.
+A Mandelbrot program generator using C.
 
 ## Running locally
-In a local shell, run:
+After you have navigated to your directory in a local shell, you should begin by compiling and running the mandelbrot first. Considering we are using a gcc compiler in C, things should work without any problems here. Run:
 ```
 gcc mandelbrot.c
 ```
 ```
 ./a.out
 ```
-Now open the generated .ppm file!
+Now open the newly generated/regenerated mandelbrot.ppm file using
 
-## Running with Gitlab-CI on a Local Gitlab Runner
+```
+open mandelbrot.ppm
+```
+
+## Gitlab-CI on a Local Machine
+
+It is a good idea to learn the basics of Gitlab CI by installing a runner on a local machine first. In this way, you will have more control over your runner abilities thru the Gitlab API, and more notably any permissions issues your runner can sometimes run often into.
+
+Cool. So now go and install a [binary runner on your machine.](https://docs.gitlab.com/runner/install/#binaries)
+
+We will try to cover the basic syntax for extending and running a job with gitlab-ci, but after downloading this repo, you can jump into the YAML syntax for [configuring your jobs](https://docs.gitlab.com/ee/ci/yaml/)
+
+I will also cover the basics on pipelines, but you can start reading more [in-depth stuff on this here](https://docs.gitlab.com/ee/ci/pipelines.html)
+
+You can see some other [example projects](https://docs.gitlab.com/ee/ci/examples/README.html) that utilise gitlab-ci in various languages example projects.
+
+## Gitlab-CI in the Condor Pool
 
-## Running with Gitlab-CI on a Condor Runner
+In part II of this series in January, we will attempt to use a Gitlab-CI as a means to submitting jobs with HTCondor through ```condor_submit```
diff --git a/mandelbrot.c b/mandelbrot.c
index cdcc525..e473255 100644
--- a/mandelbrot.c
+++ b/mandelbrot.c
@@ -16,8 +16,8 @@ int main()
 {
          /* screen ( integer) coordinate */
        int iX,iY;
-       const int iXmax = 8000;
-       const int iYmax = 8000;
+       const int iXmax = 2000;
+       const int iYmax = 2000;
        /* world ( double) coordinate = parameter plane*/
        double Cx,Cy;
        const double CxMin=-2.5;
@@ -31,7 +31,7 @@ int main()
        /* it is 24 bit color RGB file */
        const int MaxColorComponentValue=255;
        FILE * fp;
-       char *filename="new1.ppm";
+       char *filename="mandelbrot.ppm";
        char *comment="# ";/* comment should start with # */
        static unsigned char color[3];
        /* Z=Zx+Zy*i  ;   Z0 = 0 */
@@ -83,6 +83,7 @@ int main()
                        };
                        /*write color to the file*/
                        fwrite(color,1,3,fp);
+                       // printf("CXMin-value = %f, Cx = %f\n CYMin-Value= %f, CYValue= %f\n", CxMin , Cx, CyMin, Cy);
                }
        }
        fclose(fp);
-- 
GitLab