mczwier / westpa_py3

WESTPA: The Weighted Ensemble Simulation Toolkit with Parallelization and Analysis
https://westpa.github.io/westpa
MIT License
3 stars 2 forks source link

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

Open atbogetti opened 4 years ago

atbogetti commented 4 years ago

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:

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)/(2numpy.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 commented 4 years ago

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