The MPI_Comm_f2c() function was called before MPI_INIT was invoked

Hi,
I am trying to run the benchmarks . I went step by step of tutorials and after running run_cctm_Bench_2016_12SE1.csh I got this error:

*** The MPI_Comm_f2c() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

Hi Farzaneh,

I wonder what version of OpenMPI you are using. If it is an older version, I suggest to switch to a newer version. Also make sure you are using the same OpenMPI for referencing mpif.h and in the linking step (you might have multiple copies floating around and you were using them at the same time). One more thing your can try is there is a C program (the only C program within CMAQ), distr_env.c, try not to compile with it (modify your Makefile). If you have additional question, please let me know.

Cheers,
David

1 Like

Hi David
Thank you for answering.
In which makefile I can find this C program in CMAQ?

Hi Farzaneh,

 Running stand alone CMAQ or WRF-CMAQ, please check Makefile or Makefile.twoway, respectively.

Cheers,
David