Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Zhanghong_T_
Novice
133 Views

problem with intel mpi 4.0

Jump to solution
Dear all,

I have a program to call intel mpi's functions. The program seems good but some times after finished running, the following error message popped up:
Fatal error in MPI_Comm_free: Invalid communicator, error stack: MPI_Comm_free(134): MPI_Comm_free(comm=00000001403B600) failed
MPI_Comm_free(105): Cannot free permanent communicator MPI_COMM_WORLD.

Excepted the MPI, I also used the OpenMP in the code. In the project, when the option "Generate Parallel Code (/Qopenmp)" is enabled, this error message will pop up 1 time when running the same program 3~4 times. However, after disabled this option, this error message will never appears.

The code
CALL MPI_INIT(IERR)
and
CALL MPI_FINALIZE(IERR)
are all outside the parallel region of OpenMP.

My environment is: Win7 x64 + VS2008 +IVF 11.1.065 (with MKL) + Intel MPI 4.0.0.012.

Could anyone help me to take a look at this problem?

Thanks,
Zhanghong Tang

0 Kudos
1 Solution
TimP
Black Belt
133 Views
According to the information you provided here, you would require MPI_Init_thread(MPI_INIT_FUNNELED......) when OpenMP is active inside a rank. While there may exist an MPI implementation where MPI_INIT implies the same thing, that is not MPI standard usage and is not compatible with Intel MPI.

View solution in original post

6 Replies
Dmitry_K_Intel2
Employee
133 Views
Hi Zhanghong

Could you provide compilation options? What is your command line?
This issue is probably related to hybrid application - multi-thread version of the Intel MPI Library should be used.

Regards!
Dmitry
TimP
Black Belt
134 Views
According to the information you provided here, you would require MPI_Init_thread(MPI_INIT_FUNNELED......) when OpenMP is active inside a rank. While there may exist an MPI implementation where MPI_INIT implies the same thing, that is not MPI standard usage and is not compatible with Intel MPI.

View solution in original post

Zhanghong_T_
Novice
133 Views
Dear Tim,

Thank you very much for your kindly reply. I tried the MPI_INIT_THREAD just now, however, the error displayed EVERY TIME.
The code is as follows:

integer::REQUIRED, PROVIDEDIERR
if(currjob == 0)then
REQUIRED = MPI_THREAD_MULTIPLE
CALL MPI_INIT_THREAD(REQUIRED, PROVIDED, IERR)
currjob = 1
endif
if(job == -1)then
CALL MPI_FINALIZE(IERR)
endif

Do I miss anything?

My program has the following libraries linked:
mkl_intel_lp64.lib
mkl_intel_thread.lib
mkl_core.lib
libiomp5mt.lib
impimt.lib
impicxx.lib
mkl_blacs_intelmpi_lp64.lib
mkl_scalapack_lp64.lib

The runtime library option is "Multi-threaded/MT".


Thanks,
Zhanghong Tang

Zhanghong_T_
Novice
133 Views
Dear Dmitry,

Thank you very much for your so quick reply. I compile the code in the IDE of VS2008. The compilation line is:

/O2 /Oi /GL /FD /EHsc /MT /Gy /openmp /Fo"x64\Release\" /Fd"x64\Release\vc90.pdb" /W1 /nologo /c /Zi /TP /errorReport:prompt

Thanks,
Zhanghong Tang
Dmitry_K_Intel2
Employee
133 Views
Zhanghong,
Could you attach your test to a message? I'll try to reproduce the issue.

Regards!
Dmitry
Zhanghong_T_
Novice
133 Views
Dear all,

I have successfully implemented the MPI + OpenMP, now I have another problem: how can I control the number of processes (threads) to be used by Intel MPI + OpenMP? In OpenMP, I can control the number of threads by the function "omp_set_num_threads". But I don't know how to do the similar control in MPI without the command "mpiexec n ..."?

Thanks,
Zhanghong Tang
Reply