Skip to content
Snippets Groups Projects
Commit 0165c922 authored by Will Morris's avatar Will Morris
Browse files

updated README and output file name ppm

parent fd98e292
No related branches found
No related tags found
No related merge requests found
Pipeline #5659 failed
# 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: stages:
- compile - compile
- submit - submit
# Job name
compile-mandelbrot: compile-mandelbrot:
# Stage name
stage: compile stage: compile
# Script in shell - can use other executors: docker-ssh+machine, docker-ssh, virtualbox etc.
script: script:
- gcc mandelbrot.c - gcc mandelbrot.c
artifacts: artifacts:
paths: paths:
- a.out - a.out
# Tag - an identifier to match a job with a specified machine. Useful for different provisions required by a machine.
tags: tags:
- steve-jobs - steve-jobs
......
# Gitlab-CI/Condor: Mandelbrot # Gitlab-CI & Condor: Mandelbrot Tutorial
Black and white Mandelbrot in C. A Mandelbrot program generator using C.
## Running locally ## 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 gcc mandelbrot.c
``` ```
``` ```
./a.out ./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```
...@@ -16,8 +16,8 @@ int main() ...@@ -16,8 +16,8 @@ int main()
{ {
/* screen ( integer) coordinate */ /* screen ( integer) coordinate */
int iX,iY; int iX,iY;
const int iXmax = 8000; const int iXmax = 2000;
const int iYmax = 8000; const int iYmax = 2000;
/* world ( double) coordinate = parameter plane*/ /* world ( double) coordinate = parameter plane*/
double Cx,Cy; double Cx,Cy;
const double CxMin=-2.5; const double CxMin=-2.5;
...@@ -31,7 +31,7 @@ int main() ...@@ -31,7 +31,7 @@ int main()
/* it is 24 bit color RGB file */ /* it is 24 bit color RGB file */
const int MaxColorComponentValue=255; const int MaxColorComponentValue=255;
FILE * fp; FILE * fp;
char *filename="new1.ppm"; char *filename="mandelbrot.ppm";
char *comment="# ";/* comment should start with # */ char *comment="# ";/* comment should start with # */
static unsigned char color[3]; static unsigned char color[3];
/* Z=Zx+Zy*i ; Z0 = 0 */ /* Z=Zx+Zy*i ; Z0 = 0 */
...@@ -83,6 +83,7 @@ int main() ...@@ -83,6 +83,7 @@ int main()
}; };
/*write color to the file*/ /*write color to the file*/
fwrite(color,1,3,fp); fwrite(color,1,3,fp);
// printf("CXMin-value = %f, Cx = %f\n CYMin-Value= %f, CYValue= %f\n", CxMin , Cx, CyMin, Cy);
} }
} }
fclose(fp); fclose(fp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment