-
Notifications
You must be signed in to change notification settings - Fork 1
add nvidia benchmark #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
emilannevelink
wants to merge
2
commits into
BattModels:main
Choose a base branch
from
emilannevelink:emil/lammps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| lammps.sif | ||
| log.lammps | ||
| out.* | ||
| logs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| 'run.sh' and 'install.sh' assume that conda is on the path. You may need to modify to load conda. | ||
|
|
||
| `submit.sh` is a simple test script to submit on Bridges-2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import os | ||
| import json | ||
| import yaml | ||
|
|
||
| out = {} | ||
| nextline = False | ||
| logfile = 'log.lammps' | ||
| path = '' | ||
| if not os.path.isfile(logfile): | ||
| path = 'benchmarks/lammps-allegro' | ||
| f = open(os.path.join(path,logfile)) | ||
| for line in f.readlines(): | ||
| if 'Performance' in line: | ||
| print(line) | ||
| out['raw1'] = line | ||
| _, p1, u1, p2, u2 = line.split(' ') | ||
| out['simulation length'] = float(p1) | ||
| out['simulation length units'] = u1[:-1] | ||
| out['timesteps/s'] = float(p2) | ||
| nextline = True | ||
| elif nextline: | ||
| print(line) | ||
| out['raw2'] = line | ||
| out['utilization'] = line.split(' ')[0] | ||
| nextline = False | ||
|
|
||
| f.close() | ||
|
|
||
| with open( | ||
| os.path.join(path,'out.yaml'),'w' | ||
| ) as fl: | ||
| yaml.dump(out,fl) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # 3d Lennard-Jones melt | ||
|
|
||
| variable x index 1 | ||
| variable y index 1 | ||
| variable z index 1 | ||
|
|
||
| variable xx equal 20*$x | ||
| variable yy equal 20*$y | ||
| variable zz equal 20*$z | ||
|
|
||
| units lj | ||
| atom_style atomic | ||
|
|
||
| lattice fcc 0.8442 | ||
| region box block 0 ${xx} 0 ${yy} 0 ${zz} | ||
| create_box 1 box | ||
| create_atoms 1 box | ||
| mass 1 1.0 | ||
|
|
||
| velocity all create 1.44 87287 loop geom | ||
|
|
||
| pair_style lj/cut 2.5 | ||
| pair_coeff 1 1 1.0 1.0 2.5 | ||
|
|
||
| neighbor 0.3 bin | ||
| neigh_modify delay 0 every 20 check no | ||
|
|
||
| fix 1 all nve | ||
|
|
||
| run 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| chmod +x run.sh | ||
|
|
||
| mkdir logs | ||
|
|
||
| conda create -n env python=3.9 | ||
| conda activate env | ||
| conda install pyyaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/bash | ||
|
|
||
| set -e; set -o pipefail | ||
|
|
||
| # Build SIF, if it doesn't exist | ||
| if [[ ! -f lammps.sif ]]; then | ||
| singularity build lammps.sif docker://nvcr.io/hpc/lammps:29Oct2020 | ||
| fi | ||
|
|
||
| readonly gpus_per_node=$(( SLURM_NTASKS / SLURM_JOB_NUM_NODES )) | ||
|
|
||
| echo "Running Lennard Jones 8x8x8 example on ${SLURM_NTASKS} GPUS..." | ||
| # echo "Running 2NN MEAM example on ${SLURM_NTASKS} GPUS..." | ||
| srun --mpi=pmi2 \ | ||
| singularity run --nv -B ${PWD}:/host_pwd lammps.sif \ | ||
| lmp -k on g ${gpus_per_node} -sf kk -pk kokkos cuda/aware on neigh full comm device binsize 2.8 -var x 8 -var y 8 -var z 8 -in /host_pwd/in.lj.txt | ||
|
|
||
| conda activate env | ||
| python get_performance.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/bash | ||
|
|
||
| #SBATCH -t 00-01:00 | ||
| #SBATCH -J lammps_benchmark | ||
| #SBATCH -o logs/output.%j | ||
| #SBATCH -e logs/error.%j | ||
| #SBATCH -p GPU-shared | ||
| #SBATCH -N 1 | ||
| #SBATCH --ntasks=1 | ||
| #SBATCH --gpus=v100-32:1 | ||
| #SBATCH --mem-per-gpu=50000 | ||
| #SBATCH --mail-user=eannevel@andrew.cmu.edu | ||
|
|
||
| module load anaconda3 | ||
|
|
||
| ./run.sh |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to print a score, is 1/wall time sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it writes a yaml file with different performance metrics. 1/wall time is sufficient, but there is also a timesteps/s that is a more standard metric that is to be maximized