Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mathworks-shared
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-kyb
mathworks-shared
Commits
892d550b
Commit
892d550b
authored
3 years ago
by
Blake Fitch
Browse files
Options
Downloads
Patches
Plain Diff
materials to work with mathworks on slurm
parent
74133d97
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+4
-2
4 additions, 2 deletions
README.md
cpu_bench.m
+56
-0
56 additions, 0 deletions
cpu_bench.m
nyx-sing-slurm.job.sh
+37
-0
37 additions, 0 deletions
nyx-sing-slurm.job.sh
with
97 additions
and
2 deletions
README.md
+
4
−
2
View file @
892d550b
# mathworks-shared
Shared repo to work with Mathworks on slurm, etc
\ No newline at end of file
Command line just with singularity:
module load singularity
singularity run /ptmp/containers/
<PICK
A
SINGULARITY
CONTAINER
>
-nodesktop -nojvm -r "run('/ptmp/bfitch/workflow-slurm-matlab/cpu_bench.m'); exit;"
This diff is collapsed.
Click to expand it.
cpu_bench.m
0 → 100644
+
56
−
0
View file @
892d550b
maxNumCompThreads
(
64
)
%for N=[10, 100, 1000, 2500, 5000, 7500, 10000, 100000]
for
N
=
[
1
,
2
,
4
,
8
,
16
,
32
,
64
,
128
,
256
,
512
,
1024
,
2048
]
%, 4096, 8192, 16384, 32768]
N_mult
=
32768
/
N
;
fprintf
(
'N = %d: '
,
N
);
rng
(
1
);
A
=
rand
(
N
);
B
=
rand
(
N
);
A_pd
=
A
*
A
'
;
tic
;
svd
(
A
);
t_svd
=
toc
;
fprintf
(
'SVD '
);
tic
;
chol
(
A_pd
);
t_chol
=
toc
;
fprintf
(
'Chol '
);
tic
;
qr
(
A
);
t_qr
=
toc
;
fprintf
(
'QR '
);
tic
;
for
k
=
1
:
N_mult
A
*
B
;
end
t_mult
=
toc
;
fprintf
(
'%d mult '
,
N_mult
);
tic
;
inv
(
A
);
t_inv
=
toc
;
fprintf
(
'Inv '
);
tic
;
pinv
(
A
);
t_pinv
=
toc
;
fprintf
(
'Pinv\n\n'
);
fprintf
(
'TIME IN SECONDS (SIZE: %d):\n'
,
N
);
fprintf
(
'maxNumCompThreads %d\n'
,
maxNumCompThreads
);
fprintf
(
'SVD: %f\n'
,
t_svd
);
fprintf
(
'Cholesky: %f\n'
,
t_chol
);
fprintf
(
'QR: %f\n'
,
t_qr
);
fprintf
(
'%d matrix products: %f\n'
,
N_mult
,
t_mult
);
fprintf
(
'Inverse: %f\n'
,
t_inv
);
fprintf
(
'Pseudo-inverse: %f\n\n'
,
t_pinv
);
end
This diff is collapsed.
Click to expand it.
nyx-sing-slurm.job.sh
0 → 100644
+
37
−
0
View file @
892d550b
#!/bin/bash -l
# Standard output and error:
#SBATCH -o ./tjob.out.%j
#SBATCH -e ./tjob.err.%j
# Initial working directory:
#SBATCH -D ./
# Job Name:
#SBATCH -J ml_bench
#
#
# Queue (Partition):
#SBATCH --partition=compute # nyx partitions: compute, highmem, gpu
#
# Number of nodes and MPI tasks per node:
#SBATCH --nodes=1
#SBATCH --tasks=1
#SBATCH --cpus-per-task=64
#SBATCH --exclusive
#
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=blake.fitch@tuebingen.mpg.de
#
# Wall clock limit:
#SBATCH --time=01:00:00
module purge
module load singularity
export
SINGULARITY_BIND
=
"/ptmp,/scratch"
export
SINGULARITYENV_MATLABPATH
=
$PWD
export
MATLAB_CONTAINER_PATH
=
/ptmp/containers/matlab_r2021a-2021-05-10.sif
echo
"Here we go..."
time
${
MATLAB_CONTAINER_PATH
}
-nodesktop
-nojvm
-r
"run('/home/bfitch/workflow-slurm-matlab/cpu_bench.m'); exit;"
echo
" ... done."
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment