<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>RE: about long int number</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2> Hi,<BR>
I would recommend using MPI datatypes for your problem (eg: Creating a vector, see MPI_Type_vector(), with say 2 ints, you can send MAX_INT*2 integers).<BR>
Let us know if you need further help.<BR>
<BR>
(PS: The sizes of the various built-in language datatypes, like int, depends on the data model adopted by the compiler. Using say the Visual studio compiler, cl.exe, you should get 4-byte ints, i.e., MAX_INT = 2^31 - 1.)<BR>
<BR>
Regards,<BR>
Jayesh<BR>
<BR>
-----Original Message-----<BR>
From: Wei Yao [<A HREF="mailto:weiyao1@googlemail.com">mailto:weiyao1@googlemail.com</A>]<BR>
Sent: Tuesday, February 10, 2009 2:31 AM<BR>
To: Jayesh Krishna<BR>
Subject: about long int number<BR>
<BR>
Dear Jayesh Krishna,<BR>
<BR>
In C and Fortran, the memory allocation for integer number are<BR>
different:<BR>
1, in C int a, a takes 2 bytes with the range of -32768~32767.<BR>
2, in FORTRAN, integer a, a takes 4 bytes with the range of -2147483648~2147483647.<BR>
<BR>
If I have an array with a length of 40000, I want to manipulate is use MPI_REDUCE, but the maximum count is 32767, how can I transfer a 40000-members array?<BR>
int MPI_Reduce(void* , void*, int count, MPI_Datatype, MPI_Op, int, MPI_Comm);<BR>
~~~~~~~maximum 32767<BR>
<BR>
_______________________<BR>
Cheers,<BR>
Wei<BR>
>From FireSERT<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>