-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from RuiApostolo/gh-pages
Added GPU exercise and info on KOKKOS package
- Loading branch information
Showing
12 changed files
with
159 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,85 @@ | ||
#################################### | ||
# Example LAMMPS input script # | ||
# for a simple Lennard Jones fluid # | ||
#################################### | ||
|
||
#################################### | ||
# 0) Define vairables | ||
#################################### | ||
|
||
variable DENSITY equal 0.8 | ||
|
||
#################################### | ||
# 1) Set up simulation box | ||
# - We set a 3D periodic box | ||
# - Our box has 10x10x10 atom | ||
# positions, evenly distributed | ||
# - The atom starting sites are | ||
# separated such that the box density | ||
# is 0.6 | ||
#################################### | ||
|
||
units lj | ||
atom_style atomic | ||
dimension 3 | ||
boundary p p p | ||
|
||
lattice sc ${DENSITY} | ||
region box block 0 50 0 50 0 50 | ||
create_box 1 box | ||
create_atoms 1 box | ||
|
||
#################################### | ||
# 2) Define interparticle interactions | ||
# - Here, we use truncated & shifted LJ | ||
# - All atoms of type 1 (in this case, all atoms) | ||
# have a mass of 1.0 | ||
#################################### | ||
|
||
pair_style lj/cut 3.5 | ||
pair_modify shift yes | ||
pair_coeff 1 1 1.0 1.0 | ||
mass 1 1.0 | ||
|
||
#################################### | ||
# 3) Neighbour lists | ||
# - Each atom will only consider neighbours | ||
# within a distance of 2.8 of each other | ||
# - The neighbour lists are recalculated | ||
# every timestep | ||
#################################### | ||
|
||
neighbor 0.3 bin | ||
neigh_modify delay 10 every 1 | ||
|
||
#################################### | ||
# 4) Define simulation parameters | ||
# - We fix the temperature and | ||
# linear and angular momenta | ||
# of the system | ||
# - We run with fixed number (n), | ||
# volume (v), temperature (t) | ||
#################################### | ||
|
||
fix LinMom all momentum 50 linear 1 1 1 angular | ||
fix 1 all nvt temp 1.00 1.00 5.0 | ||
#fix 1 all npt temp 1.0 1.0 25.0 iso 1.5150 1.5150 10.0 | ||
|
||
#################################### | ||
# 5) Final setup | ||
# - Define starting particle velocity | ||
# - Define timestep | ||
# - Define output system properties (temp, energy, etc.) | ||
# - Define simulation length | ||
#################################### | ||
|
||
velocity all create 1.0 199085 mom no | ||
|
||
timestep 0.005 | ||
|
||
thermo_style custom step temp etotal pe ke press vol density | ||
thermo 500 | ||
|
||
run_style verlet | ||
|
||
run 50000 |
This file contains 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,26 @@ | ||
#!/bin/bash | ||
|
||
# Slurm job options (name, number of compute nodes, job time) | ||
#SBATCH --job-name=lmp_ex4 | ||
#SBATCH --nodes=1 | ||
#SBATCH --gpus=1 | ||
#SBATCH --time=0:05:0 | ||
|
||
# The budget code of the project | ||
#SBATCH --account=ta176 | ||
# Standard partition | ||
#SBATCH --partition=gpu | ||
# Short QoS since our runtime is under 20m | ||
#SBATCH --qos=gpu-shd | ||
|
||
# load the lammps module | ||
module load lammps-gpu | ||
|
||
# Set the number of threads to 1 | ||
# This prevents any threaded system libraries from automatically | ||
# using threading. | ||
export OMP_NUM_THREADS=1 | ||
|
||
# Launch the parallel job | ||
srun --ntasks=1 --cpus-per-task=1 --hint=nomultithread --distribution=block:block \ | ||
lmp -k on g 1 -pk kokkos -sf kk -i in.lj_exercise -l log_gpu.$SLURM_JOB_ID |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.