Re: [AMBER] cpptraj.MPI query

From: Debarati DasGupta <debarati_dasgupta.hotmail.com>
Date: Mon, 4 Nov 2019 20:50:11 +0000

Found it!

Something weird with bash
When I do

For x in `cat xac` ; do $MPI_HOME/bin/mpiexec -n 12 cpptraj.MPI -i "$x" ; done

It parses all my input one at a time….i get all my outputs

But if I do
While read x ; do do $MPI_HOME/bin/mpiexec -n 12 cpptraj.MPI -i "$x" ; done<xac

It does the first input and that’s it!
What is so different between using for loop versus a while loop!

Don’t know..
Any suggestions Daniel?
Thanks







________________________________
From: Debarati DasGupta <debarati_dasgupta.hotmail.com>
Sent: Monday, November 4, 2019 3:38:13 PM
To: AMBER Mailing List <amber.ambermd.org>
Subject: Re: [AMBER] cpptraj.MPI query

No it works!
RUN TIMING:
TIME: Init : 0.0636 s ( 0.01%)
TIME: Trajectory Process : 452.8666 s ( 99.75%)
TIME: Data Set Sync : 0.0075 s ( 0.00%)
TIME: Action Post : 0.0000 s ( 0.00%)
TIME: Analysis : 0.0000 s ( 0.00%)
TIME: Data File Write : 1.0228 s ( 0.23%)
TIME: Other : 0.0203 s ( 0.00%)
TIME: Run Total 453.9808 s
---------- RUN END ---------------------------------------------------
TIME: Total execution time: 454.5604 seconds.
--------------------------------------------------------------------------------
To cite CPPTRAJ use:
Daniel R. Roe and Thomas E. Cheatham, III, "PTRAJ and CPPTRAJ: Software for
  Processing and Analysis of Molecular Dynamics Trajectory Data". J. Chem.
  Theory Comput., 2013, 9 (7), pp 3084-3095.

[RUN8]$

It does not go to the next input file! Do it does distance_549.in..then it should start processing distance_550.in…nothing


It comes back to the terminal☹


Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

________________________________
From: Daniel Roe <daniel.r.roe.gmail.com>
Sent: Monday, November 4, 2019 3:28:49 PM
To: AMBER Mailing List <amber.ambermd.org>
Subject: Re: [AMBER] cpptraj.MPI query

Hi,

On Mon, Nov 4, 2019 at 3:08 PM Debarati DasGupta
<debarati_dasgupta.hotmail.com> wrote:
>
> It works as I just executed it and it reads the input properly:

So is it working? Is it freezing after '[trajin
/users/debarati/CHK_Kinase/IPA/1zys_md_8pmemdcuda/New4F_production.1.crd
1 1250 1]'?

-Dan

>
> while read x ; do echo "$x" "being processed" ; $MPI_HOME/bin/mpiexec -n 6 cpptraj.MPI -i "$x" ; done<xac
> distance_549.in being processed
>
> CPPTRAJ: Trajectory Analysis. V18.01 MPI
> ___ ___ ___ ___
> | \/ | \/ | \/ |
> _|_/\_|_/\_|_/\_|_
>
> | Running on 6 threads
> | Date/time: 11/04/19 15:05:42
> | Available memory: 2.024 GB
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
> From: Daniel Roe<mailto:daniel.r.roe.gmail.com>
> Sent: Monday, November 4, 2019 2:54 PM
> To: AMBER Mailing List<mailto:amber.ambermd.org>
> Subject: Re: [AMBER] cpptraj.MPI query
>
> Hi,
>
> Since executing cpptraj.MPI manually works, this makes me think the
> problem is in the script that calls cpptraj.MPI:
>
> > for x in `cat xac`; do
> > $MPI_HOME/bin/mpiexec -n 8 cpptraj.MPI -i "$x"
> > done
>
> Have you tried e.g. replacing the 'mpiexec' command with something
> like echo "$x" to make sure your variable is actually picking up the
> correct input file?
>
> -Dan
>
>
> On Mon, Nov 4, 2019 at 2:41
> PM Debarati DasGupta
> <debarati_dasgupta.hotmail.com> wrote:
> >
> > Yes it works for the manual input files: but why would not a simple for loop work?
> > Cant cpptraj.MPI take “$x” as a input file argument.
> >
> >
> >
> > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> >
> > ________________________________
> > From: Daniel Roe <daniel.r.roe.gmail.com>
> > Sent: Monday, November 4, 2019 2:17:11 PM
> > To: AMBER Mailing List <amber.ambermd.org>
> > Subject: Re: [AMBER] cpptraj.MPI query
> >
> > Hi,
> >
> > What version of cpptraj are you using? I'm using similar input and I
> > see no reasons why the run shouldn't complete.
> >
> > Maybe there's something odd with your script loop? Can you try to run
> > a test script where you specify the input files manually, e.g.
> >
> > mpirun -n 8 cpptraj.MPI -i distance_1.in
> > mpirun -n 8 cpptraj.MPI -i distance_2.in
> > mpirun -n 8 cpptraj.MPI -i distance_3.in
> > mpirun -n 8 cpptraj.MPI -i distance_4.in
> >
> > -Dan
> >
> > On Mon, Nov 4, 2019 at 10:35 AM Debarati DasGupta
> > <debarati_dasgupta.hotmail.com> wrote:
> > >
> > > Okay,this is the content of my distance_299.in file
> > >
> > >
> > > parm ~/setup_solvbox/pdb_layer_IPA_H2O_5-95vv.prmtop
> > > trajin New4A_production.1.crd 1 1250 1
> > > trajin New4B_production.1.crd 1 1250 1
> > > trajin New4C_production.1.crd 1 1250 1
> > > trajin New4D_production.1.crd 1 1250 1
> > > trajin New4E_production.1.crd 1 1250 1
> > > trajin New4F_production.1.crd 1 1250 1
> > > trajin New4G_production.1.crd 1 1250 1
> > > trajin New4H_production.1.crd 1 1250 1
> > > trajin New4I_production.1.crd 1 5000 1
> > > trajin New4J_production.1.crd 1 5000 1
> > > strip :WAT
> > > strip :Na+
> > >
> > > solvent pdb_layer_IPA_H2O_5-95vv.prmtop none
> > >
> > > reference PDB_layer_IPA_H2O.pdb
> > >
> > > rms reference mass out IPA_299_RMSD.txt :1-274.CA
> > >
> > > distance IPA_site1_RUN1 :299.C2 point -3 -0.875 7.25 noimage out distance_299_site1_RUN1.out
> > > distance IPA_site2_RUN1 :299.C2 point -15.25 -4.75 -24.375 noimage out distance_299_site2_RUN1.out
> > > go
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> > >
> > > ________________________________
> > > From: Daniel Roe <daniel.r.roe.gmail.com>
> > > Sent: Monday, November 4, 2019 10:20:00 AM
> > > To: AMBER Mailing List <amber.ambermd.org>
> > > Subject: Re: [AMBER] cpptraj.MPI query
> > >
> > > Sorry, I mean what is in e.g. 'distance_1.in'?
> > >
> > > -Dan
> > >
> > > On Mon, Nov 4, 2019 at 9:02 AM Debarati DasGupta
> > > <debarati_dasgupta.hotmail.com> wrote:
> > > >
> > > > Hi.
> > > >
> > > > These are the contents of the script:
> > > > #! /bin/bash
> > > > #SBATCH -J distance_on-off_IPA_xac
> > > > #SBATCH --partition=cluster1
> > > > #SBATCH --array=1-29%2
> > > > #SBATCH -n 8 # This means 8 core jobs will be running..
> > > >
> > > > ###############################################################
> > > > export submit_dir=/users/debarati/CHK_Kinase/ON_OFF/IPA/$1
> > > > cd $submit_dir
> > > > echo Working Directory = $submit_dir
> > > >
> > > > echo Hostname = `hostname -s`
> > > >
> > > > echo Date = `date`
> > > >
> > > > export AMBERHOME=/usr/local/amber18
> > > > export MPI_HOME=/usr/local/mpich-3.2.1
> > > > export LD_LIBRARY_PATH=$MPI_HOME/lib:$LD_LIBRARY_PATH
> > > >
> > > > name=$(awk -F "_" '{print $2}' "$2"| sed 's:.in::g')
> > > >
> > > >
> > > > for x in `cat xac`;
> > > > do $MPI_HOME/bin/mpiexec -n 8 cpptraj.MPI -i "$x"
> > > > done
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> > > >
> > > > ________________________________
> > > > From: Daniel Roe <daniel.r.roe.gmail.com>
> > > > Sent: Sunday, November 3, 2019 8:00:50 PM
> > > > To: AMBER Mailing List <amber.ambermd.org>
> > > > Subject: Re: [AMBER] cpptraj.MPI query
> > > >
> > > > If you just run cpptraj.MPI with distance_1.in, does it complete normally?
> > > > What commands are in that script?
> > > >
> > > > -Dan
> > > >
> > > > On Sun, Nov 3, 2019 at 12:39 PM Debarati DasGupta <
> > > > debarati_dasgupta.hotmail.com> wrote:
> > > >
> > > > > Can we execute cpptra.MPI using a simple for loop in bash:
> > > > >
> > > > > Like, I have done this with cpptraj it works; but I cant get it to work
> > > > > for cpptraj.MPI
> > > > >
> > > > > So when I type this:
> > > > > For x in `cat list` ; do cpptraj<”$x” ; echo “done for $x” ; done
> > > > >
> > > > > I get my distances calculated.. list is actually 100 input files by the
> > > > > name of distance_1.in distance_2.in distance_3.in .... so on till
> > > > > distance_100.in
> > > > >
> > > > >
> > > > > Now when I try doing the same thing for cpptraj.MPI
> > > > >
> > > > > While read x ;
> > > > > do $MPI_HOME/bin/mpiexec -n 12 cpptraj.MPI -i “$x” ;
> > > > > done<list
> > > > >
> > > > > It works for the first entry that is I get output for distance_1.in, but
> > > > > not the other 99 input files..
> > > > > Any reason what I am be doing wrong.
> > > > > Just to let you all know, I have exported AMBERHOME, MPI HOME, and
> > > > > LD_LIBRARY PATH properly in my slurm script...
> > > > > Thanks
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > AMBER mailing list
> > > > > AMBER.ambermd.org
> > > > > http://lists.ambermd.org/mailman/listinfo/amber
> > > > >
> > > > _______________________________________________
> > > > AMBER mailing list
> > > > AMBER.ambermd.org
> > > > http://lists.ambermd.org/mailman/listinfo/amber
> > > > _______________________________________________
> > > > AMBER mailing list
> > > > AMBER.ambermd.org
> > > > http://lists.ambermd.org/mailman/listinfo/amber
> > >
> > > _______________________________________________
> > > AMBER mailing list
> > > AMBER.ambermd.org
> > > http://lists.ambermd.org/mailman/listinfo/amber
> > > _______________________________________________
> > > AMBER mailing list
> > > AMBER.ambermd.org
> > > http://lists.ambermd.org/mailman/listinfo/amber
> >
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Nov 04 2019 - 13:00:03 PST
Custom Search