Forrtl: error (200): program aborting due to control-C event

Sorry this may not be a pymc3 problem but here it goes. I am trying to run my code on Windows 10 and the code just aborts randomly - the exact same code works on my mac - with the following error message. It stopped running and gives this error message after successfully running one full round of sampling, this is the second round of sampling (in a loop)… I have of course not pressed Control-C. Does anyone know what is going on?
I am using conda version : 4.5.4, python 3.6 and installed pymc3 following the tutorial and ran dependencies.txt.

(I am not sure if it matters but qfter following official pymc3 installation instructions it was giving me “Theano: g++ not detected” error so I also did conda install mingw libpython m2w64-toolchain (advice from https://github.com/pymc-devs/pymc3/issues/2988) which got rid of the g++ error.)

Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (2 chains in 4 jobs)
NUTS: [c, hyper_sd, hyper_mu]
Sampling 2 chains:   3%|█▋                                                        | 65/2200 [00:01<04:20,  8.21draws/s]forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source
libifcoremd.dll    00007FFA3E6794C4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FFA834556FD  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFA86693034  Unknown               Unknown  Unknown
ntdll.dll          00007FFA86F71431  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source
libifcoremd.dll    00007FFA3E6794C4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FFA834556FD  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFA86693034  Unknown               Unknown  Unknown
ntdll.dll          00007FFA86F71431  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source
libifcoremd.dll    00007FFA3E6794C4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FFA834556FD  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFA86693034  Unknown               Unknown  Unknown
ntdll.dll          00007FFA86F71431  Unknown               Unknown  Unknown
QObject::~QObject: Timers cannot be stopped from another thread

Following these steps reproduces my error as well: I tried running my code using a fresh conda environment with python 3.6 installed. I installed GCC on my machine, then I did

conda install theano 
conda install numpy scipy mkl-service libpython m2w64-toolchain  # theano dependencies
conda install -c conda-forge pymc3

python main.py 

Error:

Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (2 chains in 4 jobs)
NUTS: [c, hyper_sd, hyper_mu]
Sampling 2 chains:   3%|█▌                                                        | 81/3000 [00:02<12:39,  3.84draws/s]forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source
libifcoremd.dll    00007FFA1F5E94C4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FFA834556FD  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFA86693034  Unknown               Unknown  Unknown
ntdll.dll          00007FFA86F71431  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source
libifcoremd.dll    00007FFA1F5E94C4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FFA834556FD  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFA86693034  Unknown               Unknown  Unknown
ntdll.dll          00007FFA86F71431  Unknown               Unknown  Unknown
forrtl: error (200): program aborting due to control-C event
Image              PC                Routine            Line        Source
libifcoremd.dll    00007FFA1F5E94C4  Unknown               Unknown  Unknown
KERNELBASE.dll     00007FFA834556FD  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFA86693034  Unknown               Unknown  Unknown
ntdll.dll          00007FFA86F71431  Unknown               Unknown  Unknown
QObject::~QObject: Timers cannot be stopped from another thread

Could you please try setting cores=1?

2 Likes

Thank you - it seems like a Windows problem and it worked when I set cores=1 in the sample function. :slight_smile: I wish the error message was a bit more obvious… I didn’t even know “cores” was a relevant function input or what that means. Since I thought it was dependency/package errors and I tried to solve it that way, I kept getting various different error messages, Perhaps I should have read the documentation more closely! But I’m very grateful for your help, thank you so much.

Hi All. I have the same error with Forrtl aborting. Then, when I attempt to run with cores=1, I get a different error about a bad initial energy, like that mentioned in the post here

Checking my initial conditions or changing my init method doesn’t resolve the issue.

(Running pymc3.9.1, py 3.7_64bit, win10, Fortran Compiler 19.1 from VS2019).

1 Like