The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > High Performance Computing
.
google unix.com



High Performance Computing Message Passing Interface (MPI) programming and tuning, MPI library installation and management, parallel administration tools, cluster monitoring, cluster optimization, and more HPC topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to configure YUM in RHEL 4.0 daya.pandit Ubuntu 3 11-13-2008 07:32 AM
RHEL 4 up2date flekzout UNIX for Advanced & Expert Users 3 11-05-2008 11:24 PM
Raw partiotion in RHEL 4.0 ss_anoop Red Hat 2 01-03-2008 05:45 PM
Difference between RHEL 3 AND RHEL 4 sakthi_13 Red Hat 2 09-11-2007 07:51 AM
How to update RHEL sonirajesh UNIX for Dummies Questions & Answers 0 07-18-2007 10:15 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-16-2009
The_Watcher The_Watcher is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 2
Cool mpif90 download on RHEL

Hi,
I have installed mpif77 (a parallel wrapper for the fortran compiler g77) on my dual processor dual core workstation which has RHEL 4 as OS. This compiles and runs just fine.

Now I want to install mpif90 which is the f95 version of mpif77 (I think?). At the moment I am using the 'ifort' (which I have also installed) as the base compiler, hoping that it will compile ok. My make file is as follows:

# MAKEFILE FOR PARALELL EXECUTABLE OBJECT FOR "pards".

F90 = ifort
FFLAGS = -u -O3 -i8 -r8 -align all -check -fast -fp-model fast=1 -funroll-loops

#FFLAGS = -O3 -fno-second-underscore -fno-silent -Wimplicit -Wall
#F90 = /usr/local/encap/mpich-1.2.4..8a-intel/bin/mpif90
#F90LINKER = /usr/local/encap/mpich-1.2.4..8a-intel/bin/mpif90

#LIBS= -lencap -liberty -lptcblas -lgm -lcblas -lblacsCinit -lblacs \
# -lblacsF77init -lscalapack

SRC = nrtype.f90 nr.f90 nrutil.f90 parameters_global.f90 chemical_kinetics.f90 loop_counters.f90 \
general_variables.f90 scalar_coefficients.f90 mpinpb.f90 \
setup_mpi.f90 initialise.f90 block_begin.f90 fops.f90 plotout.f90 \
CATALYST_FLOW_P4.f90 config.f90 calcp.f90 mesh.f90 read_data.f90 \
lisolv.f90 sites.f90 numsp.f90 strips.f90 bdycon.f90 flows.f90 \
props.f90 transport.f90 lights.f90 corvel.f90 enth.f90 ststep.f90 \
fndkey.f90 specnum.f90 rates.f90 ratec.f90 comrat.f90 comrac.f90 \
numcon.f90 coefuv.f90 etest.f90 stest.f90 mtest.f90 energy.f90 \
dec.f90 decbt.f90 sol.f90 solbt.f90 sweepc.f90 sweeph.f90 sweepv.f90 \
encoef.f90 stephv.f90 specsol.f90 spcoef.f90 ensour.f90 heatf.f90 \
tridag.f90 unstdy.f90 timept.f90 movie.f90 mread.f90 vread.f90

OBJS =$(SRC:.f90=.o)

# target definitions

.SUFFIXES: .f90
.f90.o:
$(F90) $(FFLAGS) -c $<

pards: $(OBJS)
$(F90) $(OBJS) $(FFLAGS) -o pards



There are several problems:

(1) although I have the basic f95 libraries nrtype.f90, nrutil.f90, nr.f90, I have to copy them into the working directory and compile every time together with my source code. This is unsatisfactory -- how do I get it automatically into my codes?

(2) I get a series of warnings (not errors) regarding subroutines in nr.f90. For example,

ifort -u -O3 -i8 -r8 -align all -check -fast -fp-model fast=1 -funroll-loops -c nr.f90
fortcom: Warning: nr.f90, line 953: The type/rank/keyword signature for this specific procedure match es another specific procedure that shares the same generic-name. [FOUR1_SP]
SUBROUTINE four1_sp(data,isign)
---------------------------^
fortcom: Warning: nr.f90, line 1030: The type/rank/keyword signature for this specific procedure matc hes another specific procedure that shares the same generic-name. [FOURROW_SP]
SUBROUTINE fourrow_sp(data,isign)
---------------------------^


What does this mean?

(3) All my subroutines compile ok; but when it is linking all together I get:

