13

I have looked at this question but I am not sure I got it correctly or not.

I have opened pycharm and one python script and its running (it's topic modeling).

Also I have another python script in which I opened in another pycharm in the same server. I also run it.

Now these two program are running in the same server, I should mention that I have not changed any configuration neither server nor pycharm.

Do you think its ok in this way? or one script technically won't run(in terms of progressing I mean it just show its running but practically wont run) until the other script finished?

sariii
  • 2,020
  • 6
  • 29
  • 57

4 Answers4

29

Edit Configurations -> Allow parallel run. Done

enter image description here

W.Perrin
  • 4,217
  • 32
  • 31
  • Can I allow parallel run by default for all configurations? Or I need to check it for each configuration (which gets pretty annoying). – mishadr May 04 '21 at 10:35
8

First, PyCharm will create independent processes on the server, so both scripts will run. You can check it with something like htop - search for processes and verify that they're running.

Second, you don't have to open second PyCharm window to run the second script. You can run both of them from the single one. There are at least two ways: with run configurations or by spawning multiple terminal windows and running scripts from there.

valignatev
  • 6,020
  • 8
  • 37
  • 61
  • Thank you so much for replying, I got GC error while I was running one python script in pycharm and one java in IntelliJ. I have 500gig ram so it was weird to me raising this error. that's why I was suspicious what is happening behind the scence – sariii Jul 12 '18 at 05:23
  • 1
    Glad I helped, GC error might be because Java can't use your whole memory, you should raise an upper boundary in Help -> Edit Custom VM Options: https://superuser.com/a/1141412/659142 – valignatev Jul 12 '18 at 05:35
  • In the run configuraiton there's a box that let's you tick `allow parallel run`, which will then allow you to simply click the run button multiple times and it will run in parallel – stefanbschneider Sep 26 '19 at 08:00
7

From the Run/Debug Configurations windows you can add a Compound configuration that contains multiple configurations that will run in parallel. The Allow parallel run option for child configurations make no difference in this case.

enter image description here

Adrian Martinez
  • 479
  • 1
  • 9
  • 17
3

The default behaviour was changed starting from version 2018.3. You can allow multiple runs by selecting Allow parallel run within the Edit Configurations menu.

aprospero
  • 529
  • 3
  • 14