0.9.3 installation problems on GNU/Linux with lam-mpi

Rob Ross rross at mcs.anl.gov
Tue Feb 3 09:14:36 CST 2004


Hi,

This is a bug in our code; we should not be using a switch statement 
there.  I've attached a patch that I *think* will fix the problem (I'm 
having some issues building right this second myself).

Thanks for the report.

Rob

On Tue, 3 Feb 2004, Raimondo Giammanco wrote:

> Hello,
> 
> I tried to install 0.9.3 on a GNU/Linux PC with lam-mpi-7.0.2,
> and I am having the following problem:
> 
> 1) autoconf
> 
> 2) ./configure --prefix=SOME_PATH --with-mpi=/usr
> 
> 3) make all
> 
> It returns in src/lib
> 
> ################
> mpinetcdf.c: In function `length_of_mpitype':
> mpinetcdf.c:382: switch quantity not an integer
> mpinetcdf.c:383: pointers are not permitted as case values
> mpinetcdf.c:383: case label does not reduce to an integer constant
> mpinetcdf.c:384: pointers are not permitted as case values
> mpinetcdf.c:384: case label does not reduce to an integer constant
> mpinetcdf.c:386: pointers are not permitted as case values
> mpinetcdf.c:386: case label does not reduce to an integer constant
> mpinetcdf.c:388: pointers are not permitted as case values
> mpinetcdf.c:388: case label does not reduce to an integer constant
> mpinetcdf.c:390: pointers are not permitted as case values
> mpinetcdf.c:390: case label does not reduce to an integer constant
> mpinetcdf.c:392: pointers are not permitted as case values
> mpinetcdf.c:392: case label does not reduce to an integer constant
> mpinetcdf.c:394: pointers are not permitted as case values
> mpinetcdf.c:394: case label does not reduce to an integer constant
> ###############
> etc. etc. where there is the swith(datatype) command.
> 
> I looked a little in /usr/include mpi.h of lam, and
> I tried to substitute the switches with a series of ifs.
> 
> I was able to compile, but I received a series of errors
> in make testing.
> 
> Before submitting the details, I was wondering if this
> is an implementation problem of lam, or there is some
> other reason behind this strange behavior.
> 
> Is there anybody using lam-mpi and that can give me some pointers?
> 
> Best Regards
> -- 
> Raimondo Giammanco <rongten at member.fsf.org>
> 
> 

-------------- next part --------------
Index: src/lib/mpinetcdf.c
===================================================================
RCS file: /home/gropp/cvsMaster_z/parallel-netcdf/src/lib/mpinetcdf.c,v
retrieving revision 1.29
diff -r1.29 mpinetcdf.c
383,397c383,390
<   switch(datatype) {
<     case MPI_BYTE:
<     case MPI_CHAR:
< 	return ((int)sizeof(char));
<     case MPI_SHORT:
< 	return (int)(sizeof(short));
<     case MPI_INT:
< 	return((int)sizeof(int)); 
<     case MPI_LONG:
< 	return((int)sizeof(long)); 
<     case MPI_FLOAT:
< 	return((int)sizeof(float));
<     case MPI_DOUBLE:
< 	return((int)sizeof(double));
<     default:
---
>   if (datatype == MPI_BYTE || datatype == MPI_CHAR)
>       return (int) sizeof(char);
>   else if (datatype == MPI_SHORT)  return (int) sizeof(short);
>   else if (datatype == MPI_INT)    return (int) sizeof(int);
>   else if (datatype == MPI_LONG)   return (int) sizeof(long);
>   else if (datatype == MPI_FLOAT)  return (int) sizeof(float);
>   else if (datatype == MPI_DOUBLE) return (int) sizeof(double);
>   else 
399d391
<   }


More information about the parallel-netcdf mailing list