[Tutor] Multiprocessing

Pugliese, Francesco Francesco.Pugliese at liverpool.ac.uk
Wed Jun 30 11:00:37 EDT 2021


Dear all,

I am Francesco and currently PhD at the University of Liverpool.

I am trying to use the multiprocessing library in python to performance some structural analyses using Opensees (please see the attached file for reference). I am coding like this:


if __name__=="__main__":
      p = Pool(8)
      p.map(fun, range(1,10001), chunksize = 1)
      p.terminate()
      p.join()


After completing all analyses, the system does not close the pool but remains stuck (frozen) without doing anything. Could please help me out to understand where I am making mistakes?

Thanks a lot.

Kind Regards,

Francesco



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Francesco, PUGLIESE,
BEng, Meng, MRes, S.M.ASCE, MICE
PhD Candidate in Risk Analysis and Earthquake Engineering
Seismic Team
School of Engineering
Brodie Tower, 6th Floor,
PostGraduate Research Office
University of Liverpool, Liverpool, Uk



More information about the Tutor mailing list