Quantcast
Channel: Clusters and HPC Technology
Viewing all articles
Browse latest Browse all 927

How to do parallel computing with fortran

$
0
0

Hi, I am not a computer science major, so I am very much confused by lots of the user guide online in this relevant topic, but I have decent knowledge in matlab and fortran coding, just have not done parallel computing with fortran before. I would appreciate if you can provide your replies in layman fashion. 

Here is my situation: I have installed Microsoft Visual Studio 2015 and recently installed Intel Parallel Studio XE Cluster Edition for Windows*, I have windows 10 x64 system and multiple cores in my CPU. I would like to harvest my parallel computer power using fortran. So I got this Hello World sample code for a try and clicked build button on my MS VS: 

    program Console3

    implicit none

    include "mpif.h"
    integer ierr, my_rank, nprocs

    call MPI_INIT(ierr)
    call MPI_COMM_RANK(MPI_COMM_WORLD,my_rank,ierr)
    call MPI_COMM_SIZE(MPI_COMM_WORLD,nprocs,ierr)

    write(*,*) 'Hello from processor ',my_rank,' out of ', nprocs

    call MPI_FINALIZE(ierr)
    stop

    end program Console3

But the following errors appeared in the building process:

Severity    Code    Description    Project    File    Line    Suppression State
Error        Compilation Aborted (code 1)        c:\users\wg7\documents\visual studio 2015\Projects\Console3\Console3\Console3.f90    1    
Error        error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MPI]        c:\users\wg7\documents\visual studio 2015\Projects\Console3\Console3\Console3.f90    17    
Error        error #6404: This name does not have a type, and must have an explicit type.   [MPI_COMM_WORLD]        c:\users\wg7\documents\visual studio 2015\Projects\Console3\Console3\Console3.f90    23    

 

So I figured maybe I need to do something extra to use this MPI library. I tried to read some user guide: https://software.intel.com/en-us/node/535525, but the language there is all very confusing and unclear to me, I have also tried in command prompt:

C:\Program Files (x86)\IntelSWTools\mpi\5.1.3.207\intel64\bin>mpivars

Intel(R) MPI Library 5.1 Update 3 for Windows* Target Build Environment for Intel(R) 64 applications
Copyright (C) 2007-2015 Intel Corporation. All rights reserved.

C:\Program Files (x86)\IntelSWTools\mpi\5.1.3.207\intel64\bin>hydra_service -install
OpenSCManager failed:
Access is denied. (error 5)
Unable to remove the previous installation, install failed.

C:\Program Files (x86)\IntelSWTools\mpi\5.1.3.207\intel64\bin>hydra_service -start
OpenSCManager failed:
Access is denied. (error 5)

But I am not sure what it did nor whether it helped. Here is what I know and what I do not know:

1) I know the intel cluster edition should already include MPI library which includes everything I need. 

2) I know I need to link MPI library with MS VStudio but I do not know how or whether it is already linked, or how to set the parameters in property. 

3) I know the fortran code needs to include some special lines for MPI, but I do not know how to compile and build it to become an exe application.

4) I know where is the installation folder with the mpi applications and where is my fortran project folder, they are separate folders. But sometimes I do not know which folder to direct to in command prompt, or whether I should add which path to which. 

Searching online always just gets me little pieces for the above problem, but what I really would like is to see a comprehensive step by step guide and examples. If you would help me put things together, I would really appreciate it. Thank you! 

Zone: 

Thread Topic: 

How-To

Viewing all articles
Browse latest Browse all 927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>