Commit eabaaa07 authored by Bhaskar Agarwal's avatar Bhaskar Agarwal
Browse files

launching scripts

parent 9308a043
import sys
sys.path.append('/dgx/home/userinternal/bagarwal/.conda/envs/rapids_extended/lib/python3.7/site-packages')
import cupy as cp
import dask
import dask.array as da
from dask_cuda import LocalCUDACluster
import dask_cudf
from dask.dataframe import from_array, from_pandas
from dask.distributed import Client
import mdtraj as md
import numpy as np
from dask_ml.metrics import mean_squared_error
#dataDir = '/dgx/home/userinternal/bagarwal/ligate/data/'
#fileName = dataDir + 'nsp16_nsp10_6wkq' #~5GB trajectory
#fileName = dataDir + 'NSP12-7-8_6M71' # 10 GB
#topol = fileName + '.pdb'
#trajs = fileName + '.xtc'
#print(topol,trajs)
#ref = md.load(topol)
#trj = md.load(trajs, top=topol)
#trj.center_coordinates()
if __name__=="__main__":
cluster = LocalCUDACluster(n_workers=4, protocol="ucx", enable_nvlink=True,rmm_pool_size='4GB')
client = Client(cluster)
print('CLUSTER ACTIVATED')
dataDir = '/dgx/home/userinternal/bagarwal/ligate/data/'
fileName = dataDir + 'nsp16_nsp10_6wkq' #~5GB trajectory
#fileName = dataDir + 'NSP12-7-8_6M71' # 10 GB
topol = fileName + '.pdb'
trajs = fileName + '.xtc'
ref = md.load(topol)
trj = md.load(trajs, top=topol)
trj.center_coordinates()
print('TRAJ LOADED')
mean_squared_error(da.asarray(trj.xyz), da.asarray(ref.xyz), squared=False)
print('ALL DONE')
client.close()
cluster.close()
#!/bin/bash
#SBATCH -N 1
#SBATCH --gres=gpu:4
#SBATCH --ntasks-per-node=16
#SBATCH -p dgx_usr_prod
#SBATCH -t 04:00:00
#SBATCH --cpus-per-task=2
#cd /dgx_scratch/userinternal/bagarwal
module load tools/anaconda
export SINGULARITY_TMPDIR='/dgx_scratch/userinternal/bagarwal/tmp'
singularity exec --nv --writable-tmpfs /dgx/home/userinternal/bagarwal/rapidsai-nightly_21.08-cuda11.0-runtime-ubuntu20.04-py3.7.sif /dgx/home/userinternal/bagarwal/nvscript.sh
#!/bin/bash
cd /
. /opt/conda/etc/profile.d/conda.sh
#conda env list
conda activate rapids
python /dgx/home/userinternal/bagarwal/gf_script.py
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment