MPI_ compiler issue

600 views
Skip to first unread message

Al

unread,
Jul 19, 2010, 7:34:17 PM7/19/10
to XBeach
Dear All,

I downloaded the latest version of Xbeach and tried to compile it on
server.
The sequential version works fine and perfect, but as soon as I try to
compile in parallel mode, there are some issues appeared.
As it is using the shared libraries, it could not read the libmpi.so.0

So I tried ./configure --prefix=/home/local --with-mpi FC=mpif90

But it failed compiling, then I tried;
./configure --prefix=/home/local --with-mpi FC=ifort
this time it was compiled properly and the makefile was created as
well.
then as tried the command;
make; make install,
the error was like;

./makeincludes: error while loading shared libraries: libmpi.so.0:
cannot open shared object file: No such file or directory
make: *** [spacedecl.gen] Error 127

the config.log file is inserted in the following;
config.log file:""
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by xbeach configure v18, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure --with-mpi --prefix=/home/ali/ FC=ifort

## --------- ##
## Platform. ##
## --------- ##

hostname = kh0.renci.org
uname -m = x86_64
uname -r = 2.6.9-42.0.8.ELsmp
uname -s = Linux
uname -v = #1 SMP Mon Feb 19 13:45:17 EST 2007

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /opt/mpi/openmpi/intel/bin
PATH: /home/ali/lib/asciidoc/bin
PATH: /home/ali/bin
PATH: /usr/kerberos/bin
PATH: /usr/java/jdk1.5.0_current/bin
PATH: /opt/mpi/openmpi/intel/bin
PATH: /home/ali/lib/asciidoc/bin
PATH: /home/ali/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /opt/ganglia/bin
PATH: /opt/ganglia/sbin
PATH: /opt/intel/cce/current/bin
PATH: /opt/intel/fce/current/bin
PATH: /opt/intel/idbe/current/bin
PATH: /opt/maui/bin
PATH: /opt/torque/bin
PATH: /opt/torque/sbin
PATH: /opt/mlm/current/bin
PATH: /opt/openmpi/bin/
PATH: /opt/rocks/bin
PATH: /opt/rocks/sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1850: checking for a BSD-compatible install
configure:1918: result: /usr/bin/install -c
configure:1929: checking whether build environment is sane
configure:1979: result: yes
configure:2120: checking for a thread-safe mkdir -p
configure:2159: result: /bin/mkdir -p
configure:2172: checking for gawk
configure:2188: found /bin/gawk
configure:2199: result: gawk
configure:2210: checking whether make sets $(MAKE)
configure:2232: result: yes
configure:2427: checking for Fortran compiler version
configure:2436: ifort --version >&5
ifort (IFORT) 9.1 20060925
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.

configure:2447: $? = 0
configure:2436: ifort -v >&5
Version 9.1
configure:2447: $? = 0
configure:2436: ifort -V >&5
Intel(R) Fortran Compiler for Intel(R) EM64T-based applications,
Version 9.1 Build 20060925 Package ID: l_fc_c_9.1.039
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.

configure:2447: $? = 0
configure:2436: ifort -qversion >&5
ifort: Command line warning: ignoring option '-q'; no argument
required
ifort: Command line error: no files specified; for help type "ifort -
help"
configure:2447: $? = 1
configure:2462: checking whether the Fortran compiler works
configure:2484: ifort conftest.f >&5
configure:2488: $? = 0
configure:2537: result: yes
configure:2540: checking for Fortran compiler default output file name
configure:2542: result: a.out
configure:2548: checking for suffix of executables
configure:2555: ifort -o conftest conftest.f >&5
configure:2559: $? = 0
configure:2581: result:
configure:2597: checking whether we are cross compiling
configure:2605: ifort -o conftest conftest.f >&5
configure:2609: $? = 0
configure:2616: ./conftest
configure:2620: $? = 0
configure:2635: result: no
configure:2640: checking for suffix of object files
configure:2656: ifort -c conftest.f >&5
configure:2660: $? = 0
configure:2681: result: o
configure:2689: checking whether we are using the GNU Fortran compiler
configure:2702: ifort -c conftest.F >&5
fortcom: Error: conftest.F, line 3: Syntax error, found END-OF-
STATEMENT when expecting one of: => = . ( : %
choke me
---------------^
fortcom: Error: conftest.F, line 3: This statement is positioned
incorrectly and/or has syntax errors.
choke me
---------------^
compilation aborted for conftest.F (code 1)
configure:2702: $? = 1
configure: failed program was:
| program main
| #ifndef __GNUC__
| choke me
| #endif
|
| end
configure:2711: result: no
configure:2717: checking whether ifort accepts -g
configure:2728: ifort -c -g conftest.f >&5
configure:2728: $? = 0
configure:2736: result: yes
configure:2787: checking for openmpif90
configure:2817: result: no
configure:2787: checking for mpif90
configure:2803: found /opt/mpi/openmpi/intel/bin/mpif90
configure:2814: result: mpif90
configure:2832: checking for MPI_Init
configure:2839: mpif90 -o conftest -g conftest.f >&5
/opt/intel/fce/9.1.039/lib/libimf.so: warning: warning: feupdateenv is
not implemented and will always fail
configure:2839: $? = 0
configure:2841: result: yes
configure:2970: checking for mpif.h
configure:2977: mpif90 -c -g conftest.f >&5
configure:2977: $? = 0
configure:2978: result: yes
configure:3025: checking for pkg-config
configure:3043: found /usr/bin/pkg-config
configure:3055: result: /usr/bin/pkg-config
configure:3179: checking pkg-config is at least version 0.9.0
configure:3182: result: yes
configure:3422: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by xbeach config.status v18, which was
generated by GNU Autoconf 2.65. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status

on kh0.renci.org

config.status:829: creating Makefile
config.status:829: creating doc/Makefile
config.status:829: creating config.h

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=set
ac_cv_env_FC_value=ifort
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_MPIFC_set=
ac_cv_env_MPIFC_value=
ac_cv_env_NETCDF_CFLAGS_set=
ac_cv_env_NETCDF_CFLAGS_value=
ac_cv_env_NETCDF_LIBS_set=
ac_cv_env_NETCDF_LIBS_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_fc_compiler_gnu=no
ac_cv_objext=o
ac_cv_path_PKG_CONFIG=/usr/bin/pkg-config
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_MPIFC=mpif90
ac_cv_prog_fc_g=yes
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/ali/lib/xbeach-v18/config/missing --run
aclocal-1.11'
AMTAR='${SHELL} /home/ali/lib/xbeach-v18/config/missing --run tar'
AUTOCONF='${SHELL} /home/ali/lib/xbeach-v18/config/missing --run
autoconf'
AUTOHEADER='${SHELL} /home/ali/lib/xbeach-v18/config/missing --run
autoheader'
AUTOMAKE='${SHELL} /home/ali/lib/xbeach-v18/config/missing --run
automake-1.11'
AWK='gawk'
CYGPATH_W='echo'
DEFS='-DHAVE_CONFIG_H'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
FC='mpif90'
FCFLAGS='-g'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/ali/lib/xbeach-v18/config/missing --run
makeinfo'
MKDIR_P='/bin/mkdir -p'
MPIFC='mpif90'
MPILIBS=' '
NETCDF_CFLAGS=''
NETCDF_LIBS=''
OBJEXT='o'
PACKAGE='xbeach'
PACKAGE_BUGREPORT='d.roe...@unesco-ihe.org'
PACKAGE_NAME='xbeach'
PACKAGE_STRING='xbeach v18'
PACKAGE_TARNAME='xbeach'
PACKAGE_URL=''
PACKAGE_VERSION='v18'
PATH_SEPARATOR=':'
PKG_CONFIG='/usr/bin/pkg-config'
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
USEMPI_FALSE='#'
USEMPI_TRUE=''
USENETCDF_FALSE=''
USENETCDF_TRUE='#'
VERSION='v18'
ac_ct_FC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE='#'
am__isrc=''
am__leading_dot='.'
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/ali/lib/xbeach-v18/config/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/ali'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "xbeach"
#define PACKAGE_TARNAME "xbeach"
#define PACKAGE_VERSION "v18"
#define PACKAGE_STRING "xbeach v18"
#define PACKAGE_BUGREPORT "d.roe...@unesco-ihe.org"
#define PACKAGE_URL ""
#define PACKAGE "xbeach"
#define VERSION "v18"
#define HAVE_MPI 1

configure: exit 0"""

Would you please let me know how to figure it out please.

Ali Mehran

fedor baart

unread,
Jul 19, 2010, 8:12:58 PM7/19/10
to xbe...@googlegroups.com
Hi Ali,

The proper way to configure for mpi is by using:

./configure --prefix=/home/local --with-mpi

It should automatically find your mpi compiler, in your case mpif90.
I think that if you use FC=ifort in combination with --with-mpi,
you'll create a mpi executable that is not linked against the proper
libraries.

Also after you switch between mpi and nonmpi builds, make sure you do
a "make clean".
Can you show me what error you get after:

make clean
./configure --prefix=/home/local --with-mpi
make

Kind regards,

Fedor

> --
> You received this message because you are subscribed to the Google Groups "XBeach" group.
> To post to this group, send email to xbe...@googlegroups.com.
> To unsubscribe from this group, send email to xbeach+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xbeach?hl=en.
>
>

Al

unread,
Jul 22, 2010, 11:34:45 AM7/22/10
to XBeach
Dear Fedor,
The one you told me to do, "./configure --prefix=home/local --with-
mpi FC=ifort" it makes the files properly
but after running the "make; make install" there is an error about
shared libraries as below;


" -bash-3.00$ make; make install
mpif90 -DHAVE_CONFIG_H -I. -g -c -o makeincludes.o
makeincludes.F90
mpif90 -g -o makeincludes makeincludes.o
/opt/intel/fce/9.1.039/lib/libimf.so: warning: warning: feupdateenv is
not implemented and will always fail
echo spacedecl.gen | ./makeincludes
./makeincludes: error while loading shared libraries: libmpi.so.0:
cannot open shared object file: No such file or directory
make: *** [spacedecl.gen] Error 127
echo spacedecl.gen | ./makeincludes
./makeincludes: error while loading shared libraries: libmpi.so.0:
cannot open shared object file: No such file or directory
make: *** [spacedecl.gen] Error 127"

and about the second one;" make clean" and then "./configure --
prefix=/home/local --with-mpi "
It makes the files properly either but while running "make; make
install" there s an error as below and the same as previous one;


" -bash-3.00$ make; make install
mpif90 -DHAVE_CONFIG_H -I. -g -c -o makeincludes.o
makeincludes.F90
mpif90 -g -o makeincludes makeincludes.o
/opt/intel/fce/9.1.039/lib/libimf.so: warning: warning: feupdateenv is
not implemented and will always fail
echo spacedecl.gen | ./makeincludes
./makeincludes: error while loading shared libraries: libmpi.so.0:
cannot open shared object file: No such file or directory
make: *** [spacedecl.gen] Error 127
echo spacedecl.gen | ./makeincludes
./makeincludes: error while loading shared libraries: libmpi.so.0:
cannot open shared object file: No such file or directory
make: *** [spacedecl.gen] Error 127"

Regards,
Ali Mehran
> > PACKAGE_BUGREPORT='d.roelv...@unesco-ihe.org'
> ...
>
> read more »

Fedor Baart

unread,
Jul 22, 2010, 1:04:15 PM7/22/10
to xbe...@googlegroups.com

Hi ali,

Your libmpi cannot be found. It is probably under /opt/intel/ somwhere, in a lib directory. That path should be added to the LD_LIBRARY_PATH environment variable. There should be a script in the bin directory of the compiler that does that for you. On my system I think it's called ifortvars.sh. If you have that one you can put it in your .profile or .bashrc file like:

. path/to/ifortvars.sh #the dot is equivalent to the source command

or if you don't have an ifortvars.sh:

export LD_LIBRARY_PATH = $LD_LIBRARY_PATH:path/to/libdir

then restart your shell or source your profile and it should work.
Kind regards,


Fedor

Al

unread,
Jul 27, 2010, 4:38:15 PM7/27/10
to XBeach
Hi Fedor,

I tried the export thing for libmpi, it didn't work by itself but as
I added the environment variable "FC=g95", it could compile and create
executable.

Then I ran "make", then in "PARAMS.F90", in line 1024 there was a call
subroutine for "MPI_BCAST", which caused crash.
As I searched all subroutines, there was not any "MPI_BCAST" so I just
blocked the line with "!".
The next error was in "SPACEPARAMS.F90", line 1218, with the USE
"SPACEPARAMS", that I changed it to "USE PARAMS"
Next time that I ran it again "make", there were some issues with
"XMASTER" type error on line 1247 which was solved by blocking that
with "!"
And then a ")" was missed on line 1039 of "BOUNDARYCONDITIONS.F90".
And the last one was on line 1288 of "PARAMS.F90" which was again
solved with "!".


And after all I could compile the MPI version, but have not run the
MPI mode yet to check the accuracy and wondering if it works honestly.
I think in some points by blocking the lines with "!" although having
code run, I did wrong.

Regards,
Ali M
> ...
>
> read more »

fedor baart

unread,
Jul 27, 2010, 7:00:26 PM7/27/10
to xbe...@googlegroups.com
Hi Ali,

I'll try and give a bit more information about what's going on in the
configure and make of xbeach + mpi. But I'll start with a short
summary on how you should proceed.

- revert all the changes (or better download a new copy)
- locate your mpif90 compiler (which mpif90)
- make sure the accompanying lib path is in your LD_LIBRARY_PATH, for
example if mpif90 is in /usr/local/bin/mpif90, then your
LD_LIBRARY_PATH should contain /usr/local/lib
- run ./configure --with-mpi
- run make clean
- run make
- run mpiexec -np 2 ./xbeach
If something gives an error, stop and mail the output. You can save
the output to a file by running a command with &> file.log after it,
for example ./configure &> config.log, saves all output, including
errors to a log file.

Now for some extra information about mpi and xbeach. The mpi version
of xbeach is a bit different from the normal version in 3 ways.
Different code is compiled, different libraries are linked and the
program is started differently.

I'll first explain how the different code is compiled.
At configuration time (when you run configure) you can decide whether
you want a mpi version or not, this is done with the option --with-mpi
. What happens when you give the option is defined in the file
configure.ac:
AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],[Build with mpi support
@<:@default=check@:>@])], [],[])
This line defines the mpi option. When it is defined it will run the
ACX_MPI macro (in the m4 directory).
What this macro does is that it searches for all well known
mpi-fortran compilers. If it finds one, it will check to see if it
works and if so, use that as a compiler.
Another thing that happens is that it sets the variable USEMPI.
When you looked at the code you probably saw some lines starting with
#ifdef(USEMPI)
Those type of lines, starting with a #ifdef are, what's called,
preprocessor statements.
The typical order of compilation of languages like fortran and c/c++ is:
sourcecode -> [preprocessor] -> processed sourcecode -> [compiler] ->
object files (.o) -> [linker] -> executable
By using the preprocessor statements, we can skip some code for the
non-mpi version. For example in the mpi version when a variable
changes, it has to be broadcasted to the other computers/cpus where
xbeach is running. All specific mpi function calls are only compiled
when #ifdef(USEMPI) is true, meaning if USEMPI is defined.
One such line is the MPI_BCAST call. What that does is it sends over
an array to all other processes. It is explained in the mpi
documentation. You could not find that function in xbeach because it
is part of mpi, an external library. When you disabled it, you
basically stopped all communication between the xbeach nodes. That is
not a good idea :)
So to sum it up, by running ./configure --with-mpi, 2 things happen,
it finds the proper mpi capable compiler and generates mpi enabled
code using the USEMPI flag.

I'll now explain how the software is linked.
By defining the --with-mpi a new compiler is set. This compiler is
usually called mpif90. This is actually a normal fortran compiler with
some extra options set so you don't have to worry about linking and
compiling the mpi libraries. You can see this by running mpif90 -show.
For example on my machine it says:

f95 -Wl,-Bsymbolic-functions -I/usr/include/mpich2
-I/usr/include/mpich2 -L/usr/lib -L/usr/lib -lmpichf90 -Wl,-rpath
-Wl,/usr/lib -lmpichf90 -lmpich -lopa -lpthread -lrt

This means that it will find fortran modules in /usr/include/mpich2,
it will look for libraries in /usr/lib, it will link mpichf90, mpich,
opa, pthreat and rt. It actually does a bit more, you can see this by
looking in mpif90, it's usually a bash script wrapping your normal
compiler.

So by using the option --with-mpi, we get a compiler which knows how
to link to the proper mpi modules. Now if you run configure with the
option FC=g95, FC=gfortran or FC=ifort, what you're doing is replacing
the line with all the linking options which are needed to create a
working mpi executable by just the name of the compiler. This causes
the problem during compilation that it can't find "use mpi", and
during linking that it can't find references to mpi_bcast and other
mpi functions. Therefore it's best to use a proper mpi fortran
compiler, in most cases mpif90. If it doesn't find it, because it's
for example named openmpif90, you can set it manually using
MPIFC=openmpif90 ./configure --with-mpi. This way it knows that it
should use that as a mpi compiler. Again using
MPIFC=ifort,g95,gfortran is not a good idea.

In your case you used FC=g95, had to strip out mpi specific lines like
xmaster, mpi_bcast, giving you a half mpi/half non mpi version, that
probably doesn't run anymore.
To summarize, --with-mpi makes sure that the mpif90 compiler is found.
Mpif90 knows how to create a mpi executable, the normal compilers
don't, so always use mpif90 to make the mpi version.

The final thing: How to run an mpi version of xbeach, compiled with
USEMPI, and linked against the mpi libraries (see ldd ./xbeach).

To tun the mpi enabled xbeach version, you run the mpiexec command
followed by the executable:

mpiexec -np 2 ./xbeach

This mpiexec program makes sure that the programs (xbeach is started
multiple times).
If at this step .so object files from mpi are not found, then your
system is not properly configured to run mpi executables. You probably
need to setup the LD_LIBRARY_PATH to point to the mpi libraries. But
if you installed mpi using yum/yast or apt it usually just works.

I hope this makes it a bit clearer. I wrote it down a bit detailed, so
I can copy this text into the manual. You can find more information on
mpi and the autotools build information on the web.

Please try the suggestions on the start of the email and send the
output if it fails.

Kind regards,

Fedor

Al

unread,
Jul 28, 2010, 4:08:56 PM7/28/10
to XBeach
Dear Fedor,
You are so helpful, well I followed the instruction you gave me.
So at first I did "MPIFC=mpif90 ./configure --prefix=/home/ali --with-
mpi &>configure.log"
the file configure.log is as below:


"This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by xbeach configure v18, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure MPIFC=mpif90 --with-mpi --prefix=/home/ali/

## --------- ##
## Platform. ##
## --------- ##

hostname = kh0.renci.org
uname -m = x86_64
uname -r = 2.6.9-42.0.8.ELsmp
uname -s = Linux
uname -v = #1 SMP Mon Feb 19 13:45:17 EST 2007

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /opt/mpi/openmpi/intel/lib
PATH: /opt/mpi/openmpi/intel/bin
PATH: /home/ali/lib/asciidoc/bin
PATH: /home/ali/bin
PATH: /usr/kerberos/bin
PATH: /usr/java/jdk1.5.0_current/bin
PATH: /opt/mpi/openmpi/intel/bin
PATH: /home/jitendra/lib/asciidoc/bin
PATH: /home/jitendra/bin
configure:2374: checking for gfortran-mp-4.4
configure:2404: result: no
configure:2374: checking for gfortran-mp-4.3
configure:2404: result: no
configure:2374: checking for gfortran
configure:2404: result: no
configure:2374: checking for ifort
configure:2390: found /opt/intel/fce/current/bin/ifort
configure:2401: result: ifort
configure:2814: result: mpif90
configure:2832: checking for MPI_Init
configure:2839: mpif90 -o conftest -g conftest.f >&5
/opt/intel/fce/9.1.039/lib/libimf.so: warning: warning: feupdateenv is
not implemented and will always fail
configure:2839: $? = 0
configure:2841: result: yes
configure:2970: checking for mpif.h
configure:2977: mpif90 -c -g conftest.f >&5
configure:2977: $? = 0
configure:2978: result: yes
configure:3025: checking for pkg-config
configure:3043: found /usr/bin/pkg-config
configure:3055: result: /usr/bin/pkg-config
configure:3179: checking pkg-config is at least version 0.9.0
configure:3182: result: yes
configure:3422: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by xbeach config.status v18, which was
generated by GNU Autoconf 2.65. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status

on kh0.renci.org

config.status:829: creating Makefile
config.status:829: creating doc/Makefile
config.status:829: creating config.h

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_MPIFC_set=set
ac_cv_env_MPIFC_value=mpif90
ac_cv_env_NETCDF_CFLAGS_set=
ac_cv_env_NETCDF_CFLAGS_value=
ac_cv_env_NETCDF_LIBS_set=
ac_cv_env_NETCDF_LIBS_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_fc_compiler_gnu=no
ac_cv_objext=o
ac_cv_path_PKG_CONFIG=/usr/bin/pkg-config
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_MPIFC=mpif90
ac_cv_prog_ac_ct_FC=ifort
ac_cv_prog_fc_g=yes
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/ali/xbeach-v18/config/missing --run
aclocal-1.11'
AMTAR='${SHELL} /home/ali/xbeach-v18/config/missing --run tar'
AUTOCONF='${SHELL} /home/ali/xbeach-v18/config/missing --run autoconf'
AUTOHEADER='${SHELL} /home/ali/xbeach-v18/config/missing --run
autoheader'
AUTOMAKE='${SHELL} /home/ali/xbeach-v18/config/missing --run
automake-1.11'
AWK='gawk'
CYGPATH_W='echo'
DEFS='-DHAVE_CONFIG_H'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
FC='mpif90'
FCFLAGS='-g'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/ali/xbeach-v18/config/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
MPIFC='mpif90'
MPILIBS=' '
NETCDF_CFLAGS=''
NETCDF_LIBS=''
OBJEXT='o'
PACKAGE='xbeach'
PACKAGE_BUGREPORT='d.roe...@unesco-ihe.org'
PACKAGE_NAME='xbeach'
PACKAGE_STRING='xbeach v18'
PACKAGE_TARNAME='xbeach'
PACKAGE_URL=''
PACKAGE_VERSION='v18'
PATH_SEPARATOR=':'
PKG_CONFIG='/usr/bin/pkg-config'
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
USEMPI_FALSE='#'
USEMPI_TRUE=''
USENETCDF_FALSE=''
USENETCDF_TRUE='#'
VERSION='v18'
ac_ct_FC='ifort'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE='#'
am__isrc=''
am__leading_dot='.'
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/ali/xbeach-v18/config/install-sh'
and then I did "make clean"

and after that " make &> make.log"
the file is as below:

"mpif90 -DHAVE_CONFIG_H -I. -g -c -o makeincludes.o
makeincludes.F90
mpif90 -g -o makeincludes makeincludes.o
/opt/intel/fce/9.1.039/lib/libimf.so: warning: warning: feupdateenv is
not implemented and will always fail
echo spacedecl.gen | ./makeincludes
Making spacedecl.gen
echo mnemonic.gen | ./makeincludes
Making mnemonic.gen
echo indextos.gen | ./makeincludes
Making indextos.gen
echo space_alloc_scalars.gen | ./makeincludes
Making space_alloc_scalars.gen
echo space_alloc_arrays.gen | ./makeincludes
Making space_alloc_arrays.gen
echo space_ind.gen | ./makeincludes
Making space_ind.gen
echo space_inp.gen | ./makeincludes
Making space_inp.gen
echo chartoindex.gen | ./makeincludes
Making chartoindex.gen
echo "Build_Revision = '`svnversion`'" > version.dat
echo "Build_URL = '`svn info | grep URL`'" >> version.dat
svn: '.' is not a working copy
echo "Build_Date = '`date`'" >> version.dat
make all-recursive
make[1]: Entering directory `/home/ali/xbeach-v18'
Making all in doc
make[2]: Entering directory `/home/ali/xbeach-v18/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/ali/xbeach-v18/doc'
make[2]: Entering directory `/home/ali/xbeach-v18'
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-xmpi.o `test -f 'xmpi.F90' || echo './'`xmpi.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-general_mpi.o `test -f 'general_mpi.F90' || echo
'./'`general_mpi.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-logging.o `test -f 'logging.F90' || echo './'`logging.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-filefunctions.o `test -f 'filefunctions.F90' || echo
'./'`filefunctions.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-readkey.o `test -f 'readkey.F90' || echo './'`readkey.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-mnemonic.o `test -f 'mnemonic.F90' || echo './'`mnemonic.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-interp.o `test -f 'interp.F90' || echo './'`interp.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-math_tools.o `test -f 'math_tools.F90' || echo
'./'`math_tools.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-general_fileio.o `test -f 'general_fileio.F90' || echo
'./'`general_fileio.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-params.o `test -f 'params.F90' || echo './'`params.F90
fortcom: Error: params.F90, line 1024: There is no matching specific
subroutine for this generic subroutine call. [MPI_BCAST]
call MPI_Bcast(par,sizeof(par),MPI_BYTE,xmpi_master,xmpi_comm,ierror)
-----^
compilation aborted for params.F90 (code 1)
make[2]: *** [xbeach-params.o] Error 1
make[2]: Leaving directory `/home/ali/xbeach-v18'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ali/xbeach-v18'
make: *** [all] Error 2"

So taking a quick look at the outputs, I think it can not at first
update libimf.so while configuring
And then while make is running can not the library for the MPI_BCAST.
Kind regards,
Ali


On Jul 27, 7:00 pm, fedor baart <f.ba...@gmail.com> wrote:
> Hi Ali,
>
> ...
>
> read more »

fedor baart

unread,
Jul 28, 2010, 5:25:17 PM7/28/10
to xbe...@googlegroups.com
Hi Ali,

So you get one warning and a few errors:
I'll try and explain what's happening. The third error (Error3 below)
is important, the others are just interesting.

Warning1:


mpif90 -g -o makeincludes makeincludes.o
/opt/intel/fce/9.1.039/lib/libimf.so: warning: warning: feupdateenv is
not implemented and will always fail

Explanation: According to the release notes of the intel 9 compiler,
this is nothing to worry about. From the release notes: "This warning
is due to a mismatch of library types and can be ignored. The warning
will not appear if -i-dynamic is used."

Error1:


configure:2436: ifort -qversion >&5
ifort: Command line warning: ignoring option '-q'; no argument
required
ifort: Command line error: no files specified; for help type "ifort -
help"

Explanation: The configure script is testing your compiler, in this
case it is testing if the compiler can accept a -qversion argument.
The ibm compiler accepts that option and displays the version and
release of the compiler being invoked. The intel fortran compiler
doesn't use that option. Nothing to worry about, it will find the -v
option to display the version. The configure script tries to see how
your compiler works by just running it, this has proven to be a robust
method to be able to support the many hundreds of different compilers
that are available.

Error2:


configure:2689: checking whether we are using the GNU Fortran compiler
configure:2702: ifort -c conftest.F >&5
fortcom: Error: conftest.F, line 3: Syntax error, found END-OF-
STATEMENT when expecting one of: => = . ( : %
choke me
---------------^
fortcom: Error: conftest.F, line 3: This statement is positioned
incorrectly and/or has syntax errors.
choke me
---------------^
compilation aborted for conftest.F (code 1)

Explanation: This is also nothing to worry about, the configure script
is trying to compile a program to see if it is the gnu compiler. It
isn't so it should choke on the line choke me :). You can see that
these errors are nothing to worry about because the configure script
just keeps running, it says: "checking whether we are using the GNU
Fortran compiler: No" and continues.

Error3:


mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -c -o
xbeach-params.o `test -f 'params.F90' || echo './'`params.F90
fortcom: Error: params.F90, line 1024: There is no matching specific
subroutine for this generic subroutine call. [MPI_BCAST]
call MPI_Bcast(par,sizeof(par),MPI_BYTE,xmpi_master,xmpi_comm,ierror)
-----^
compilation aborted for params.F90 (code 1)

Explanation: Now this is a problem. Even though you are using the
mpif90 compiler it can't find the function MPI_BCAST. This is a bit
strange because it could find the function MPI_INIT. You can see this
in the lines:

configure:2832: checking for MPI_Init

.....
configure:2841: result: yes

The MPI_BCAST function is in mpi.mod, located in the include directory
next to your mpif90 compiler. We already know it can find it because
that was tested by the configure script (it found MPI_INIT). So what
happened is that someone (being me) forgot to "use" the mpi module.

It's a bit strange because it did compile on gfortran and on the intel
10 and 11 compiler. I'll fix this issue and test it and upload it. In
the meantime you can add a line to the distribute_par subroutine (at
line 1024 in params.F90), like this:

#ifdef USEMPI
subroutine distribute_par(par)
use mpi ! <<<< I forgot this, add this for now..
use xmpi_module

That should solve it. I hope this helps. Thanks for your persistence :)

Kind regards,

Fedor Baart

Al

unread,
Jul 28, 2010, 7:33:31 PM7/28/10
to XBeach
Dear Fedor,

I could solve it I think,
I used the mvapich2 on server which was installed separately.
Up to now there is not any warning about it, and I am running the ZWIN
case in parallel to see if it works.
So in case of any problem, I would switch back to your instruction
with the old library.

I have another question,

There is one another server (lets call it server B) that I am trying
to compile the parallel mode,
On that I did the same command; "MPIFC=mpif90 ./configure --with-mpi --
prefix=/home/ali &> configure.log"

and the file is as below;
"checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gfortran-mp-4.4... no
checking for gfortran-mp-4.3... no
checking for gfortran... gfortran
checking whether the Fortran compiler works... yes
checking for Fortran compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for openmpif90... mpif90
checking for MPI_Init... yes
checking for mpif.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h"

and then I did "make clean"
and "./make &>make.log"
the file make.log is as below:
"mpif90 -DHAVE_CONFIG_H -I. -g -O2 -c -o makeincludes.o
makeincludes.F90
mpif90 -g -O2 -o makeincludes makeincludes.o
echo spacedecl.gen | ./makeincludes
Making spacedecl.gen
echo mnemonic.gen | ./makeincludes
Making mnemonic.gen
echo indextos.gen | ./makeincludes
Making indextos.gen
echo space_alloc_scalars.gen | ./makeincludes
Making space_alloc_scalars.gen
echo space_alloc_arrays.gen | ./makeincludes
Making space_alloc_arrays.gen
echo space_ind.gen | ./makeincludes
Making space_ind.gen
echo space_inp.gen | ./makeincludes
Making space_inp.gen
echo chartoindex.gen | ./makeincludes
Making chartoindex.gen
echo "Build_Revision = '`svnversion`'" > version.dat
/bin/sh: svnversion: command not found
echo "Build_URL = '`svn info | grep URL`'" >> version.dat
/bin/sh: svn: command not found
echo "Build_Date = '`date`'" >> version.dat
make all-recursive
make[1]: Entering directory `/home/ali/xbeach-v18'
Making all in doc
make[2]: Entering directory `/home/ali/xbeach-v18/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/ali/xbeach-v18/doc'
make[2]: Entering directory `/home/ali/xbeach-v18'
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-xmpi.o `test -f 'xmpi.F90' || echo './'`xmpi.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-general_mpi.o `test -f 'general_mpi.F90' || echo
'./'`general_mpi.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-logging.o `test -f 'logging.F90' || echo './'`logging.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-filefunctions.o `test -f 'filefunctions.F90' || echo
'./'`filefunctions.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-readkey.o `test -f 'readkey.F90' || echo './'`readkey.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-mnemonic.o `test -f 'mnemonic.F90' || echo './'`mnemonic.F90
In file mnemonic.F90:12

character(len=20), dimension(:), allocatable :: dimensions ! the
dimensions o
1
Error: Attribute at (1) is not allowed in a TYPE definition
make[2]: *** [xbeach-mnemonic.o] Error 1
make[2]: Leaving directory `/home/ali/xbeach-v18'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ali/xbeach-v18'
make: *** [all] Error 2"

what can be the reason for this allocate error?
I could not find much online about it.
Thanks again for your attention
Regards,
Ali





On Jul 28, 5:25 pm, fedor baart <f.ba...@gmail.com> wrote:
> Hi Ali,
>
> ...
>
> read more »

fedor baart

unread,
Jul 29, 2010, 5:28:29 AM7/29/10
to xbe...@googlegroups.com
Hi Ali,

About this line:


character(len=20), dimension(:), allocatable :: dimensions ! the

I used an allocatable array inside a type. This is part of the fortran
2003 specification, which is not supported by some compilers (g95 +
gfortran < 4.2).

I think for older compiler it only works like this:
character(len=20), dimension(:), pointer :: dimensions
But I'll probably change it to:
character(len=20), dimension(maxndimensions) :: dimensions

I'll try and rewrite that part, so it also works on older compilers. A
way around this would be to use a more up to date compiler. Can you
check what compiler you use on that machine? You can find that out by
mpif90 -show.

Kind regards,

Fedor

Al

unread,
Jul 29, 2010, 10:48:12 AM7/29/10
to XBeach
Dear Fedor,

I tried the way that you told me to,
Lets say about the first one ( character(len=20), dimension(:),
pointer :: dimensions ):
I did it and did "./configure --with-mpi --prefix=/home/ali
MPIFC=mpif90"
then it was configure as below:
and then "make", the results was as below:
xbeach-interp.o `test -f 'interp.F90' || echo './'`interp.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-math_tools.o `test -f 'math_tools.F90' || echo
'./'`math_tools.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-general_fileio.o `test -f 'general_fileio.F90' || echo
'./'`general_fileio.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-params.o `test -f 'params.F90' || echo './'`params.F90
In file params.F90:1181

vars
1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
In file params.F90:1197

allocate(vars(size(temp)+1))
1
Error: Syntax error in ALLOCATE statement at (1)
In file params.F90:1199

vars(1:size(temp)) = temp
1
Error: Unclassifiable statement at (1)
In file params.F90:1201

vars(size(vars)) = mnem
1
Error: Unclassifiable statement at (1)
In file params.F90:1177

subroutine add_outmnem(mnem, vars)
1
Error: Symbol 'vars' at (1) has no IMPLICIT type
In file params.F90:1248

call add_outmnem(line, globalvars)
1
Error: Type/rank mismatch in argument 'vars' at (1)
In file params.F90:1192

allocate(temp(size(vars)))
1
Error: 'array' argument of 'size' intrinsic at (1) must be an array
In file params.F90:1024

call MPI_Bcast(par,sizeof(par),MPI_BYTE,xmpi_master,xmpi_comm,ierror)
1
Error: Function 'sizeof' at (1) has no IMPLICIT type
make[2]: *** [xbeach-params.o] Error 1
make[2]: Leaving directory `/home/ali/xbeach-v18'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ali/xbeach-v18'
make: *** [all] Error 2"

So as it failed I did the second one, " character(len=20),
dimension(maxndimensions) :: dimensions "
and then "./configure --with-mpi --prefix=/home/ali MPIFC=mpif90"
the output was like below:


"checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gfortran-mp-4.4... no
checking for gfortran-mp-4.3... no
checking for gfortran... gfortran
checking whether the Fortran compiler works... yes
checking for Fortran compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for openmpif90... mpif90
checking for MPI_Init... yes
checking for mpif.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h"


and after that "make clean" and then "make"
the output was like below with some Errors:
character(len=20), dimension(maxndimensions) :: dimensions ! the
dimensions o
1
Error: Component 'dimensions' of 'arraytype' at (1) must have constant
array bounds.
make[2]: *** [xbeach-mnemonic.o] Error 1
make[2]: Leaving directory `/home/ali/xbeach-v18'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ali/xbeach-v18'
make: *** [all] Error 2"

I think you are right that the issue is with the old compiler
probably.
And for the compiler version, I did "mpif90 -show" and it said like:
"f95 -I/usr/local/include -I/usr/local/include -L/usr/local/lib -L/usr/
local/lib -lmpichf90 -lmpichf90 -lmpich -lopa -lpthread -lrt"

The other server that you helped me compile the model looks to work
properly, but as I tried the ZWIN testcase in parallel, there appeared
an error saying:
" Error: wave stationary solver not compatable with MPI "

Were there any other specific input supposed to be ?


Thanks again for your help
Regards,
Ali







On Jul 29, 5:28 am, fedor baart <f.ba...@gmail.com> wrote:
> Hi Ali,
>
> ...
>
> read more »

Fedor Baart

unread,
Jul 29, 2010, 12:40:41 PM7/29/10
to xbe...@googlegroups.com
Hi Ali,

These two errors are the result of using an old compiler. I think it happens with gfortran <=4.1 . Your mpi compiler uses the compiler f95. You can check with "f95 -v" or "f95 --version" which version it is. 

vars
   1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
In file params.F90:1197

Error: Function 'sizeof' at (1) has no IMPLICIT type


So as it failed I did the second one, " character(len=20),
dimension(maxndimensions) :: dimensions "
and then "./configure --with-mpi --prefix=/home/ali MPIFC=mpif90"
the output was like below:


This error might be caused by this variable is not defined yet. You can change it to 4.

 character(len=20), dimension(maxndimensions) :: dimensions ! the
dimensions o
                                                          1
Error: Component 'dimensions' of 'arraytype' at (1) must have constant

Like this:
character(len=20), dimension(4) :: dimensions 

I already fixed this issue in the latest commit in subversion. We'll test that during the weekend.


I think you are right that the issue is with the old compiler
probably.
And for the compiler version, I did "mpif90 -show" and it said like:
"f95 -I/usr/local/include -I/usr/local/include -L/usr/local/lib -L/usr/
local/lib -lmpichf90 -lmpichf90 -lmpich -lopa -lpthread -lrt

Yep, there's a few compilers that we don't support. Gfortran <4.1 won't work and I don't have easy access to it. Also g95 is somehow incompatible with the math_tools we use. I haven't had time to look into that. 

The other server that you helped me compile the model looks to work
properly, but as I tried the ZWIN testcase in parallel, there appeared
an error saying:
"  Error: wave stationary solver not compatable with MPI "

Were there any other specific input supposed to be ?

Yep there are two options of instat that do not work with mpi: 'stat' and 'stat_table'. 
Other options that are available are: bichrom, ts_1, ts_2, jons, swan, vardens, reuse, nonh, off  and jons_table. 

Kind regards,

Fedor

Al

unread,
Aug 2, 2010, 12:28:34 PM8/2/10
to XBeach
Hi Fedor,

I tried the "f95 --version" and it returns the gcc4.1.2 20080704

I changed the dimension as you said "character(len=20),
dimension(4) :: dimensions "

and start compiling the code, the error this time is as below:

"make all-recursive
make[1]: Entering directory `/home/ali/xbeach-v18'
Making all in doc
make[2]: Entering directory `/home/ali/xbeach-v18/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/ali/xbeach-v18/doc'
make[2]: Entering directory `/home/ali/xbeach-v18'
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-xmpi.o `test -f 'xmpi.F90' || echo './'`xmpi.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-general_mpi.o `test -f 'general_mpi.F90' || echo
'./'`general_mpi.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-logging.o `test -f 'logging.F90' || echo './'`logging.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-filefunctions.o `test -f 'filefunctions.F90' || echo
'./'`filefunctions.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-readkey.o `test -f 'readkey.F90' || echo './'`readkey.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-mnemonic.o `test -f 'mnemonic.F90' || echo './'`mnemonic.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-interp.o `test -f 'interp.F90' || echo './'`interp.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-math_tools.o `test -f 'math_tools.F90' || echo
'./'`math_tools.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-general_fileio.o `test -f 'general_fileio.F90' || echo
'./'`general_fileio.F90
mpif90 -DHAVE_CONFIG_H -I. -DUSEMPI -DHAVE_MPI_WTIME -g -O2 -c -o
xbeach-params.o `test -f 'params.F90' || echo './'`params.F90
In file params.F90:1182

vars
1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
In file params.F90:1198

allocate(vars(size(temp)+1))
1
Error: Syntax error in ALLOCATE statement at (1)
In file params.F90:1200

vars(1:size(temp)) = temp
1
Error: Unclassifiable statement at (1)
In file params.F90:1202

vars(size(vars)) = mnem
1
Error: Unclassifiable statement at (1)
In file params.F90:1178

subroutine add_outmnem(mnem, vars)
1
Error: Symbol 'vars' at (1) has no IMPLICIT type
In file params.F90:1249

call add_outmnem(line, globalvars)
1
Error: Type/rank mismatch in argument 'vars' at (1)
In file params.F90:1193

allocate(temp(size(vars)))
1
Error: 'array' argument of 'size' intrinsic at (1) must be an array
In file params.F90:1025

call MPI_Bcast(par,sizeof(par),MPI_BYTE,xmpi_master,xmpi_comm,ierror)
1
Error: Function 'sizeof' at (1) has no IMPLICIT type
make[2]: *** [xbeach-params.o] Error 1
make[2]: Leaving directory `/home/ali/xbeach-v18'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ali/xbeach-v18'
make: *** [all] Error 2"

Thanks about the wave instat type, it helped me.

Regards,
Ali
> ...
>
> read more »
>
>  smime.p7s
> 2KViewDownload

fedor baart

unread,
Aug 2, 2010, 3:22:13 PM8/2/10
to xbe...@googlegroups.com
Hi Ali,

The gfortran 4.1 is a bit too old I'm afraid. It probably won't work.
Although I did rewrite some of it to make it more compatible (see
latest changes in the trunk) it probably won't solve your problems.
The sizeof function for example is an extension that is not available
for gfortran 4.1. Your best bet for this machine is to update your
compiler. For most systems updated compilers are available. You might
even have one installed under for example gfortran43 or something.
Otherwise you can get a newer gfortran compiler from the gcc website
http://gcc.gnu.org/ . Besides a new compiler you'll also need to build
or install an accompanying mpi, otherwise the mpi.mod (the mpi fortran
module) won't be compatible. I've tested xbeach with openmpi and
mpich2.

Kind regards,

Fedor

Al

unread,
Aug 3, 2010, 5:31:47 PM8/3/10
to XBeach
Hi Fedor,

I upgraded the GCC compiler to 4.5.1 version and also upgraded g95 to
version 0.92 either.
I tried to compile the model with the new revised params.f90 and
mnemonic.f90.

So the same error appears for both of the compilers, I mean having "./
configure --with-mpi --prefix=/home/ali mpifc=mpif90 fcflag=gfortran/
g95 "

the error is as below;
In file mnemonic.F90:13

character(len=20), dimension(maxrank):: dimensions ! the dimensions
of the va
1
Error: Component 'dimensions' of 'arraytype' at (1) must have constant
array bounds.
make[2]: *** [xbeach-mnemonic.o] Error 1
make[2]: Leaving directory `/home/ali/xbeach-v18'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ali/xbeach-v18'
make: *** [all] Error 2"

Regards,
Ali Mehran

On Aug 2, 3:22 pm, fedor baart <f.ba...@gmail.com> wrote:
> Hi Ali,
>
> The gfortran 4.1 is a bit too old I'm afraid. It probably won't work.
> Although I did rewrite some of it to make it more compatible (see
> latest changes in the trunk) it probably won't solve your problems.
> The sizeof function for example is an extension that is not available
> for gfortran 4.1.  Your best bet for this machine is to update your
> compiler. For most systems updated compilers are available. You might
> even have one installed under for example gfortran43 or something.
> Otherwise you can get a newer gfortran compiler from the gcc websitehttp://gcc.gnu.org/. Besides a new compiler you'll also need to build
> ...
>
> read more »

fedor baart

unread,
Aug 3, 2010, 6:09:30 PM8/3/10
to xbe...@googlegroups.com
Hi Ali,

Did you also update your mpi? It is probably using your old compiler.
You can get openmpi here:
http://www.open-mpi.org/software/ompi/v1.4/

Make sure you build openmpi with your new compiler, something like:
FC=gfortran-4.5 F77=gfortran-4.5 ./configure
make
make install

What OS are you using, btw?

Kind regards,

Fedor

Al

unread,
Aug 12, 2010, 9:37:18 PM8/12/10
to XBeach
Dear Fedor,

The OS version is,

"Linux linserv 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010
x86_64 x86_64 x86_64 GNU/Linux"
I updated mpi with 3 new compilers, mvapich2, openmpi and mpich but
unfortunately all failed again.

As a try I started running a test case with 3 different settings and
surprisingly, the results were different either.
I selected the ZWIN case being my problem and run model in 3 modes as;

1) V16. sequential mode
2) V18. sequential mode
3) V16. parallel mode.

the plots which show comparison between measurements and the results
for all 3 cases are available (let me know if you would like to take a
look at them)
and show different results for each case.
So I was just wondering how to validate/ calibrate my current model
for a problem like ZWIN.

Kind regards,
Ali Mehran
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages