Skip to content

Commit 33d2d0e

Browse files
committed
Added batch-job submission scripts
1 parent 2de1605 commit 33d2d0e

16 files changed

+452
-81
lines changed

Libraries/BLAS/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#=======================================================================
2+
# Make file for blas_test.f90
3+
#=======================================================================
4+
CFLAGS = -c -O2
5+
COMPILER = gfortran
6+
PRO = blas_test
7+
OBJECTS = blas_test.o
8+
9+
LINK_BLAS = -lblas
10+
11+
${PRO}.x : $(OBJECTS)
12+
$(COMPILER) -o ${PRO}.x $(OBJECTS) $(LINK_BLAS)
13+
14+
%.o : %.f90
15+
$(COMPILER) $(CFLAGS) $(<F)
16+
17+
clean :
18+
rm *.o *.x

Libraries/BLAS/README.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
### Purpose:
2+
3+
Example of using BLAS libraries on the cluster. The specific example creates 100X100 random matrix, a vector of
4+
dimension 100 and performs matrix-vector multiplication.
5+
6+
### Contents:
7+
8+
(1) blas_test.f90: Fortran source code
9+
10+
(2) Makefile: Makefile to compile the source code
11+
12+
(3) blas_test.sbatch: Btach-job submission script to send the job to the queue
13+
14+
### Example Usage:
15+
16+
source new-modules.sh
17+
make
18+
sbatch blas_test.sbatch
19+
20+
### Example Output:
21+
22+
```
23+
Vector Vout:
24+
1 25.173201914050779
25+
2 25.542639298693242
26+
3 25.363085121856649
27+
4 24.064896892715677
28+
5 22.765408132534201
29+
6 25.122410155603571
30+
7 22.878604915102780
31+
8 25.790335400142595
32+
9 25.051709637631145
33+
10 25.659498202386164
34+
11 25.792645995680576
35+
12 25.324391686562979
36+
13 25.128181835955335
37+
14 23.380410807295501
38+
15 22.465517792428468
39+
16 25.329548771279001
40+
17 23.729500315138093
41+
18 23.729904729199802
42+
19 23.443732562913880
43+
20 22.144676576853303
44+
21 26.363404160830544
45+
22 30.891400005121795
46+
23 21.473090335608578
47+
24 23.341880914064461
48+
25 20.980524141108045
49+
26 23.338036811032318
50+
27 23.082925092696552
51+
28 23.207431558582371
52+
29 23.954459975689147
53+
30 26.726096709146432
54+
31 21.661645491999057
55+
32 28.611813011640614
56+
33 26.377413220213981
57+
34 23.062963865531845
58+
35 23.676212785674956
59+
36 25.443473409849432
60+
37 26.621186299340554
61+
38 26.731032806244727
62+
39 26.873982794239275
63+
40 26.448760586845044
64+
41 22.768705571967448
65+
42 25.245064839882048
66+
43 24.978667733902427
67+
44 27.127272907661645
68+
45 24.025439402435175
69+
46 24.379897264445741
70+
47 23.610017400944265
71+
48 24.072214094881840
72+
49 23.808545223903458
73+
50 24.981543804868902
74+
51 24.595239610918117
75+
52 24.985393274980041
76+
53 26.701523829539212
77+
54 22.820784897626979
78+
55 23.794194047432580
79+
56 27.385451027223322
80+
57 25.015627808852496
81+
58 25.510047252160089
82+
59 25.666952684381659
83+
60 25.650104984272403
84+
61 24.982577027472331
85+
62 25.068292395782652
86+
63 24.077905013569293
87+
64 22.233255044086640
88+
65 24.553033595930195
89+
66 26.173609147669122
90+
67 24.277852446151460
91+
68 23.422625953907197
92+
69 28.777163507420472
93+
70 26.880919270489994
94+
71 26.273790854681891
95+
72 28.896919778602030
96+
73 26.722413059020955
97+
74 24.715602743051843
98+
75 24.244503719240029
99+
76 20.876336780223674
100+
77 26.164087964346141
101+
78 26.147945767259948
102+
79 24.460625205747043
103+
80 25.963371406119961
104+
81 26.244556129085549
105+
82 25.404186830197499
106+
83 26.056266365416157
107+
84 24.445184773190974
108+
85 26.472436345405296
109+
86 24.599606500854602
110+
87 25.611454650653197
111+
88 28.903142039641928
112+
89 22.477799677888200
113+
90 25.140171260537791
114+
91 24.701886549918143
115+
92 23.228501267726013
116+
93 22.024866588186953
117+
94 26.913536990055928
118+
95 24.811448566331471
119+
96 25.374300728771910
120+
97 25.780052726009359
121+
98 27.001826536045286
122+
99 21.359693460593437
123+
100 21.963571993716787
124+
STOP End of program.
125+
```

Libraries/BLAS/blas_test.sbatch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
#SBATCH -J blas_test
3+
#SBATCH -o blas_test.out
4+
#SBATCH -e blas_test.err
5+
#SBATCH -p serial_requeue
6+
#SBATCH -t 30
7+
#SBATCH -N 1
8+
#SBATCH -n 1
9+
#SBATCH --mem=4000
10+
11+
# Load required modules
12+
source new-modules.sh
13+
14+
# Run program
15+
./blas_test.x
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
Contents:
1+
### Purpose:
22

3-
(1) fftw_test.f90: Perform 1D transform
4-
(2) Makefile
3+
Example of using FFTW libraries on the cluster. The specific example performs 1D transform.
54

6-
Compile and Run:
5+
### Contents:
76

8-
(1) Load required modules, e.g.,
7+
(1) fftw_test.f90: Fortran source code
98

10-
source new-modules.sh
11-
module load gcc/4.8.2-fasrc01
12-
module load openmpi/1.8.3-fasrc02
13-
module load fftw/3.3.4-fasrc06
9+
(2) Makefile: Makefile to compile the source code
1410

15-
(2) Compile
11+
(3) fftw_test.sbatch: Btach-job submission script to send the job to the queue
1612

17-
make
13+
### Example Usage:
1814

19-
(3) Run
15+
source new-modules.sh
16+
module load gcc/4.8.2-fasrc01
17+
module load openmpi/1.8.3-fasrc02
18+
module load fftw/3.3.4-fasrc06
19+
20+
### Example Output:
2021

21-
./fftw_test.x
22-
23-
Example output:
24-
22+
```
2523
Input array:
2624
in( 1 ) = ( 1.0000000000000000 , 2.0000000000000000 )
2725
in( 2 ) = ( 2.0000000000000000 , 3.0000000000000000 )
@@ -37,3 +35,4 @@ Example output:
3735
4 * in( 2 ) = ( 16.000000000000000 , 20.000000000000000 )
3836
4 * in( 3 ) = ( 12.000000000000000 , 16.000000000000000 )
3937
4 * in( 4 ) = ( 8.0000000000000000 , 12.000000000000000 )
38+
```

Libraries/FFTW/fftw_test.sbatch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#SBATCH -J fftw_test
3+
#SBATCH -o fftw_test.out
4+
#SBATCH -e fftw_test.err
5+
#SBATCH -p serial_requeue
6+
#SBATCH -t 30
7+
#SBATCH -N 1
8+
#SBATCH -n 1
9+
#SBATCH --mem=4000
10+
11+
# Load required modules
12+
source new-modules.sh
13+
module load gcc/4.8.2-fasrc01
14+
module load openmpi/1.8.3-fasrc02
15+
module load fftw/3.3.4-fasrc06
16+
17+
# Run program
18+
./fftw_test.x

Libraries/GSL/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#### Purpose:
2+
3+
Example of using GSL libraries on the cluster. The specific example solves the integral
4+
5+
$$\int_0^1 x^{-1/2} log(x) dx = -4$$
6+
7+
to a relative accuracy bound of 1e-7.
8+
9+
#### Contents:
10+
11+
(1) gsl_int_test.c: C source file
12+
13+
(2) Makefile: Makefile to compile the source code
14+
15+
(3) gsl_int_test.sbatch: Btach-job submission script to send the job to the queue
16+
17+
#### Example Usage:
18+
19+
source new-modules.sh
20+
module load gsl/1.16-fasrc02
21+
make
22+
sbatch gsl_int_test.sbatch
23+
24+
#### Example Output:
25+
26+
```
27+
result = -4.000000000000085265
28+
exact result = -4.000000000000000000
29+
estimated error = 0.000000000000135447
30+
actual error = -0.000000000000085265
31+
intervals = 8
32+
```

