Skip to content

Commit

Permalink
Merge pull request #73 from pyiron/env
Browse files Browse the repository at this point in the history
use PYIRON_CORES and PYIRON_THREADS
  • Loading branch information
jan-janssen authored Jun 28, 2024
2 parents 9ff7207 + bacc265 commit aba8b8e
Show file tree
Hide file tree
Showing 30 changed files with 25 additions and 33 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
mv ../thermodynamics resources
mv ../LICENSE resources
mv ../damask resources
mv ../templates resources
mkdir resources/lammps/potentials
mv iprpy-data/share/iprpy/potentials_lammps.csv resources/lammps/potentials/potentials_lammps.csv
mv iprpy-data/share/iprpy/potential_LAMMPS resources/lammps/potentials/potential_LAMMPS
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
mv ../thermodynamics resources
mv ../LICENSE resources
mv ../damask resources
mv ../templates resources
mkdir resources/lammps/potentials
mv iprpy-data/share/iprpy/potentials_lammps.csv resources/lammps/potentials/potentials_lammps.csv
mv iprpy-data/share/iprpy/potential_LAMMPS resources/lammps/potentials/potential_LAMMPS
Expand Down
2 changes: 1 addition & 1 deletion damask/bin/run_damask_3.0.0.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
export OMP_NUM_THREADS=1
export OMP_NUM_THREADS="${PYIRON_CORES:=1}"
DAMASK_grid -m material.yaml -l loading.yaml -g damask.vti
2 changes: 1 addition & 1 deletion damask/bin/run_damask_3.0.0_mpi.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
export OMP_NUM_THREADS=$1
export OMP_NUM_THREADS="${PYIRON_CORES:=$1}"
DAMASK_grid -m material.yaml -l loading.yaml -g damask.vti
2 changes: 0 additions & 2 deletions lammps/bin/run_lammps_2020.03.03.sh

This file was deleted.

2 changes: 0 additions & 2 deletions lammps/bin/run_lammps_2020.03.03_mpi.sh

This file was deleted.

2 changes: 2 additions & 0 deletions lammps/bin/run_lammps_2024.02.07.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mpiexec -n ${PYIRON_CORES:=1} --oversubscribe lmp_mpi -in control.inp;
2 changes: 2 additions & 0 deletions lammps/bin/run_lammps_2024.02.07_mpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mpiexec -n ${PYIRON_CORES:=$1} --oversubscribe lmp_mpi -in control.inp;
2 changes: 1 addition & 1 deletion mlip/bin/run_lammpsmlip_2020.12.24.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
mpiexec -n 1 lmp_mpi -in control.inp
mpiexec -n ${PYIRON_CORES:=1} lmp_mpi -in control.inp
2 changes: 1 addition & 1 deletion mlip/bin/run_lammpsmlip_2020.12.24_mpi.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
mpiexec -n $1 lmp_mpi -in control.inp
mpiexec -n ${PYIRON_CORES:=$1} lmp_mpi -in control.inp
2 changes: 1 addition & 1 deletion mlip/bin/run_mlip_1.0.0_mpi.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
export MLP_COMMAND_PARALLEL="mpiexec -n $1 mlp"
export MLP_COMMAND_PARALLEL="mpiexec -n ${PYIRON_CORES:=$1} mlp"
export MLP_COMMAND_SERIAL="mlp"

chmod +x mlip.sh
Expand Down
2 changes: 1 addition & 1 deletion mlip/bin/run_mlipjob_1.0.0_mpi.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
mpiexec -n $1 mlp run mlip.ini --filename=structure.cfg
mpiexec -n ${PYIRON_CORES:=$1} mlp run mlip.ini --filename=structure.cfg
2 changes: 1 addition & 1 deletion quantumespresso/bin/run_quantumespresso_6.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# export ESPRESSO_PSEUDO=${DIR}/../potentials
export ESPRESSO_PSEUDO=${CONDA_PREFIX}/share/pslibrary/pbe/PSEUDOPOTENTIALS/
mpirun -np 1 pw.x -in pyiron.pwi > pyiron.pwo
mpirun -np ${PYIRON_CORES:=1} pw.x -in pyiron.pwi > pyiron.pwo
2 changes: 1 addition & 1 deletion quantumespresso/bin/run_quantumespresso_6.3_mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# export ESPRESSO_PSEUDO=${DIR}/../potentials
export ESPRESSO_PSEUDO=${CONDA_PREFIX}/share/pslibrary/pbe/PSEUDOPOTENTIALS/
mpirun -np ${1} pw.x -in pyiron.pwi > pyiron.pwo
mpirun -np ${PYIRON_CORES:=$1} pw.x -in pyiron.pwi > pyiron.pwo
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ if [ ! -z $2 ]; then
SX_THREADS=$2
NCORES=$(echo "$1/$SX_THREADS" | bc)
export SX_THREADS
elif [ ! -z $PYIRON_THREADS ]; then
SX_THREADS=$PYIRON_THREADS
NCORES=$(echo "$PYIRON_CORES/$SX_THREADS" | bc)
export SX_THREADS
else
NCORES=$1
NCORES="${PYIRON_CORES:=$1}"
fi
mpiexec -n $NCORES sphinx --opts > sphinx.log
mpiexec -n $NCORES sphinx >> sphinx.log
Expand Down
1 change: 0 additions & 1 deletion templates/DemoScriptJob/input.json

This file was deleted.

9 changes: 0 additions & 9 deletions templates/DemoScriptJob/script.py

This file was deleted.

2 changes: 0 additions & 2 deletions vasp/bin/run_vasp_5.4.4_default_mpi.sh

This file was deleted.

2 changes: 0 additions & 2 deletions vasp/bin/run_vasp_5.4.4_gam_mpi.sh

This file was deleted.

2 changes: 0 additions & 2 deletions vasp/bin/run_vasp_5.4.4_ncl_mpi.sh

This file was deleted.

2 changes: 0 additions & 2 deletions vasp/bin/run_vasp_5.4.4_std_mpi.sh

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions vasp/bin/run_vasp_6.4.3_default_mpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mpiexec -n ${PYIRON_CORES:=$1} vasp_std
File renamed without changes.
2 changes: 2 additions & 0 deletions vasp/bin/run_vasp_6.4.3_gam_mpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mpiexec -n ${PYIRON_CORES:=$1} vasp_gam
File renamed without changes.
2 changes: 2 additions & 0 deletions vasp/bin/run_vasp_6.4.3_ncl_mpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mpiexec -n ${PYIRON_CORES:=$1} vasp_ncl
File renamed without changes.
2 changes: 2 additions & 0 deletions vasp/bin/run_vasp_6.4.3_std_mpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
mpiexec -n ${PYIRON_CORES:=$1} vasp_std

0 comments on commit aba8b8e

Please sign in to comment.