Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: dynamic module does not define module export function (PyInit__assign) #4

Open
atbogetti opened this issue Nov 5, 2019 · 1 comment

Comments

@atbogetti
Copy link

Hello,

I'm testing this out on one of my systems and cannot seem to get passed the initialization step. I get the following error:

Warning: When compiling code please add the following flags to nvcc:
-gencode arch=compute_35,code=[compute_35,sm_35]
-gencode arch=compute_61,code=[compute_61,sm_61]
-gencode arch=compute_70,code=[compute_70,sm_70]
simulation py3_test root is /bgfs/ltc1/home/atb43/qmmm/september/6_WESTPA/py3_test
Traceback (most recent call last):
File "/bgfs/ltc1/home/atb43/qmmm/py3_westpa/lib/cmds/w_init.py", line 28, in
import westpa
File "/bgfs/ltc1/home/atb43/qmmm/py3_westpa/lib/west_tools/westpa/init.py", line 1, in
from . import _rc
File "/bgfs/ltc1/home/atb43/qmmm/py3_westpa/lib/west_tools/westpa/_rc.py", line 27, in
from .yamlcfg import YAMLConfig
File "/bgfs/ltc1/home/atb43/qmmm/py3_westpa/lib/west_tools/westpa/yamlcfg.py", line 37, in
from westpa.binning import NopMapper
File "/bgfs/ltc1/home/atb43/qmmm/py3_westpa/lib/west_tools/westpa/binning/init.py", line 1, in
from . import _assign
ImportError: dynamic module does not define module export function (PyInit__assign)

This didn't happen with the python2 WESTPA. I thought this may be due to me defining my bins outside of the west.cfg (in the system.py) and so I tried doing that, but get the same error.

Here is my west.cfg file:

The master WEST configuration file for a simulation.

vi: set filetype=yaml :


west:
system:
driver: system.SDASystem
module_path: $WEST_SIM_ROOT
propagation:
max_total_iterations: 1000
max_run_wallclock: 72:00:00
propagator: executable
gen_istates: true
block_size: 1
data:
west_data_file: west.h5
datasets:
- name: pcoord
scaleoffset: 4
- name: solute_coords
scaleoffset: 4
- name: dihedral
scaleoffset: 4
- name: c5n34
scaleoffset: 4
- name: c7n34
scaleoffset: 4
- name: c9n34
scaleoffset: 4
- name: c12n34
scaleoffset: 4
- name: c14n34
scaleoffset: 4
- name: c16n34
scaleoffset: 4
- name: c21n34
scaleoffset: 4
- name: c25n34
scaleoffset: 4
- name: c23n34
scaleoffset: 4
data_refs:
segment: $WEST_SIM_ROOT/traj_segs/{segment.n_iter:06d}/{segment.seg_id:06d}
basis_state: $WEST_SIM_ROOT/bstates/{basis_state.auxref}
initial_state: $WEST_SIM_ROOT/istates/{initial_state.iter_created}/{initial_state.state_id}.rst
plugins:
executable:
environ:
PROPAGATION_DEBUG: 1
datasets:
- name: solute_coords
enabled: true
- name: dihedral
enabled: true
- name: c5n34
enabled: true
- name: c7n34
enabled: true
- name: c9n34
enabled: true
- name: c12n34
enabled: true
- name: c14n34
enabled: true
- name: c16n34
enabled: true
- name: c21n34
enabled: true
- name: c25n34
enabled: true
- name: c23n34
enabled: true
propagator:
executable: $WEST_SIM_ROOT/westpa_scripts/runseg.sh
stdout: $WEST_SIM_ROOT/seg_logs/{segment.n_iter:06d}-{segment.seg_id:06d}.log
stderr: $WEST_SIM_ROOT/slurm.err
stdin: null
cwd: null
environ:
SEG_DEBUG: 1
get_pcoord:
executable: $WEST_SIM_ROOT/westpa_scripts/get_pcoord.sh
stdout: $WEST_SIM_ROOT/job_logs/pcoord.log
stderr: $WEST_SIM_ROOT/job_logs/pcoord.err
gen_istate:
executable: $WEST_SIM_ROOT/westpa_scripts/gen_istate.sh
stdout: $WEST_SIM_ROOT/job_logs/istate.log
stderr: $WEST_SIM_ROOT/job_logs/istate.err
post_iteration:
enabled: true
executable: $WEST_SIM_ROOT/westpa_scripts/post_iter.sh
stdout: $WEST_SIM_ROOT/job_logs/post_iter.log
stderr: $WEST_SIM_ROOT/job_logs/post_iter.err
pre_iteration:
enabled: false
executable: $WEST_SIM_ROOT/westpa_scripts/pre_iter.sh
stderr: stdout

Settings for w_ipa, an interactive analysis program that can also automate analysis.

analysis:
directory: ANALYSIS # specify the directory all analysis files should exist in.
kinetics: # general options for both kinetics routines.
step_iter: 1
evolution: cumulative
extra: [ 'disable-correl' ]
analysis_schemes: # Analysis schemes. Required: name (TEST), states, and bins
DEFAULT:
enabled: True
bins:
- type: RectilinearBinMapper
boundaries:
- [0.0, 1.6, 'inf']
states:
- label: unbound
coords:
- [20]
- label: bound
coords:
- [1.56]

And here is my system.py file:

#!/usr/bin/env python

import numpy
import west
import os
from west import WESTSystem
from westpa.binning import RectilinearBinMapper
from westpa.binning import FuncBinMapper
from westpa.binning import RecursiveBinMapper
import logging

log = logging.getLogger(name)
log.debug('loading module %r' % name)

def radial_map(coords, mask, output):
center = numpy.array((1.6, 1.6))
coords -= center
quotients = numpy.divide(coords[:,1],coords[:,0])
angles = numpy.arctan(quotients)/(2*numpy.pi)*360
bins = numpy.arange(0,91,1)
output[mask] = numpy.digitize(angles, bins)[mask]
return output
class SDASystem(WESTSystem):
'''
Class specify binning schemes, walker counts, and other core weighted
ensemble parameters.
'''
def initialize(self):
self.pcoord_ndim = 2
self.pcoord_len = 2
self.pcoord_dtype = numpy.float32

    outer_mapper = RectilinearBinMapper(
            [[0, 1.6, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 'inf'],
             [0, 1.6, 4, 5, 'inf']]
                                        )

inner_mapper = RectilinearBinMapper(

[]

)

    radial_mapper = FuncBinMapper(radial_map, nbins=91)


    self.bin_mapper = RecursiveBinMapper(outer_mapper)
    self.bin_mapper.add_mapper(
            radial_mapper, 
            [1.6,1.6]
                               )

    self.bin_target_counts = numpy.empty((self.bin_mapper.nbins,), 
                                         dtype=numpy.int)
    self.bin_target_counts[...] = 5

Thanks,
Anthony

@astatide
Copy link

astatide commented Nov 8, 2019

I'll go ahead and take a look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants