Skip to content

Multi-Threading resample seems not working for continuous process. #27

Description

@Vccxx

I have installed both gslrandom and enabled OpenPM support on my ubuntu 18.04 machine . But when I run resample using these code:

    def genHawkesModel(dates,ids):
        K = len(np.unique(ids))
        network_hypers = {"p":0.25,"allow_self_connections":False}
        model = ContinuousTimeNetworkHawkesModel(
                    K,
                    dt_max = 1,
                    network_hypers=network_hypers,
                )
        model.add_data(dates,ids,T=dates.max() + 1)
        return model

    hawkes_model = genHawkesModel(dates,ids)
    N_samples = len(np.unique(ids))
    hawkes_lls = [hawkes_model.log_likelihood()]
    logging.info("Start iterating")
    for itr in progprint_xrange(N_samples, perline=25):
        hawkes_model.resample_model()
        hawkes_lls.append(hawkes_model.log_likelihood())

I found this code is running too slow :

3c86d9744c4f3aa8b3ab644174878f2

I check the cpu usage using top command, finding that the program only using one cpu when resampling:

d3daecdcb35b85749675e88abf698a5

I'm sure I have install gslrandom on my machine (both pip and apt):
68e47ba8cc80348754d963f05d7079f

b77fdd67163229d441a1ba070a0d96c

I want to know how to make sure the resample process is running in the multi-threading mode so that I can do the resample as fast as possible.
Thank you and looking forward for your reply.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions