Commit 0990829c authored by Roy Fabrice's avatar Roy Fabrice
Browse files

FHI integration in pfof_cone + some other stuffs

parent 9c14dee3
......@@ -17,6 +17,7 @@ SRC = modconstant.f90 \
modreadparameters.f90 \
modmpicom.f90 \
modsort.f90 \
modwritemeta.f90 \
modwritehalo.f90 \
modio.f90 \
modhalo.f90 \
......@@ -40,7 +41,7 @@ $(OBJDIR)%.o:%.f90
@echo "--------------------------------"
@echo building $*.o with parameters \
FC=$(FC), FCFLAGS=$(FCFLAGS)
$(FC) -c $(FCFLAGS) $<
$(FC) -c $(FCFLAGS) $< -o $@
%.mod:%.f90
@echo "--------------------------------"
......
......@@ -43,7 +43,7 @@
Module modfofpara
implicit none
Contains
......@@ -68,7 +68,6 @@ Contains
Use modtiming
Use modfofmpi
Implicit none
! Local variables
Integer(kind=4), dimension(:),allocatable :: adfirst,npcase
......@@ -85,7 +84,7 @@ Contains
Integer(kind=4) :: signx(3), signy(3), signz(3)
Integer(kind=4) :: nsign
Integer(kind=PRI) :: namas ! tmp structure ID
Integer(kind=IDKIND) :: namas ! tmp structure ID
Real(kind=4) :: r, d, size, size_fof, xx, yy, zz
Real(kind=4) :: dx, dy, dz
......
!==============================================================================
! Project: pFoF
! File: pfof_cone/src/modio.f90
! Copyright Fabrice Roy and Vincent Bouillot (2011)
! Fabrice.Roy@obspm.fr
!
! This software is a computer program whose purpose is to detect dark matter
! haloes in cosmological simulation with a parallel Friend of Friend algorithm.
!
! This software is governed by the CeCILL license under French law and
! abiding by the rules of distribution of free software. You can use,
! modify and/ or redistribute the software under the terms of the CeCILL
! license as circulated by CEA, CNRS and INRIA at the following URL
! "http://www.cecill.info".
!------------------------------------------------------------------------------------------------------------------------------------
! Copyright 2011 Fabrice Roy and Vincent Bouillot
! Contact: fabrice.roy@obspm.fr
!
! As a counterpart to the access to the source code and rights to copy,
! modify and redistribute granted by the license, users are provided only
! with a limited warranty and the software's author, the holder of the
! economic rights, and the successive licensors have only limited
! liability.
! This file is part of pFoF.
!
! In this respect, the user's attention is drawn to the risks associated
! with loading, using, modifying and/or developing or reproducing the
! software by the user in light of its specific status of free software,
! that may mean that it is complicated to manipulate, and that also
! therefore means that it is reserved for developers and experienced
! professionals having in-depth computer knowledge. Users are therefore
! encouraged to load and test the software's suitability as regards their
! requirements in conditions enabling the security of their systems and/or
! data to be ensured and, more generally, to use and operate it in the
! same conditions as regards security.
! pFoF is free software: you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation, either version 3 of the License, or
! (at your option) any later version.
!
! The fact that you are presently reading this means that you have had
! knowledge of the CeCILL license and that you accept its terms.
!==============================================================================
! pFoF 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
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with pFoF. If not, see <http://www.gnu.org/licenses/>.
!> @file
!!This file contains the subroutines and common variables used for I/O in pFoF_cone.
!! Subroutines and common variables used for I/O in pFoF_cone.
!! @brief
!!
!! @author Fabrice Roy
!! @author Vincent Bouillot
!> This module contains the subroutines and common variables used for I/O in pFoF_cone.
!>
!> Authors: F. Roy, V. Bouillot
!> Subroutines and common variables used for I/O in pFoF_cone.
Module modio
module modio
Use modmpicommons
Use modvarcommons
Use modconstant
use modmpicommons
use modvarcommons
use modconstant
use hdf5, only : HID_T
Use modvariables
Use mpi
use modvariables
use mpi
implicit none
Integer(kind=4) :: ioerr
......@@ -112,7 +99,7 @@ Contains
Implicit none
Character(len=400) :: filename
Character(len=FILENAME_LEN) :: filename
Integer :: ioerr
Character(len=84) :: filelog
Integer(kind=4) :: mpierr
......@@ -134,9 +121,9 @@ Contains
! Open log file
filelog = 'pfof_log_'//trim(param%simulation_name)//'.log'
Open(Unit=Ulog,file=filelog)
Write(Ulog,*) 'Parallel FoF'
Write(Ulog,*) procNB,' processes:'
Open(Unit=LOG_UNIT,file=filelog)
Write(LOG_UNIT,*) 'Parallel FoF'
Write(LOG_UNIT,*) procNB,' processes:'
End If
......@@ -156,11 +143,12 @@ Contains
!> in each shell file
Subroutine h5readshellinfo()
Use modiocommons
use fortran_hdf5_constants_m, only : H5_STR_LEN
use fortran_hdf5_manage_files_m
Implicit None
Character(len=H5STRLEN) :: dataname
Character(len=H5STRLEN) :: groupname
Character(len=H5_STR_LEN) :: dataname
Character(len=H5_STR_LEN) :: groupname
Character(len=5) :: charish
Character(len=400) :: shellname
Integer(kind=4) :: ic
......@@ -171,8 +159,8 @@ Contains
Integer(kind=4) :: my_shell_fid, my_shell_lid, my_shell_nb
Integer(kind=4), dimension(:,:), allocatable :: indexfile
Integer(kind=4) :: icube
Integer(kind=hid_t) :: file_id
Integer(kind=hid_t) :: gr_meta_id
Integer(kind=HID_T) :: file_id
Integer(kind=HID_T) :: gr_meta_id
Integer(kind=4) :: rootlast, roottmp
Logical(kind=4) :: islast
Integer(kind=4) :: mpierr
......@@ -317,13 +305,12 @@ Contains
!> This subroutine reads the map file
Subroutine h5readmap()
use fortran_hdf5_constants_m, only : H5_FILENAME_LEN, H5_STR_LEN
Use modmpicom
Implicit None
Character(len=400) :: filename
Character(len=H5STRLEN) :: dataname
Character(len=H5STRLEN) :: groupname
Character(len=H5_FILENAME_LEN) :: filename
Character(len=H5_STR_LEN) :: dataname
Character(len=H5_STR_LEN) :: groupname
Character(len=8) :: charpid
Integer(kind=hid_t) :: file_id
Integer(kind=hid_t) :: gr_id
......@@ -386,13 +373,13 @@ Contains
!> This subroutine reads the particles from the shell files
Subroutine h5readparticles()
Implicit None
use fortran_hdf5_constants_m, only : H5_FILENAME_LEN, H5_STR_LEN
Character(len=8) :: charic
Character(len=5) :: charish
Character(len=400) :: shellname
Character(len=H5STRLEN) :: dataname
Character(len=H5STRLEN) :: groupname
Character(len=H5_FILENAME_LEN) :: shellname
Character(len=H5_STR_LEN) :: dataname
Character(len=H5_STR_LEN) :: groupname
Integer(kind=hid_t) :: file_id
Integer(kind=hid_t) :: gr_id
......@@ -401,7 +388,7 @@ Contains
Integer(kind=4) :: ic, ish
Integer(kind=4) :: deb, fin, n
Integer(kind=4) :: ip
Integer(kind=PRI) :: fid
Integer(kind=IDKIND) :: fid
Integer(kind=4), dimension(:), allocatable :: npartloc
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment