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

Parallel Fortran with Intel

davut_d_
Beginner
590 Views

Hello

I'm having problems with parallel fortran code. It works fine and efficiently on my laptop, which has i7 processor (by using 4 processors). When I run the code on a machine with 24 processors or in a cluster, it works but very very slowly

I use these commands on terminal (using ubuntu):

Compiling: mpif77 -o PIC Par_PICFort_10.f90     or         mpif90 -o PIC Par_PICFort_10.f90

For 4 processors running with : mpirun -np 4 PIC 

I have 2 questions

Question 1: I have installed intel fortran/parallel_studio_xe_2013, but I can't compile the code.

If I run with:  ifort -o PIC Par_PICFort_10.f90

I get the error:

error #5102: Cannot open include file 'mpif.h'
    Include 'mpif.h'
------------^
Par_PICFort_10.f90(608): error #6404: This name does not have a type, and must have an explicit type.   [MPI_COMM_WORLD]
    CALL MPI_COMM_RANK(MPI_COMM_WORLD, worker_number, ierr)
-----------------------^
Par_PICFort_10.f90(623): error #6404: This name does not have a type, and must have an explicit type.   [TIME8]
    read_clock_start = time8()
-----------------------^
Par_PICFort_10.f90(721): error #6404: This name does not have a type, and must have an explicit type.   [MPI_DOUBLE_PRECISION]
        CALL MPI_Reduce(n_e,t_n_e,ndx+1,MPI_DOUBLE_PRECISION,MPI_SUM,0,MPI_COMM_WORLD,ierr);
----------------------------------------^
Par_PICFort_10.f90(721): error #6404: This name does not have a type, and must have an explicit type.   [MPI_SUM]
        CALL MPI_Reduce(n_e,t_n_e,ndx+1,MPI_DOUBLE_PRECISION,MPI_SUM,0,MPI_COMM_WORLD,ierr);
-------------------------------------------------------------^
Par_PICFort_10.f90(1040): error #6404: This name does not have a type, and must have an explicit type.   [MPI_INTEGER]
            CALL MPI_Reduce(exist_e,t_exist_e,1,MPI_INTEGER,MPI_SUM,0,MPI_COMM_WORLD,ierr);

Also I can't find and run mpifort in my computer. How can I run the code with Intel Fortran compiler?

Question 2: How may I check the efficiency of my mpi code with parallel_studio_xe_2013 and fix my problem?

With my Best Regards

0 Kudos
5 Replies
Anonymous66
Valued Contributor I
590 Views

The fortran compiler and Inte®l Parallel Studio XE do not include mpi. Did you purchase or install mpi separately? To use the fortran compiler with Intel® MPI, compile with “mpiifort” rather than “ifort”.

Inte®l Parallel Studio XE does not include any tools specifically targeted at mpi code. I think Intel® Cluster Studio XE 2013 would be a better fit for your needs. For the non mpi parts of your code, you can use Intel® VTune™ Amplifier XE 2013 to analyze your code.

 

0 Kudos
Casey
Beginner
590 Views

You can also download and compile OpenMPI.

0 Kudos
davut_d_
Beginner
590 Views

I think I'm using OpenMPI atm. Bytheway Intel® Cluster Studio XE 2013 has mpiifort inside?  

Thank you for your help and attention.

0 Kudos
TimP
Honored Contributor III
590 Views

Yes Cluster Studio gives a package deal on the combination of Intel C++ Fortran, MPI with the wrappers and libraries for C, C++, Fortran, and the collection of performance analysis and parallel correctness tools.

0 Kudos
davut_d_
Beginner
590 Views

Great to hear that. I will give it a try. Thank you

With my best regards

0 Kudos
Reply