14

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?

4 Answers 4

30

Edit Configurations -> Allow parallel run. Done

enter image description here

1
  • 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 4, 2021 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.

3
  • 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, 2018 at 5: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: superuser.com/a/1141412/659142
    – valignatev
    Jul 12, 2018 at 5: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 Sep 26, 2019 at 8: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

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.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.