Libraries/GSL/README.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

Libraries/GSL/gsl_int_test.sbatch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#SBATCH -J gsl_int_test
3+
#SBATCH -o gsl_int_test.out
4+
#SBATCH -e gsl_int_test.err
5+
#SBATCH -p serial_requeue
6+
#SBATCH -t 30
7+
#SBATCH -N 1
8+
#SBATCH -n 1
9+
#SBATCH --mem=4000
10+
11+
# Load required modules
12+
source new-modules.sh
13+
module load gsl/1.16-fasrc02
14+
15+
# Run program
16+
./gsl_int_test.x

Libraries/HDF5/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#### Purpose:
2+
3+
Example of using HDF5 libraries on the cluster. The specific example creates a random vector and writes it to a HDF5 (.h5) file.
4+
5+
#### Contents:
6+
7+
(1) hdf5_test.f90: Fortran 90 source file
8+
9+
(2) Makefile: Makefile to compile the source code
10+
11+
(3) hdf5_test.sbatch: Btach-job submission script to send the job to the queue
12+
13+
#### Example Usage:
14+
15+
source new-modules.sh
16+
module load hdf5/1.8.12-fasrc08
17+
make
18+
sbatch hdf5_test.sbatch
19+
20+
#### Example Output:
21+
22+
```
23+
[pkrastev@sa01 HDF5]$ h5dump output.h5
24+
HDF5 "output.h5" {
25+
GROUP "/" {
26+
DATASET "darr" {
27+
DATATYPE H5T_IEEE_F64LE
28+
DATASPACE SIMPLE { ( 100 ) / ( 100 ) }
29+
DATA {
30+
(0): 0.19997, 0.141935, 0.9609, 0.557535, 0.638827, 0.462287, 0.498032,
31+
(7): 0.867238, 0.762328, 0.23642, 0.0605957, 0.150953, 0.948071,
32+
(13): 0.844535, 0.181702, 0.280175, 0.229308, 0.552097, 0.73992,
33+
(19): 0.331059, 0.388762, 0.41635, 0.325443, 0.412334, 0.631472,
34+
(25): 0.890654, 0.765588, 0.144551, 0.148686, 0.0065211, 0.367894,
35+
(31): 0.152968, 0.220681, 0.629017, 0.459204, 0.697648, 0.389048,
36+
(37): 0.919453, 0.199217, 0.58728, 0.363542, 0.754135, 0.194908,
37+
(43): 0.815831, 0.938569, 0.42343, 0.296155, 0.811725, 0.364881,
38+
(49): 0.893735, 0.00850734, 0.887926, 0.194576, 0.588769, 0.0942312,
39+
(55): 0.0470023, 0.921254, 0.331883, 0.0983307, 0.941179, 0.0732383,
40+
(61): 0.578579, 0.668021, 0.175048, 0.872878, 0.306461, 0.956044,
41+
(67): 0.13224, 0.905966, 0.758271, 0.98402, 0.417583, 0.187216,
42+
(73): 0.846184, 0.322552, 0.500836, 0.221774, 0.736674, 0.318103,
43+
(79): 0.584469, 0.9694, 0.433704, 0.0462207, 0.207506, 0.933283,
44+
(85): 0.789315, 0.484947, 0.045633, 0.756139, 0.152743, 0.741604,
45+
(91): 0.256809, 0.0134879, 0.440945, 0.603259, 0.94596, 0.566918,
46+
(97): 0.348724, 0.493279, 0.437733
47+
}
48+
}
49+
}
50+
}
51+
```

Libraries/HDF5/README.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

Libraries/HDF5/hdf5_test.sbatch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#SBATCH -J hdf5_test
3+
#SBATCH -o hdf5_test.out
4+
#SBATCH -e hdf5_test.err
5+
#SBATCH -p serial_requeue
6+
#SBATCH -t 30
7+
#SBATCH -N 1
8+
#SBATCH -n 1
9+
#SBATCH --mem=4000
10+
11+
# Load required modules
12+
source new-modules.sh
13+
module load hdf5/1.8.12-fasrc08
14+
15+
# Run program
16+
./hdf5_test.x

0 commit comments

Comments
 (0)