Parallel Fortran with Intel

Parallel Fortran with Intel

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

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

 

You can also download and compile OpenMPI.

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

Thank you for your help and attention.

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.

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

With my best regards

Leave a Comment

Please sign in to add a comment. Not a member? Join today