ifort nrtype.o nr.o nrutil.o parameters_global.o chemical_kinetics.o loop_counters.o general_variables.o scalar_coefficients.o mpinpb.o setup_mpi.o initialise.o block_begin.o fops.o plotout.o CATALYST_FLOW_P4.o config.o calcp.o mesh.o read_data.o lisolv.o sites.o numsp.o strips.o bdycon.o flows.o props.o transport.o lights.o corvel.o enth.o ststep.o fndkey.o specnum.o rates.o ratec.o comrat.o comrac.o numcon.o coefuv.o etest.o stest.o mtest.o energy.o dec.o decbt.o sol.o solbt.o sweepc.o sweeph.o sweepv.o encoef.o stephv.o specsol.o spcoef.o ensour.o heatf.o tridag.o unstdy.o timept.o movie.o mread.o vread.o -u -O3 -i8 -r8 -align all -check -fast -fp-model fast=1 -funroll-loops -o pards
ipo: warning #11041: unresolved mpi_init_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_comm_rank_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_comm_split_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_comm_size_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_comm_dup_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_finalize_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_reduce_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_bcast_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: warning #11041: unresolved mpi_barrier_
Referenced in /tmp/ipo_ifortA9f4Bz.o
ipo: remark #11000: performing multi-file optimizations
ipo: remark #11005: generating object file /tmp/ipo_ifortA9f4Bz.o


Clearly, it is not recognising the mpi parallel instructions, like mpi_comm_rank, and mpi_bcast etc. This is very strange because the mpif77 compiles ok and I hve run parallel codes on my workstation.

This is repeated at the very end,

/tmp/ipo_ifortA9f4Bz.o(.text+0xf4d): In function `MAIN__':
: undefined reference to `mpi_finalize_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x5590e): In function `stest_':
: undefined reference to `mpi_reduce_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x55947): In function `stest_':
: undefined reference to `mpi_reduce_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x5597d): In function `stest_':
: undefined reference to `mpi_reduce_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x559b5): In function `stest_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x559ed): In function `stest_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x55a1f): In function `stest_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x68c1c): In function `sweeph_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x68c52): In function `sweeph_':
: undefined reference to `mpi_barrier_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x83633): In function `sweepc_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x83739): In function `sweepc_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x83767): In function `sweepc_':
: undefined reference to `mpi_barrier_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x9c972): In function `sweepv_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x9cb43): In function `sweepv_':
: undefined reference to `mpi_bcast_'
/tmp/ipo_ifortA9f4Bz.o(.text+0x9cb7f): In function `sweepv_':
: undefined reference to `mpi_barrier_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa1c8): In function `setup_mpi_':
: undefined reference to `mpi_init_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa1dd): In function `setup_mpi_':
: undefined reference to `mpi_comm_size_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa1f2): In function `setup_mpi_':
: undefined reference to `mpi_comm_rank_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa2cd): In function `setup_mpi_':
: undefined reference to `mpi_comm_split_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa2f3): In function `setup_mpi_':
: undefined reference to `mpi_comm_size_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa308): In function `setup_mpi_':
: undefined reference to `mpi_comm_dup_'
/tmp/ipo_ifortA9f4Bz.o(.text+0xaa31d): In function `setup_mpi_':
: undefined reference to `mpi_comm_dup_'
make: *** [pards] Error 1


Questions:
What is going wrong?
Do I have to download mpif90? How do I download and install mpif90?
Do I have to swap from lam_mpi to mpich? (Is there much difference.)

Regards
__________________
The_Watcher
London
  #2 (permalink)  
Old 02-17-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
Ack!!!

First, (or last) LAM is completely different than MPI. There may be some kind of forward compatibility library, but only for the simplest of programs.

Second, (or "(3)") mpif77/mpif90 are essentially MPI macros for running different compilers that you have on your system. What program "mpif77" runs is dependent on your local configuration and some environment variables. Presumably you can change some environment variables to use ifort or f90. But that's not necessary -- just pass ifort the correct options for your MPI fortran header files and library. Doesn't your compute cluster have a local system administrator??

The answer to (1) is simple: you compile your f90 code once, and put the resulting .o files in a directory, say $HOME/objs. Then to include them, pass them to the full paths to the ifort command...
Code:
 ifort something.o another.o $HOME/objs/nrutil.o -o f77-prog
Now maybe you need one version for each compiler version. So you put the F90 version in $HOME/objs/f90/ and use this:
Code:
 ifort something.o another.o $HOME/objs/f90/nrutil.o -o f90-prog
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0