- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the program is
program main
use mpi
character *(MPI_MAX_PROCESSOR_NAME) processor_name
integer myid,numprocs,namelen,rc,ierr
call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD,myid,ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD,numprocs,ierr)
call MPI_GET_PROCESSOR_NAME(processor_name,namelen,ierr)
print *,"Hello World ! Process "!,myid,"of",numprocs,"on",processor_name
call MPI_FINALIZE(rc)
end
I got errors
test.f90(2): error #7013: This module file was not generated by any release of this compiler. [MPI]
use mpi
----^
test.f90(3): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [MPI_MAX_PROCESSOR_NAME]
character *(MPI_MAX_PROCESSOR_NAME) processor_name
------------^
test.f90(3): error #6591: An automatic object is invalid in a main program. [PROCESSOR_NAME]
character *(MPI_MAX_PROCESSOR_NAME) processor_name
------------------------------------^
compilation aborted for test.f90 (code 1)
mpif90 -v : ifort version 13.0.0
mpif90 -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.0.079 Build 20120731
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
mpif90 --showme
ifort -I/opt/openmpi-icc/include -I/opt/openmpi-icc/lib -L/opt/openmpi-icc/lib -lmpi_f90 -lmpi_f77 -lmpi -ldl -lm -Wl,--export-dynamic -lrt -lnsl -lutil
I want compile with ifort ,how should I do ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you are using OpenMPI, but it seems you don't have mpif90 fully enabled, you must refer to their FAQ on how to build MPI using ifort as the Fortran compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your OpenMPI installation is not correct. The code your supplied compiles and runs fine with OpenMPI (tested with OpenMPI 1.6.4 and ifort 13.1.1). It looks like ifort is complaining that your mpi.mod was not built with the intel compiler and the default fortran compiler on your system is not compatible with ifort. When you build OpenMPI you can specify the fortran compiler used to build the fortran modules and libraries using "F77=ifort FC=ifort" in the configure script. In case it helps, this is configure invocation I used to build OpenMPI:
[bash]./configure --prefix=/opt/openmpi CC=icc CXX=icpc F77=ifort FC=ifort --with-mpi-f90-size=medium[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks , I believe that the sysadmin alwalys will be correct, Now I don't think so .....,
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page