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

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

Open
Vccxx opened this issue Nov 9, 2020 · 0 comments
Open

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

Vccxx opened this issue Nov 9, 2020 · 0 comments

Comments

@Vccxx
Copy link

Vccxx commented Nov 9, 2020

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.

@Vccxx Vccxx changed the title Multi-Threading resample seems not working for contious process. Multi-Threading resample seems not working for continuous process. Nov 9, 2020
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

1 participant