The collected works of rphanim

I am new to IRIS and having some difficulty in running a simple prarallel program.

Kindly help in this regard.

What ever link I am giving it is giving the same error. Details of my system and the errors which I get are as follows
**************************************
Origin3000 678% uname -aR
IRIX64 Origin3000 6.5 6.5.30m 07202013 IP35
**************************************
Origin3000 679% cat hello.f90
!c Fortran example
program hello
include 'mpif.h'
integer rank, size, ierror, tag, status(MPI_STATUS_SIZE)

call MPI_INIT(ierror)
call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierror)
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierror)
print*, 'node', rank, ': Hello world'
call MPI_FINALIZE(ierror)
end
**********************************************
Origin3000 680% f90 -mp hello.f90
ld32: ERROR 33 : Unresolved text symbol "mpi_init_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_size_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_rank_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_finalize_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO 152: Output file removed because of error.
*******************************************************
Origin3000 681% f90 -mp -v hello.f90
/usr/lib32/cmplrs/mfef90 -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -mp -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -include=/usr/include -dsm -FE:cmdline=/tmp/ctmL.AAAa08CY7 -rii./rii_files/hello.rii -fB,/tmp/ctmB.BAAa08CY7 -fC,hello.T -fD,hello.l -ffree -LANG:=F90 hello.f90
f90: update_instantiation_info_file ./rii_files/hello.rii
/usr/lib32/cmplrs/be -PHASE:w:c -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -dsm -dsm_clone -LANG:=f90 -fB,/tmp/ctmB.BAAa08CY7 -fo,hello.o hello.f90
Compiling hello.f90 (/tmp/ctmB.BAAa08CY7) -- Back End
Compiling MAIN__(0)

/usr/lib32/cmplrs/dsm_prelink -dsm_clone hello.o
/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o -hides /usr/lib32/mips4/dsmcrt.o -init _dsm_crt_init hello.o -dont_warn_unused -lmp -lfortran -lffio -lftn -lm -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused
ld32: ERROR 33 : Unresolved text symbol "mpi_init_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_size_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_rank_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_finalize_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO 152: Output file removed because of error.
f90 ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 2
************************************************************************
Origin3000 682% f90 -mp -L/usr/lib32/mips4/libmpi.so -v hello.f90
f90 WARNING: -L/usr/lib32/mips4/libmpi.so does not refer to a valid directory
/usr/lib32/cmplrs/mfef90 -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -mp -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -include=/usr/include -dsm -FE:cmdline=/tmp/ctmL.AAAa08BKC -rii./rii_files/hello.rii -fB,/tmp/ctmB.BAAa08BKC -fC,hello.T -fD,hello.l -ffree -LANG:=F90 hello.f90
f90: update_instantiation_info_file ./rii_files/hello.rii
/usr/lib32/cmplrs/be -PHASE:w:c -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -dsm -dsm_clone -LANG:=f90 -fB,/tmp/ctmB.BAAa08BKC -fo,hello.o hello.f90
Compiling hello.f90 (/tmp/ctmB.BAAa08BKC) -- Back End
Compiling MAIN__(0)

/usr/lib32/cmplrs/dsm_prelink -dsm_clone hello.o
/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -L/usr/lib32/mips4/libmpi.so -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o -hides /usr/lib32/mips4/dsmcrt.o -init _dsm_crt_init hello.o -dont_warn_unused -lmp -lfortran -lffio -lftn -lm -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused
ld32: ERROR 33 : Unresolved text symbol "mpi_init_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_size_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_rank_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_finalize_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO 152: Output file removed because of error.
f90 ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 2
***************************************************************************


whether the flags are -mp or -mpio or something else it gives the same error.

Thanking You,
Phani
Thank you for inviting me to forums.

I tried using -lmpi and -lmpi it gives the following errors

*******************
Origin3000 683% f90 -lmpi -v hello.f90
/usr/lib32/cmplrs/mfef90 -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -include=/usr/include -FE:cmdline=/tmp/ctmL.AAAa08AGF -fB,/tmp/ctmB.BAAa08AGF -fC,hello.T -fD,hello.l -ffree -LANG:=F90 hello.f90
/usr/lib32/cmplrs/be -PHASE:w:c -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -LANG:=f90 -fB,/tmp/ctmB.BAAa08AGF -fo,hello.o hello.f90
Compiling hello.f90 (/tmp/ctmB.BAAa08AGF) -- Back End
Compiling MAIN__(0)

/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o -lmpi hello.o -dont_warn_unused -lfortran -lffio -lftn -lm -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused
ld32: WARNING 84 : /usr/lib32/mips4/libmpi.so is not used for resolving any symbol.
ld32: ERROR 33 : Unresolved text symbol "mpi_init_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_size_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_comm_rank_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR 33 : Unresolved text symbol "mpi_finalize_" -- 1st referenced by hello.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO 152: Output file removed because of error.
f90 ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 2
*****************************************************************
Origin3000 684% f90 -lmpich -v hello.f90
/usr/lib32/cmplrs/mfef90 -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -include=/usr/include -FE:cmdline=/tmp/ctmL.AAAa08Cji -fB,/tmp/ctmB.BAAa08Cji -fC,hello.T -fD,hello.l -ffree -LANG:=F90 hello.f90
/usr/lib32/cmplrs/be -PHASE:w:c -G8 -TARG:t5_ll_sc_bug=on -TENV:PIC -m1 -show -TARG:abi=n32:isa=mips4 -TARG:proc=r10000 -O2 -LANG:=f90 -fB,/tmp/ctmB.BAAa08Cji -fo,hello.o hello.f90
Compiling hello.f90 (/tmp/ctmB.BAAa08Cji) -- Back End
Compiling MAIN__(0)

/usr/lib32/cmplrs/ld32 -call_shared -no_unresolved -transitive_link -elf -_SYSTYPE_SVR4 -show -mips4 -n32 -L/usr/lib32/mips4/r10000 -L/usr/lib32/mips4 -L/usr/lib32 /usr/lib32/mips4/crt1.o -lmpich hello.o -dont_warn_unused -lfortran -lffio -lftn -lm -Bdynamic -lc /usr/lib32/mips4/crtn.o -warn_unused
ld32: FATAL 9 : I/O error (-lmpich): No such file or directory
f90 ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 32
**************************************************************************
the Flag -lmpich is not accepting..

Phnai
Thank You Very much for you kind and fruitful reply. It works when we add the flags in the last.

Thats really great of you.

I was struggling from yesterday by using all combinations and everytime the same error.

Regards,
Phani.
I was trying to run a model (first time) on my IRIS system and getting the below error. After going through the file, it is something related to shpalloc. Does anyone know this type of error?

***********************************************************************************************
f90 -C -mp -i4 -r8 -LIST -I/application/netcdf-3.5.0/include -I/usr/include -I./ -Duse_comm_MPI1 -Duse_libMPI -Duse_netCDF -DNC_DOUBLE -I../../../../src/lib/psmile/include -I../../../../src/lib/mpp_io/include -c ../../../../src/lib/mpp_io/src/mpp_mod.F90

integer(INT_KIND), private :: word(1)
^
f90-868 f90: ERROR MPP_MOD, File = ../../../../src/lib/mpp_io/src/mpp_mod.F90, Line = 68, Column = 11
"INT_KIND" is used in a constant expression, therefore it must be a constant.
***************************************************************************************************************

Around Line No.68, these are the few lines
**********************************************************************************
!various lengths (see shpalloc) are estimated in "words" which are 32bit on SGI, 64bit on Cray
!these are also the expected sizeof of args to MPI/shmem libraries
#ifdef _CRAY
integer(LONG_KIND), private :: word(1)
#endif
#ifdef sgi_mipspro
integer(INT_KIND), private :: word(1)
#endif
**********************************************************************************

Kindly Help

Regards,
Phani
Thank you for your prompt reply.

I have tried with -Dsgi_mipspro but getting the same error.
*********************************************************************************
f90 -C -mp -i4 -r8 -LIST -I/application/netcdf-3.5.0/include -I/usr/include -I./ -Duse_comm_MPI1 -Dsgi_mipspro -Duse_libMPI -Duse_netCDF -DNC_DOUBLE -I../../../../src/lib/psmile/include -I../../../../src/lib/mpp_io/include -c ../../../../src/lib/mpp_io/src/mpp_mod.F90

