Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28592 Discussions

compilation with mpiifort - error not found MPI_CHAR type

Delphine_R_
Beginner
1,220 Views

Hello,

I try to install a code on a HPC under Linux.

My command line is :

mpiifort -I./INC/ -I$HOME/MARSLIB/usr/mpi/include/ -module $HOME/MARS/COMPILE_MARS/WTEST-BIDON/OBJETS/ -O2 -i4 -r8 -ftz -fpe0 -fp-model precise -traceback -fno-alias -fno-fnalias    -c ./smallf90/toolmpi.f90

and I have this message :

./smallf90/toolmpi.f90(4106): error #6404: This name does not have a type, and must have an explicit type.   [MPI_CHAR]
   CALL MPI_BCAST(val,1,MPI_CHAR,0,MPI_COMM_MARS,IERR_MPI)
------------------------^
compilation aborted for ./smallf90/toolmpi.f90 (code 1)

Can you help me, please ?

thanks

0 Kudos
9 Replies
Lorri_M_Intel
Employee
1,220 Views

Does your program have either "USE MPI" or "include mpif.h" in it?

If so, and you are still getting this failure, please post the source code so we can take a more useful look.

           --Lorri

0 Kudos
Delphine_R_
Beginner
1,220 Views

Hello

yes, the program has "INCLUDE mpif.h". The code I want to install is in attached.

Thank for your help.

Delphine

463044

0 Kudos
Lorri_M_Intel
Employee
1,220 Views

Your code looks OK.   I can't successfully build it because I don't have the mod files, but I don't get the error about undefined MPI_CHAR.  To confirm, I renamed MPI_CHAR to MPI_CHARRRRR and did get an "undefined" message.

Which version of MPI are you using?

Do you perhaps have multiple versions of mpif.h in the different -I directories that you have specified?   That would be worth checking first.

               --Lorri

0 Kudos
Delphine_R_
Beginner
1,220 Views

Hello,

You are right, I have multile versions oif mpif.h. There are not specified in the different -l directories.

There is one in /usr/local/include on the cluster and otther in /opt/intel/impi/3.2.2.006/include64

Do you know how to specify the file mpif.h to use ?

My version of mpi is : ifort (IFORT) 11.0 20090318

Thanks,  Delphine

 

 

0 Kudos
Steven_L_Intel1
Employee
1,220 Views

Directories listed on the command line with -I (you have two) are looked at first, then those listed in the definition of INCLUDE. You'll want to make sure that the correct set of files are seen first.

0 Kudos
Delphine_R_
Beginner
1,220 Views

Hello,

Thanks for reply.

I check the order of directories and it is correct. But, I think my MPI version is old, because there isn't MPI_CHAR in mpif.h but INTEGER MPI_CHARACTER.

So I modify my code and replace MPI_CHAR by MPI_CHARACTER. And compilation was ok.

My question is : how can I check the MPI version ? how can I update it ?

Regards

Delphine

 

0 Kudos
Steven_L_Intel1
Employee
1,220 Views

Yes, you do have an old version of Intel MPI. You can download the latest your license allows at https://registrationcenter.intel.com/

0 Kudos
Delphine_R_
Beginner
1,220 Views

Hi

Do you know if this product "Intel Parallel studio XE Composer Edition for Fortran and C++ Linux" contains also the MPI Intel product ? So if I upgrade compilers, I also upgrade Intel MPI ? thanks

Delphine

0 Kudos
TimP
Honored Contributor III
1,220 Views

Among the various offered versions of parallel studio, the one which includes mpi is named cluster edition.

0 Kudos
Reply