Commit 1c06ccd9 authored by Roy Fabrice's avatar Roy Fabrice
Browse files

syntax modifications and fhi integration

parent 84f5ad89
......@@ -43,8 +43,12 @@ contains
use iso_fortran_env, only : ERROR_UNIT, OUTPUT_UNIT
use modconstant, only : IDKIND, type_common_metadata, type_parameter_pfof, type_info_ramses, type_info_cone_part
use modhdf5, only : H5_FILENAME_LEN, HID_T, H5_STR_LEN, Hdf5_open_file, Hdf5_open_group, Hdf5_close_group,&
HDF5_read_attr, Hdf5_read_data, Hdf5_close_file
use fortran_hdf5_constants_m, only : H5_FILENAME_LEN, H5_STR_LEN
use fortran_hdf5_manage_files_m, only : hdf5_close_file, hdf5_open_file
use fortran_hdf5_manage_groups_m, only : hdf5_close_group, hdf5_open_group
use fortran_hdf5_read_attribute_m
use fortran_hdf5_read_data_m
use hdf5, only : HID_T
use modmpicommons, only : type_info_process
use modreadmeta, only : Read_meta_common, &
Read_meta_halofinder_parameter, &
......
......@@ -29,8 +29,13 @@ module read_star_cube_mod
use iso_fortran_env, only : ERROR_UNIT, OUTPUT_UNIT
use modconstant, only : IDKIND, type_common_metadata, type_parameter_pfof_snap, type_info_ramses
use modhdf5, only : H5_STR_LEN, H5_FILENAME_LEN, Hdf5_close_group, Hdf5_close_file, Hdf5_open_file, Hdf5_open_group, &
Hdf5_open_mpi_file, Hdf5_read_attr, Hdf5_read_data, Hdf5_read_mpi_data, HID_T
use fortran_hdf5_constants_m, only : H5_FILENAME_LEN, H5_STR_LEN
use fortran_hdf5_manage_file_m, only : hdf5_close_file, hdf5_open_file, hdf5_open_mpi_file
use fortran_hdf5_manage_group_m, only : hdf5_close_group, hdf5_open_group
use fortran_hdf5_read_attribute_m
use fortran_hdf5_read_data_m
use fortran_hdf5_read_mpi_data_m
use hdf5, only : HID_T
use modmpicommons, only : Emergencystop
use mpi
use modreadmeta, only : Read_meta_common, Read_meta_info_ramses, Read_meta_halofinder_parameter
......
include ../../Make.inc
EXE = pfof_cone.exe
COMMONDIR = ../../common/src/
OBJDIR=../../obj/
MODDIR=../../mod/
VPATH= $(COMMONDIR):.
SRC = modhdf5.f90 \
modconstant.f90 \
SRC = modconstant.f90 \
modvarcommons.f90 \
type_info_ramses_mod.f90 \
modmpicommons.f90 \
modreadinfo.f90 \
modtiming.f90 \
......@@ -14,7 +17,6 @@ SRC = modhdf5.f90 \
modreadparameters.f90 \
modmpicom.f90 \
modsort.f90 \
modiocommons.f90 \
modwritehalo.f90 \
modio.f90 \
modhalo.f90 \
......@@ -22,42 +24,70 @@ SRC = modhdf5.f90 \
modfofpara.f90 \
pfof_cone.f90
OBJ = $(SRC:%.f90=%.o)
OBJS_NOPREFIX=$(SRC:%.f90=%.o)
OBJS=$(addprefix $(OBJDIR), $(OBJS_NOPREFIX))
EXE = pfof_cone
# variable containing if git is used or not
ifeq ($(wildcard ../../.git/HEAD ../../.git/index),)
OBJ_GIT =
USE_GIT =
else
USE_GIT = $(shell which git)
OBJ_GIT = ../../.git/HEAD ../../.git/index
endif
%.o:%.f90
$(OBJDIR)%.o:%.f90
@echo "--------------------------------"
@echo building $*.o with parameters \
FC=$(MPIFC), FCFLAGS=$(FCFLAGS)
$(MPIFC) -c $(FCFLAGS) $<
FC=$(FC), FCFLAGS=$(FCFLAGS)
$(FC) -c $(FCFLAGS) $<
%.mod:%.f90
@echo "--------------------------------"
@echo building $*.mod with parameters \
FC=$(MPIFC), FCFLAGS=$(FCFLAGS)
$(MPIFC) -c $(FCFLAGS) $<
FC=$(FC), FCFLAGS=$(FCFLAGS)
$(FC) -c $(FCFLAGS) $<
all: directories release
release: $(EXE)
debug: FCFLAGS = $(DEBUGFLAGS)
debug: $(EXE)
all : $(EXE)
$(EXE) : gitversion $(OBJS)
@echo "--------------------------------"
@echo $(ROOT_PFOF)
@echo building $(EXE) with parameters \
FC=$(FC), LDFLAGS=$(LDFLAGS)
$(FC) -g -o $(EXE) $(OBJS) $(LDFLAGS)
$(EXE) : $(OBJ)
cleanall :
@echo "--------------------------------"
@echo building $(EXE)
$(MPIFC) -o $(EXE) $(OBJ) $(LDFLAGS)
@echo cleaning compiled objects, modules and executable
rm -f $(OBJDIR)*.o $(MODDIR)*.mod *~ $(EXE) $(COMMONDIR)/gitversion.h
clean :
clean:
@echo "--------------------------------"
@echo cleaning compiled objects, modules and executable
rm -f *.o *.mod *~ $(EXE)
@echo cleaning executable
rm -f $(EXE)
# create file for git version
gitversion: $(OBJ_GIT)
ifneq ($(USE_GIT), )
@cd $(COMMONDIR) ;\
echo "#define GITVERSION \"$(shell git rev-parse HEAD)\"" > gitversion.h
else
@cd $(COMMONDIR) ;\
echo "#define GITVERSION \"no_version_found\"" > gitversion.h
endif
directories: ${MODDIR} ${OBJDIR}
${OBJDIR}:
${MKDIR_P} $@
svnrev:
@SVNVERSION=$(shell svnversion -n . 2>/dev/null) ; \
if [ $$? -eq 0 ] ; then cd $(COMMONDIR) ; \
echo "#define SVNREV \"$(shell svnversion -n .)\"" > svnrev.h ; cd - ;\
else cd $(COMMONDIR) ; echo "#define SVNREV \"no_version_found\"" > svnrev.h ; cd - ;\
fi
${MODDIR}:
${MKDIR_P} $@
.PHONY: svnrev clean all
.PHONY: gitversion clean cleanall directories all
......@@ -48,7 +48,7 @@ Module modio
Use modmpicommons
Use modvarcommons
Use modconstant
Use modhdf5
use hdf5, only : HID_T
Use modvariables
Use mpi
......
......@@ -42,11 +42,13 @@
!> Authors: F. Roy, V. Bouillot
Module modvariables
module modvariables
Use modvarcommons
Use modconstant
Implicit None
use type_info_ramses_mod, only : type_info_ramses, type_info_cone_part
implicit None
Integer(kind=4) :: shell_nb
Integer(kind=4), dimension(:,:), allocatable :: indexcube
......
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