NaCl Tutorial: Trouble Initializing

205 views
Skip to first unread message

Lauren Raguette

unread,
Sep 13, 2021, 12:33:08 PM9/13/21
to westpa-users
Hi everyone,

I'm starting the Basic NaCl in Amber tutorial after doing the conda install and having trouble initializing. When I run ./init.sh I'm getting the following error:

Traceback (most recent call last):
  File "/mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05/westpa-2020.03/lib/cmds/w_init.py", line 12, in <module>
    import westpa
  File "/mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05/westpa-2020.03/lib/west_tools/westpa/__init__.py", line 1, in <module>
    from . import _rc
  File "/mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05/westpa-2020.03/lib/west_tools/westpa/_rc.py", line 11, in <module>
    from .yamlcfg import YAMLConfig
  File "/mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05/westpa-2020.03/lib/west_tools/westpa/yamlcfg.py", line 21, in <module>
    from westpa.binning import NopMapper
  File "/mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05/westpa-2020.03/lib/west_tools/westpa/binning/__init__.py", line 1, in <module>
    from . import _assign
ImportError: /mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05/westpa-2020.03/lib/west_tools/westpa/binning/_assign.so: undefined symbol: _Py_ZeroStruct

Any thoughts here?

Thank you!
Lauren Raguette
Stony Brook University
init.sh
env.sh

Leung, Jeremy

unread,
Sep 13, 2021, 12:42:20 PM9/13/21
to westpa...@googlegroups.com
Hi Lauren,

Thank you for your interest in WESTPA.

It seems like the error is related to a mismatch between your running python version and what's installed. In env.sh, if you replace your $WEST_PYTHON to the python WESTPA is installed (westpa-2020.05):
export WEST_PYTHON=/mnt/raidc2/lraguette/.conda/envs/westpa-2020.05/bin/python

That should hopefully fix it.

Regards,

Jeremy L.
--
Jeremy M. G. Leung
PhD Candidate, Chemistry
Graduate Student Researcher, Chemistry 
University of Pittsburgh | 219 Parkman Avenue, Pittsburgh, PA 15260
jml...@pitt.edu | [He, Him, His]

--
You received this message because you are subscribed to the Google Groups "westpa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to westpa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/westpa-users/d93be51c-dd6f-41a8-9e5d-cc4d3b7683d7n%40googlegroups.com.
<init.sh><env.sh>

Anthony Bogetti

unread,
Sep 13, 2021, 8:46:41 PM9/13/21
to westpa...@googlegroups.com
Hi Lauren,

Just in case you are still running into an error, I have fixed that tutorial on Github and pushed changes to env.sh, please clone the new westpa_tutorial repository and try again.  Some of those lines that were giving you trouble are not needed anymore and I should have removed them a long time ago, sorry about that!

I responded to another post a bit ago with the following instructions, but I'll also post them here in case you want to try a fresh installation along with the new tutorial files:

1. mkdir test && cd test
2. conda create -n westpa-2020.05-test -c conda-forge westpa
3. conda activate westpa-2020.05-test
4. source $HOME/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/westpa.sh #You will need to change the bold part to the path of your specific anaconda installation
5. which w_ipa #This is just a test to make sure the paths were set up correctly, ideally you would see the path to the installation in the command above
6. (clone the westpa_tutorials repo, cd into the basic_nacl_amber folder and run init.sh)

If you encounter any errors when going through those steps please let me know and we can work through it.  Hopefully the error you encountered before will be resolved with the modified tutorial files, but just in case the above instructions should help with troubleshooting.

Best,
Anthony



--

Lauren Raguette

unread,
Sep 14, 2021, 8:28:45 AM9/14/21
to westpa...@googlegroups.com
Thank you so much!

I got it to initalizie with those steps, Anthony, but when I tried to run it after the initialization I got the following error in my west.log:

Tue Sep 14 08:27:01 2021
Iteration 1 (1 requested)
Beginning iteration 1
5 segments remain in iteration 1 (5 total)
1 of 21 (4.761905%) active bins are populated
per-bin minimum non-zero probability:       1
per-bin maximum probability:                1
per-bin probability dynamic range (kT):     0
per-segment minimum non-zero probability:   0.2
per-segment maximum non-zero probability:   0.2
per-segment probability dynamic range (kT): 0
norm = 1, error in norm = 0 (0*epsilon)
-- ERROR    [west.propagators.executable] -- could not read pcoord from '/tmp/tmpj2kd4v08': ValueError('progress coordinate data has incorrect shape (0, 1) [expected (51, 1)]')
-- ERROR    [west.propagators.executable] -- could not read pcoord from '/tmp/tmpk7ti_sbu': ValueError('progress coordinate data has incorrect shape (0, 1) [expected (51, 1)]')
-- ERROR    [west.propagators.executable] -- could not read pcoord from '/tmp/tmpqub5v_fx': ValueError('progress coordinate data has incorrect shape (0, 1) [expected (51, 1)]')
-- ERROR    [west.propagators.executable] -- could not read pcoord from '/tmp/tmpcwddgzlq': ValueError('progress coordinate data has incorrect shape (0, 1) [expected (51, 1)]')
-- ERROR    [west.propagators.executable] -- could not read pcoord from '/tmp/tmpned_l7cq': ValueError('progress coordinate data has incorrect shape (0, 1) [expected (51, 1)]')
-- ERROR    [west.sim_manager] -- propagation failed for 5 segment(s):
0
1
2
3
4
exception caught; shutting down

