Skip to content
Permalink
Browse files

Adding config for bridges and conda setup scripts. Tested.

  • Loading branch information
Yadu Nand Babuji
Yadu Nand Babuji committed Jun 19, 2020
1 parent 84fdfff commit 8aa31ffda04a009f83903bcd4c11efc6896685e5
@@ -0,0 +1,39 @@
from parsl.config import Config
from parsl.providers import SlurmProvider
from parsl.launchers import SrunLauncher
from parsl.executors import HighThroughputExecutor
from parsl.addresses import address_by_interface
from .user_opts import user_opts


def fresh_config():
return Config(
executors=[
HighThroughputExecutor(
label='Bridges_HTEX_multinode',
# This is the network interface on the login node to
# which compute nodes can communicate
# address=address_by_interface('bond0.144'),
max_workers=1,
provider=SlurmProvider(
user_opts['bridges']['partition'], # Partition / QOS
nodes_per_block=2,
init_blocks=1,
# string to prepend to #SBATCH blocks in the submit
# script to the scheduler eg: '#SBATCH --constraint=knl,quad,cache'
scheduler_options=user_opts['bridges']['scheduler_options'],

# Command to be run before starting a worker, such as:
# 'module load Anaconda; source activate parsl_env'.
worker_init=user_opts['bridges']['worker_init'],

# We request all hyperthreads on a node.
launcher=SrunLauncher(),
walltime='00:10:00',
# Slurm scheduler on Cori can be slow at times,
# increase the command timeouts
cmd_timeout=120,
),
)
]
)
@@ -154,6 +154,15 @@ EOF
echo "cd $PWD;" >> ~/setup_parsl_test_env.sh
echo "source $PWD/parsl_$PARSL_GITHASH.py$python_version/bin/activate;" >> ~/setup_parsl_test_env.sh

elif [[ "$(hostname -f)" =~ .*bridges.* ]]
then
echo "On bridges"
module load anaconda3
conda create -p $CONDA_TARGET python=3.7 --yes --force
source activate $PWD/$CONDA_TARGET
echo "module load anaconda3" > ~/setup_parsl_test_env.sh
echo "source activate $PWD/$CONDA_TARGET" >> ~/setup_parsl_test_env.sh

else
echo "Unknown site"
exit -1
@@ -52,6 +52,11 @@ def fresh_config():
from parsl.tests.configs.cc_in2p3 import fresh_config
config = fresh_config()

elif 'bridges' in socket.getfqdn():
print("Loading bridges config")
from parsl.tests.configs.bridges import fresh_config
config = fresh_config()

elif 'cooley' in hostname:
print("on Cooley, loading PetrelKube config")
from parsl.tests.configs.petrelkube import fresh_config

1 comment on commit 8aa31ff

@danielskatz

This comment has been minimized.

Copy link
Collaborator

@danielskatz danielskatz commented on 8aa31ff Jun 20, 2020

Can you also add a bridges config to the docs?

Please sign in to comment.
You can’t perform that action at this time.