<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<BR> freefem++ is a free software for fluid dynamics which is built under C++. It has freefem++-mpi.exe (64 bit) as a utality to run its code for parallel processing by using MPI. I tried its examples and gets error as mentioned earlier. Howerver, it works well with MS-MPI (Microsoft MPI) while it hange with MPICH2 (64 bit).<BR><br> <BR><div><div id="SkyDrivePlaceholder"></div>> Date: Tue, 25 Sep 2012 10:51:56 -0500<br>> From: jayesh@mcs.anl.gov<br>> To: marco.degregorio@iet.unipi.it<br>> CC: mpich-discuss@mcs.anl.gov<br>> Subject: Re: [mpich-discuss] MPI 64 bit for 64 bit code on windows7 64 bit<br>> <br>> Hi,<br>> If you can give us a simple test case that shows the problem it would be useful (The smallest fortran program, test.f, that compiles and shows the problem).<br>> <br>> (PS: A couple of lines of fortran code that shows the problem is what we need.)<br>> Regards,<br>> Jayesh<br>> <br>> ----- Original Message -----<br>> From: "Marco De Gregorio" <marco.degregorio@iet.unipi.it><br>> To: "Jayesh Krishna" <jayesh@mcs.anl.gov><br>> Cc: mpich-discuss@mcs.anl.gov<br>> Sent: Tuesday, September 25, 2012 7:01:35 AM<br>> Subject: Re: [mpich-discuss] MPI 64 bit for 64 bit code on windows7 64 bit<br>> <br>> <br>> Hi, <br>> <br>> I am sorry, but I don't understand. Do you want to see my code? <br>> I can copy a subroutine with error if it is useful. <br>> However, the program test fpi work well. <br>> <br>> <br>> <br>> <br>> This is the subroutine: <br>> <br>> <br>> <br>> <br>> !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <br>> SUBROUTINE Build_MPI_near_field_type(var_name,MY_MPI_near_field_type) <br>> !::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: <br>> TYPE(near_field_var), INTENT(IN) :: var_name <br>> INTEGER, INTENT(IN) :: MY_MPI_near_field_type <br>> INTEGER, PARAMETER :: SIZE = 4 <br>> INTEGER(KIND = MPI_ADDRESS_KIND) :: address(SIZE) <br>> INTEGER(KIND = MPI_ADDRESS_KIND) :: displs(SIZE) <br>> INTEGER :: type_list(SIZE), block_lenghts(SIZE), MY_MPI_error <br>> !generate type_list <br>> type_list(1) = MPI_REAL <br>> type_list(2) = MPI_REAL <br>> type_list(3) = MPI_REAL <br>> type_list(4) = MPI_INTEGER <br>> <br>> <br>> <br>> <br>> ! in the 64bit version, after last MPI_GET_ADDRESS it change <br>> !the value of block_lenghts(1) in -1. I moved it under <br>> !Fill block_lengths <br>> !block_lenghts(:) = 1 <br>> <br>> <br>> !get addresses <br>> CALL MPI_GET_ADDRESS(var_name%distance,address(1),MY_MPI_error) <br>> CALL MPI_GET_ADDRESS(var_name%min_distance,address(2),MY_MPI_error) <br>> CALL MPI_GET_ADDRESS(var_name%max_distance,address(3),MY_MPI_error) <br>> CALL MPI_GET_ADDRESS(var_name%flag,address(4),MY_MPI_error) <br>> !Compute displacement <br>> displs(1) = 0 <br>> displs(2) = address(2) - address(1) <br>> displs(3) = address(3) - address(1) <br>> displs(4) = address(4) - address(1) <br>> WRITE (*,*) MPI_ADDRESS_KIND <br>> <br>> !Fill block_lengths <br>> block_lenghts(:) = 1 <br>> <br>> <br>> <br>> <br>> CALL MPI_TYPE_CREATE_STRUCT(SIZE,block_lenghts,displs,type_list,MY_MPI_near_field_type,MY_MPI_error) <br>> CALL MPI_TYPE_COMMIT(MY_MPI_near_field_type,MY_MPI_error) <br>> <br>> END SUBROUTINE <br>> <br>> This is the call in other sub: <br>> <br>> <br>> !Near field (for sparfied matrix) <br>> CALL Build_MPI_near_field_type(var_name%near_field,MY_MPI_near_field_type) <br>> <br>> <br>> I defined <br>> <br>> <br>> TYPE(project_var), INTENT(IN) :: var_name <br>> INTEGER, INTENT(IN) :: MY_MPI_near_field_type <br>> <br>> <br>> Where in a module I defined: <br>> <br>> TYPE :: project_var <br>> TYPE(near_field_var) :: near_field <br>> TYPE(ground_var) :: ground <br>> ... <br>> END TYPE project_var <br>> <br>> <br>> and <br>> <br>> TYPE :: near_field_var <br>> REAL(KIND=SGL) :: distance, min_distance, max_distance <br>> INTEGER :: flag <br>> END TYPE near_field_var <br>> <br>> <br>> In another module: <br>> <br>> <br>> <br>> INTEGER, PARAMETER :: SGL = SELECTED_REAL_KIND(p=6,r=37) <br>> <br>> <br>> <br>> <br>> p.s. of course. The 64 bit code doesn't work with 32 bit MPICH2, the builder returned error in link procedure. <br>> <br>> Ing. Marco De Gregorio <br>> Microwave & Radiation Laboratory <br>> Dip. Ingegneria dell'Informazione - Università di Pisa <br>> via G. Caruso 16, 56122 Pisa - Italy <br>> Lab : (+39)050.2217681 <br>> Cell : (+39)3281982575 <br>> Mail : marco.degregorio@iet.unipi.it <br>> <br>> <br>> <br>> <br>> 2012/9/24 Jayesh Krishna < jayesh@mcs.anl.gov > <br>> <br>> <br>> Hi, <br>> Can you send us a test program (source code) that fails? <br>> <br>> (PS: I am assuming that you recompiled your code after installing the 64-bit libs.) <br>> Regards, <br>> Jayesh <br>> <br>> <br>> ----- Original Message ----- <br>> From: "Marco De Gregorio" < marco.degregorio@iet.unipi.it > <br>> To: mpich-discuss@mcs.anl.gov <br>> Sent: Monday, September 24, 2012 11:21:46 AM <br>> Subject: [mpich-discuss] MPI 64 bit for 64 bit code on windows7 64 bit <br>> <br>> <br>> Hi, <br>> <br>> I work with a Fortran code. I use Visual Studio 2008 and Intel Fortran 11. <br>> I have always used 32 bit MPI successfully. <br>> Now I need to switch my code to 64 bit. First of all I uninstalled 32 bit MPICH2 and I installed mpich2-1.4.1p1-win-x86-64. <br>> I have several problems. <br>> When I launch my program, the first value of some integer array ( block_lengths ) changes sign after some MPI_GET_ADDRESS and I have an error message. Below you can find a piece of code. <br>> <br>> <br>> <br>> block_lengths(:) = 1 <br>> <br>> !get addresses <br>> CALL MPI_GET_ADDRESS(var_name%distance,address(1),MY_MPI_error) <br>> CALL MPI_GET_ADDRESS(var_name%min_distance,address(2),MY_MPI_error) <br>> CALL MPI_GET_ADDRESS(var_name%max_distance,address(3),MY_MPI_error) <br>> CALL MPI_GET_ADDRESS(var_name%flag,address(4),MY_MPI_error) <br>> <br>> So, I changed the position of these arrays in the code and I have bypass the error, but after the change, however the code doesn't work. The problem is with a mpi_send and mpi_receiver. <br>> <br>> address is defined as INTEGER(KIND = MPI_ADDRESS_KIND) :: address(SIZE) , but write(*,*) MPI_GET_ADDRESS returns 4. <br>> <br>> In the mpif.h I found: <br>> INTEGER MPI_ADDRESS_KIND, MPI_OFFSET_KIND <br>> PARAMETER (MPI_ADDRESS_KIND=8) <br>> PARAMETER (MPI_OFFSET_KIND=8) <br>> <br>> There is a mistake. <br>> <br>> Do you have any idea to help me?? <br>> <br>> With 32 bit MPICH2 and 32 bit code I don't have error. <br>> If I try mpiexec -n 1 code_64bit.exe , the 64 bit code works fine. <br>> <br>> Thank you, <br>> regards, <br>> <br>> <br>> -- <br>> <br>> <br>> Ing. Marco De Gregorio <br>> Microwave & Radiation Laboratory <br>> Dip. Ingegneria dell'Informazione - Università di Pisa <br>> via G. Caruso 16, 56122 Pisa - Italy <br>> Lab: (+39)050.2217681 <br>> Mail: marco.degregorio@iet.unipi.it <br>> <br>> <br>> _______________________________________________ <br>> mpich-discuss mailing list mpich-discuss@mcs.anl.gov <br>> To manage subscription options or unsubscribe: <br>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss <br>> <br>> _______________________________________________<br>> mpich-discuss mailing list mpich-discuss@mcs.anl.gov<br>> To manage subscription options or unsubscribe:<br>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss<br></div> </div></body>
</html>