queation about running the R script in parallel mode

Issue #686 resolved
Mahnaz Tehrani created an issue

Hi all,

I am testing some analysis directory by submitting the R script in parallel mode because my dcd file is so big and not doable to run via RStudio. I picked “hivp.dcd” as test:

library(bio3d)

library(igraph)

dcd <- read.dcd("hivp.dcd")

pdb <- read.pdb("hivp.pdb")

ca.inds <- atom.select(pdb, elety = "CA")

xyz <- fit.xyz(fixed = pdb$xyz, mobile = trj,

fixed.inds = ca.inds$xyz,

mobile.inds = ca.inds$xyz)

rd <- rmsd(xyz[1, ca.inds$xyz], xyz[, ca.inds$xyz])

plot(rd, typ = "l", ylab = "RMSD", xlab = "Frame No.")

points(lowess(rd), typ = "l", col = "red", lty = 2, lwd = 2)

# Root Mean Squared Fluctuations (RMSF)

rf <- rmsf(xyz[, ca.inds$xyz])

plot(rf, ylab = "RMSF", xlab = "Residue Position", typ="l")

pc <- pca.xyz(xyz[, ca.inds$xyz])

plot(pc, col = bwr.colors(nrow(xyz)))

# Cluster in PC space

hc <- hclust(dist(pc$z[, 1:2]))

grps <- cutree(hc, k = 2)

plot(pc, col = grps)

# Cross-Correlation Analysis

cij <- dccm(xyz[, ca.inds$xyz])

plot(cij)

after a short time, the calculation has been stopped at this point.

Any help would be appreciated.

Cheers

Zahra

library(bio3d)

library(igraph)

dcd <- read.dcd("hivp.dcd")

NATOM = 198

NFRAME= 117

ISTART= 0

last = 117

nstep = 117

nfile = 117

NSAVE = 1

NDEGF = 0

version 24

|======================================================================| 100%

pdb <- read.pdb("hivp.pdb")

ca.inds <- atom.select(pdb, elety = "CA")

xyz <- fit.xyz(fixed = pdb$xyz, mobile = trj,

+ fixed.inds = ca.inds$xyz,

+ mobile.inds = ca.inds$xyz)

Comments (6)

  1. Xinqiu Yao

    Hi,

    Can you tell what bio3d version and OS environment you used? For example, the output of sessionInfo(). Also, it would be helpful if you can try another computer (e.g., a Linux) and see if the problem persists.

  2. Mahnaz Tehrani reporter

    Dear Xinqiu,
    Hi and thanks for the answer.I have used it on linux (metacentrum supercomputer).
    Here you can find technical informatin:

    Thanks in advanced
    Cheers
    Zahra

    uname -v
    #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21)

    sessionInfo()
    R version 3.5.1 (2018-07-02)
    Platform: x86_64-pc-linux-gnu (64-bit)
    Running under: Debian GNU/Linux 9 (stretch)

    Matrix products: default
    BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
    LAPACK: /usr/lib/atlas-base/atlas/liblapack.so.3.0

    locale:
    [1] C

    attached base packages:
    [1] stats graphics grDevices utils datasets methods base

    loaded via a namespace (and not attached):
    [1] compiler_3.5.1

    BIO3D versin: 2.3-4

    here is the submit.sh file have used to run the R-script..

    #PBS -N helloR
    #PBS -l walltime=2:00:00
    #PBS -l select=1:ncpus=1:mem=4gb:scratch_local=5gb

    #clean scratch after the end
    trap 'clean_scratch' TERM EXIT

    #INPUT directory - with R script and other inputs
    MYIN=/storage/brno6/home/zahratehrani7/data-analysis-R/test/test-2
    #INPUT R script
    MYR=md.R
    #OUTPUT directory - where to store results
    MYOUT=/storage/brno6/home/zahratehrani7/data-analysis-R/test/test-2/mdRout
    mkdir -p $MYOUT

    module add R-3.5.1-gcc
    export R_LIBS="/storage/brno6/home/$LOGNAME/Rpackages"
    #export PATH=/storage/brno6/home/zahratehrani7/bio3d:$PATH

    go to scratch directory

    cd $SCRATCHDIR || exit 2

    copy all files from $MYIN

    cp $MYIN/* .

    R -q --vanilla < $MYR > $MYR.output
    #copy everything to MYOUT
    cp * $MYOUT/

  3. Xinqiu Yao

    Hi,

    Have you tested it on a single computer? If it is only a problem in the parallel environment, you might need to contact your administrator of the cluster regarding the issue.

  4. Log in to comment