You received this message because you are subscribed to a topic in the Google Groups "westpa-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/westpa-users/P9OpGUWWFXU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to westpa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/westpa-users/CALxO_cbL6n6wQUuUaz%2Bvkf%2BcfvtVOwMjcdCk4Sn7vdfCDLemow%40mail.gmail.com.

Anthony Bogetti

unread,
Sep 14, 2021, 9:45:34 AM9/14/21
to westpa...@googlegroups.com
Hi Lauren,

Great!  For this error, I have some ideas about what could be causing it and we can also check some of the other logs which may be helpful.

Usually this error ("propagation failed") appears when something is going wrong with the dynamics.  It doesn't necessarily mean the dynamics are crashing, maybe just that WESTPA cannot find your amber executables.  Another possible reason for this error is that WESTPA will expect a certain number of frames per iteration for each segment (in this case, 51 which is defined in west.cfg as pcoord_len) and it may not be receiving that exact number of frames from your pcoord calculation.  For instance, in common_files/md.in your nstlim/ntwx should dictate how many frames are saved per short MD segment that WESTPA runs (this number in reality is 50 but you will notice in west.cfg it is 51, which is because WESTPA needs to have the parent rst file before the resulting trajectory segment for bookkeeping purposes, see runseg.sh for how this is done).  This trajectory file (seg.nc, outputted after dynamics are completed) is then analyzed in your westpa_scripts/runseg.sh (using cpptraj in this case) to give a list of progress coordinate values, one per frame in the trajectory.  If that list of numbers is not exactly 51 WESTPA will fail.

The above was mostly just some general explanation for what can go wrong regarding this error, which is one of the most common.  However, since you are running the tutorial, which should be set up to avoid these errors by default, I would suggest checking to make sure that WESTPA can locate your amber executables and that they are being executed properly.  Make sure you have edited your env.sh to properly source your amber.sh file.  In addition, please check your seg_logs files.  There should be one for each WESTPA trajectory segment that is propagated and will list line by line what commands from your westpa_scripts/runseg.sh were executed and if any failed to run for any reason.  Check one of those seg_log files and compare it to your runseg.sh to see if there are any clues as to what is going on here.

Let me know what you find!

Best,
Anthony

Lauren Raguette

unread,
Sep 15, 2021, 11:53:16 AM9/15/21
to westpa...@googlegroups.com
Thanks, Anthony!

I realized when I run /.init.sh I'm actually getting something similar.

Updating system with the options from the configuration file
Creating HDF5 file '/mnt/raidc2/lraguette/Miniconda/envs/westpa-2020.05-test/westpa-2020.05/westpa_tutorials/basic_nacl_amber/west.h5'
1 target state(s) present
Calculating progress coordinate values for basis states.
1 basis state(s) present
Preparing initial states

        Total bins:            22
        Initial replicas:      5 in 1 bins, total weight = 1
        Total target replicas: 110

Simulation prepared.
1 of 22 (4.545455%) active bins are populated

per-bin minimum non-zero probability:       1
per-bin maximum probability:                1
per-bin probability dynamic range (kT):     0
per-segment minimum non-zero probability:   0.2
per-segment maximum non-zero probability:   0.2
per-segment probability dynamic range (kT): 0
norm = 1, error in norm = 0 (0*epsilon)

Anthony Bogetti

unread,
Sep 22, 2021, 8:33:32 AM9/22/21
to westpa...@googlegroups.com
Hi Lauren,

Sorry for the delayed response, but just wanted to follow up on this. The output you got after running init.sh that second time (which contains “simulation prepared”) is expected and means that initialization completed successfully. The init.sh file should have created a west.h5 file, a traj_segs folder, a seg_logs folder and maybe a few more files depending on the specific options in your init.sh file. You should now be good to go ahead and run the simulation with run.sh. Please let us know if you have any further questions.

Best,
Anthony

Lauren Raguette

unread,
Sep 22, 2021, 3:35:01 PM9/22/21
to westpa-users
Hi Anthony,

I'm now trying to get westpa on Frontera and compiled both westpa and Amber but am having some new errors.

When I try to run init.sh for the basic_nacl_amber tutorial I'm getting this:

Traceback (most recent call last):
  File "/home1/03760/tg830597/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/lib/cmds/w_init.py", line 9, in <module>
    import work_managers
  File "/home1/03760/tg830597/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/lib/wwmgr/work_managers/__init__.py", line 12, in <module>
    from .core import WorkManager, WMFuture, FutureWatcher
  File "/home1/03760/tg830597/anaconda3/envs/westpa-2020.05-test/westpa-2020.05/lib/wwmgr/work_managers/core.py", line 8, in <module>
    import h5py
  File "/opt/apps/intel19/impi19_0/python3/3.7.0/lib/python3.7/site-packages/h5py/__init__.py", line 26, in <module>
    from . import _errors
ImportError: cannot import name '_errors' from partially initialized module 'h5py' (most likely due to a circular import) (/opt/apps/intel19/impi19_0/python3/3.7.0/lib/python3.7/site-packages/h5py/__init__.py)

Thank you so much for all of your help!!
Reply all
Reply to author
Forward
0 new messages