integer(INT_KIND), private :: word(1)
^
f90-868 f90: ERROR MPP_MOD, File = ../../../../src/lib/mpp_io/src/mpp_mod.F90, Line = 68, Column = 11
"INT_KIND" is used in a constant expression, therefore it must be a constant.
*********************************************************************************

I was trying to attach the file which is giving problem but saying "the extension is not allowed"

Basically, I was trying to run an atmospheric model and this many sub-models are included and in that one is "PRISM" which has "psmile" subroutines.
One of the subroutine is giving this error.
**********************************************************************
!-----------------------------------------------------------------------
! Communication for message-passing codes
!
! AUTHOR: V. Balaji ( [email protected] )
! Princeton University/GFDL
!
! MODIFICATIONS: Reiner Vogelsang ( [email protected] )
!
! This program is free software; The author agrees that you can
! redistribute and/or modify this version of the program under the
! terms of the Lesser GNU General Public License as published
! by the Free Software Foundation.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! Lesser GNU General Public License for more details
! ( http://www.gnu.org/copyleft/lesser.html ).
!-----------------------------------------------------------------------

!these are used to determine hardware/OS/compiler
!#include <os.h>

!onlysgi_mipspro one of SMA or MPI can be used
!(though mixing calls is allowed, this module will not)
#ifdef use_libSMA
#undef use_libMPI
#endif
!
#if defined(_CRAYT3E) || defined(_CRAYT3D) || defined(sgi_mipspro)
#define SGICRAY_MPP
#endif
!
!shmalloc is used on MPP SGI/Cray systems for shmem
#if defined(use_libSMA) && defined(SGICRAY_MPP)
#define use_shmalloc
#endif

module mpp_mod
use mod_kinds_model
#include <os.h>
!string BWA is used to tag lines that are bug workarounds and will disappear
!when offending compiler bug is fixed
!a generalized communication package for use with shmem and MPI
!will add: co_array_fortran, MPI2
!Balaji ( [email protected] ) 11 May 1998
#ifdef sgi_mipspro
#ifdef use_libSMA
use shmem_interface
#endif
!#ifdef use_libMPI
! use mpi
!#endif
#endif
implicit none
private
character(len=128), private :: version= &
'$Id: mpp_mod.F90,v 1.1.1.1 2005/03/23 16:01:11 adm Exp $'
character(len=128), private :: tagname= &
'$Name: $'

!various lengths (see shpalloc) are estimated in "words" which are 32bit on SGI, 64bit on Cray
!these are also the expected sizeof of args to MPI/shmem libraries
#ifdef _CRAY
integer(LONG_KIND), private :: word(1)
#endif
#ifdef sgi_mipspro
integer(INT_KIND), private :: word(1)
#endif

#ifdef SGICRAY
!see intro_io(3F): to see why these values are used rather than 5,6,0
integer, private :: in_unit=100, out_unit=101, err_unit=102
#else
integer, private :: in_unit=5, out_unit=6, err_unit=0
#endif
integer :: log_unit, etc_unit
logical, private :: module_is_initialized=.FALSE.
integer, private :: pe=0, node=0, npes=1, root_pe=0
integer, private :: error
integer, parameter, private :: MAXPES=2048 !used for dimensioning stuff that might be indexed by pe
character(len=32) :: configfile='logfile.out'
character(len=32) :: etcfile='._mpp.nonrootpe.stdout'
logical,save::logfile_defined=.false.,opened
integer::io_num

!initialization flags
integer, parameter, public :: MPP_VERBOSE=1, MPP_DEBUG=2
logical, private :: verbose=.FALSE., debug=.FALSE.

!flags to transmit routines
integer, parameter, public :: ALL_PES=-1, ANY_PE=-2, NULL_PE=-3

!errortype flags
integer, parameter, public :: NOTE=0, WARNING=1, FATAL=2
logical, private :: warnings_are_fatal = .FALSE.
integer, private :: error_state=0

integer(LONG_KIND), parameter, private :: MPP_WAIT=-1, MPP_READY=-2
#ifdef use_libSMA
#include <mpp/shmem.fh>
integer :: sync(SHMEM_REDUCE_SYNC_SIZE+SHMEM_BCAST_SYNC_SIZE+SHMEM_BARRIER_SYNC_SIZE)
!status and remote_data_loc are used to synchronize communication is MPP_TRANSMIT
#ifdef use_shmalloc
integer(LONG_KIND), private, dimension(0:MAXPES) :: status, remote_data_loc
#else
integer(LONG_KIND), private, allocatable, dimension(:) :: status, remote_data_loc
#endif
integer, private :: mpp_from_pe !used to announce from where data is coming from
#ifdef use_shmalloc
!we call shpalloc in mpp_init() to ensure all these are remotely accessible
!on PVP where shpalloc doesn't exist, module variables are automatically
!guaranteed to be remotely accessible
pointer( ptr_sync, sync )
pointer( ptr_status, status )
pointer( ptr_from, mpp_from_pe )
pointer( ptr_remote, remote_data_loc )
#endif
#endif /* use_libSMA */
#ifdef use_libMPI
!#ifndef sgi_mipspro
!sgi_mipspro gets this from 'use mpi'
#include <mpif.h>
!#endif
!tag is never used, but must be initialized to non-negative integer
integer, private :: tag=1, stat(MPI_STATUS_SIZE)
! integer, private, allocatable :: request(:)
integer, public, allocatable :: request(:)
#ifdef _CRAYT3E
!BWA: mpif.h on t3e currently does not contain MPI_INTEGER8 datatype
!(O2k and t90 do)
!(t3e: fixed on 3.3 I believe)
integer, parameter :: MPI_INTEGER8=MPI_INTEGER
#endif
#endif /* use_libMPI */

!mpp_stack is used by SHMEM collective ops
!must be SHPALLOC'd on SGICRAY_MPP, but is allocatable on PVP
#ifdef use_shmalloc
real(DOUBLE_KIND), private :: mpp_stack(1)
pointer( ptr_stack, mpp_stack )
#else
real(DOUBLE_KIND), private, allocatable :: mpp_stack(:)
#endif
integer, private :: mpp_stack_size=0, mpp_stack_hwm=0

!peset hold communicators as SHMEM-compatible triads (start, log2(stride), num)
type, private :: communicator
character(len=32) :: name
integer, pointer :: list(:)
integer :: count
#ifdef use_libSMA
integer :: start, log2stride
#elif use_libMPI
integer :: id, group !MPI communicator and group id for this PE set
#endif
end type
integer, parameter :: PESET_MAX=32 !should be .LE. max num of MPI communicators
type(communicator) :: peset(0:PESET_MAX) !0 is a dummy used to hold single-PE
"self" communicator
integer :: peset_num=0, current_peset_num=0
integer :: world_peset_num !the world communicator

!performance profiling
! This profiles every type of MPI/SHMEM call within
! a specified region of high-level code
! Initialize or retrieve a clock with
! id = mpp_clock_id( 'Region identifier name' )
! Then set caliper points around the region using:
! call mpp_clock_begin(id)
! ...
! call mpp_clock_end(id)
! mpp_exit will print out the results.
#ifdef __sgi
#define SYSTEM_CLOCK system_clock_sgi
#endif

#ifdef use_libMPI
#define SYSTEM_CLOCK system_clock_mpi
#endif

#************************************************************************************



Regards,
Phani
I got it solved though the person who wrote it...but would like to post as it could be useful for someone else.

The error says as "INT_KIND" is used in a constant expression, therefore it must be a constant." which imples that INT_KIND is taking it as FOrtran 90 parameter.

It seems that it is missing some cpp preprocessing macros.

For that I have added a Flag "-cpp" but some warning came saying that
*************************************************
"../../../../src/lib/mpp_io/src/mpp_mod.F90", line 180: warning(1047): macro
redefined differently
#define SYSTEM_CLOCK system_clock_mpi
^

"../../../../src/lib/mpp_io/src/mpp_mod.F90", line 1687: warning(1047): macro
redefined differently
#define MPP_TRANSMIT_ mpp_transmit_real4
^

"../../../../src/lib/mpp_io/src/mpp_mod.F90", line 1688: warning(1047): macro
redefined differently
#define MPP_TRANSMIT_SCALAR_ mpp_transmit_real4_scalar
**********************************************

In fact we cannot neglect his warning.

So I have modified the command like by removing the flag "-cpp" and adding "-ftpp -macro_expand" and it worked without any warning, creating the requried .mod file.

Regards,
Phani