-
Notifications
You must be signed in to change notification settings - Fork 41
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 #26 from PPPLDeepLearning/jenkins_test
Jenkins test + Python3 and 1D Profile Fixes
- Loading branch information
Showing
20 changed files
with
232 additions
and
123 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
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,51 @@ | ||
#!/bin/bash | ||
|
||
export OMPI_MCA_btl="tcp,self,sm" | ||
|
||
echo ${PWD} | ||
|
||
echo "Jenkins test Python3.6" | ||
rm /tigress/alexeys/model_checkpoints/* | ||
rm -rf /tigress/alexeys/processed_shots | ||
rm -rf /tigress/alexeys/processed_shotlists | ||
rm -rf /tigress/alexeys/normalization | ||
module load anaconda3/4.4.0 | ||
source activate /tigress/alexeys/jenkins/.conda/envs/jenkins3 | ||
module load cudatoolkit/8.0 | ||
module load cudnn/cuda-8.0/6.0 | ||
module load openmpi/cuda-8.0/intel-17.0/2.1.0/64 | ||
module load intel/17.0/64/17.0.4.196 | ||
|
||
echo ${PWD} | ||
cd /home/alexeys/jenkins/workspace/FRNM/PPPL | ||
echo ${PWD} | ||
python setup.py install | ||
|
||
echo $SLURM_NODELIST | ||
cd examples | ||
echo ${PWD} | ||
ls ${PWD} | ||
sed -i -e 's/num_epochs: 1000/num_epochs: 2/g' conf.yaml | ||
sed -i -e 's/data: jet_data/data: jenkins_jet/g' conf.yaml | ||
|
||
srun python mpi_learn.py | ||
|
||
echo "Jenkins test Python2.7" | ||
#rm /tigress/alexeys/model_checkpoints/* | ||
|
||
#source deactivate | ||
#module purge | ||
#module load anaconda/4.4.0 | ||
#source activate /tigress/alexeys/jenkins/.conda/envs/jenkins2 | ||
#module load cudatoolkit/8.0 | ||
#module load cudnn/cuda-8.0/6.0 | ||
#module load openmpi/cuda-8.0/intel-17.0/2.1.0/64 | ||
#module load intel/17.0/64/17.0.4.196 | ||
|
||
#cd .. | ||
#python setup.py install | ||
|
||
#echo $SLURM_NODELIST | ||
#cd examples | ||
#sed -i -e 's/data: jenkins_jet/data: jenkins_d3d/g' conf.yaml | ||
#srun python mpi_learn.py |
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,56 @@ | ||
from plasma.utils.batch_jobs import generate_working_dirname,copy_files_to_environment,start_jenkins_job | ||
import yaml | ||
import sys,os,getpass | ||
import plasma.conf | ||
|
||
num_nodes = 4 #Set in the Jenkins project area!! | ||
test_matrix = [("Python3","jet_data"),("Python2","jet_data")] | ||
|
||
run_directory = "{}/{}/jenkins/".format(plasma.conf.conf['fs_path'],getpass.getuser()) | ||
template_path = os.environ['PWD'] | ||
conf_name = "conf.yaml" | ||
executable_name = "mpi_learn.py" | ||
|
||
def generate_conf_file(test_configuration,template_path = "../",save_path = "./",conf_name="conf.yaml"): | ||
assert(template_path != save_path) | ||
with open(os.path.join(template_path,conf_name), 'r') as yaml_file: | ||
conf = yaml.load(yaml_file) | ||
conf['training']['num_epochs'] = 2 | ||
conf['paths']['data'] = test_configuration[1] | ||
if test_configuration[1] == "Python3": | ||
conf['env']['name'] = "PPPL_dev3" | ||
conf['env']['type'] = "anaconda3" | ||
else: | ||
conf['env']['name'] = "PPPL" | ||
conf['env']['type'] = "anaconda" | ||
|
||
with open(os.path.join(save_path,conf_name), 'w') as outfile: | ||
yaml.dump(conf, outfile, default_flow_style=False) | ||
return conf | ||
|
||
working_directory = generate_working_dirname(run_directory) | ||
os.makedirs(working_directory) | ||
|
||
os.system(" ".join(["cp -p",os.path.join(template_path,conf_name),working_directory])) | ||
os.system(" ".join(["cp -p",os.path.join(template_path,executable_name),working_directory])) | ||
|
||
#os.chdir(working_directory) | ||
#print("Going into {}".format(working_directory)) | ||
|
||
for ci in test_matrix: | ||
subdir = working_directory + "/{}/".format(ci[0]) | ||
os.makedirs(subdir) | ||
copy_files_to_environment(subdir) | ||
print("Making modified conf") | ||
conf = generate_conf_file(ci,working_directory,subdir,conf_name) | ||
print("Starting job") | ||
if ci[1] == "Python3": | ||
env_name = "PPPL_dev3" | ||
env_type = "anaconda3" | ||
else: | ||
env_name = "PPPL" | ||
env_type = "anaconda" | ||
start_jenkins_job(subdir,num_nodes,executable_name,ci,env_name,env_type) | ||
|
||
|
||
print("submitted jobs.") |
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,21 @@ | ||
#!/usr/bin/env python | ||
|
||
import mpi4py as mmm | ||
print(mmm.__version__) | ||
|
||
import keras as kk | ||
print(kk.__version__) | ||
|
||
import tensorflow as tf | ||
print(tf.__version__) | ||
|
||
from mpi4py import MPI | ||
import sys | ||
|
||
size = MPI.COMM_WORLD.Get_size() | ||
rank = MPI.COMM_WORLD.Get_rank() | ||
name = MPI.Get_processor_name() | ||
|
||
sys.stdout.write( | ||
"Hello, World! I am process %d of %d on %s.\n" | ||
% (rank, size, name)) |
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,25 @@ | ||
#!/bin/bash | ||
|
||
export OMPI_MCA_btl="tcp,self,sm" | ||
|
||
module load anaconda3/4.4.0 | ||
source activate /tigress/alexeys/jenkins/.conda/envs/jenkins3 | ||
module load cudatoolkit/8.0 | ||
module load cudnn/cuda-8.0/6.0 | ||
module load openmpi/cuda-8.0/intel-17.0/2.1.0/64 | ||
module load intel/17.0/64/17.0.4.196 | ||
|
||
cd /home/alexeys/jenkins/workspace/FRNM/PPPL | ||
python setup.py install | ||
|
||
echo `which python` | ||
echo `which mpicc` | ||
|
||
echo ${PWD} | ||
echo $SLURM_NODELIST | ||
|
||
cd jenkins-ci | ||
echo ${PWD} | ||
ls ${PWD} | ||
|
||
srun python validate_jenkins.py |
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
Oops, something went wrong.