From ced9844792bf4b82de217dcb6cb070dae1afd365 Mon Sep 17 00:00:00 2001 From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch> Date: Fri, 27 Nov 2020 17:18:38 +0100 Subject: [PATCH] portability update --- Makefile | 2 +- local/dirs.inc | 8 ++++++-- local/make.inc | 4 ++-- src/control.F90 | 10 ++++------ src/diagnose.F90 | 2 -- src/srcinfo.h | 4 ++-- src/srcinfo/srcinfo.h | 4 ++-- wk/fort.90 | 12 ++++++------ wk/test_parallel.m | 6 +++--- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 8e457893..916a24b8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include local/make.inc EXEC = $(BINDIR)/helaz -F90 = mpif90 +F90 = mpiifort # Add Multiple-Precision Library EXTLIBS += -L$(FMDIR)/lib diff --git a/local/dirs.inc b/local/dirs.inc index ab2256e8..2850da93 100644 --- a/local/dirs.inc +++ b/local/dirs.inc @@ -5,9 +5,13 @@ BINDIR = $(PREFIX)/bin OBJDIR = $(PREFIX)/obj LIBDIR = $(PREFIX)/lib MODDIR = $(PREFIX)/mod + FMDIR = $(PREFIX)/FM FFTW3DIR = /home/ahoffman/lib/fftw-3.3.8 -INTEL_LOCAL = /home/ahoffman/local/spcpc/intel -FUTILS = /home/ahoffman/lib/futils_1.4/src +FUTILS_DIR = /home/ahoffman/local/spcpc/intel + +#FMDIR = (HOME)/lib/FM +#FFTW3DIR = $(HOME)/lib/fftw-3.3.8 +#FUTILS_DIR = $(HOME)/lib/futils # Naming ideas : HeLaZ, MoNoLiT (Moment Non Linear Torroidal) diff --git a/local/make.inc b/local/make.inc index 0aec7e26..db25768a 100644 --- a/local/make.inc +++ b/local/make.inc @@ -54,10 +54,10 @@ endif # ################################################################ -IDIRS := -I$(INTEL_LOCAL)/include/$(OPTLEVEL) +IDIRS := -I$(FUTILS_DIR)/include/$(OPTLEVEL) LIBS := -lfutils -lhdf5_fortran -lhdf5 -lz -ldl -lpthread -LDIRS := -L$(INTEL_LOCAL)/lib/$(OPTLEVEL) -L$(HDF5)/lib +LDIRS := -L$(FUTILS_DIR)/lib/$(OPTLEVEL) -L$(HDF5)/lib # Add Multiple-Precision Library LIBS += -lfm diff --git a/src/control.F90 b/src/control.F90 index b2c710a2..704fa618 100644 --- a/src/control.F90 +++ b/src/control.F90 @@ -63,22 +63,20 @@ CALL cpu_time(t0_step) ! Measuring time step = step + 1 cstep = cstep + 1 - ! CALL mpi_barrier(MPI_COMM_WORLD, ierr) CALL stepon - CALL mpi_barrier(MPI_COMM_WORLD, ierr) + CALL mpi_barrier(MPI_COMM_WORLD, ierr) time = time + dt CALL tesend IF( nlend ) EXIT ! exit do loop -CALL cpu_time(t0_diag) ! Measuring time + CALL cpu_time(t0_diag) ! Measuring time CALL diagnose(step) -CALL cpu_time(t1_diag); tc_diag = tc_diag + (t1_diag - t0_diag) + CALL cpu_time(t1_diag); tc_diag = tc_diag + (t1_diag - t0_diag) - ! CALL mpi_barrier(MPI_COMM_WORLD, ierr) -CALL cpu_time(t1_step); tc_step = tc_step + (t1_step - t0_step) + CALL cpu_time(t1_step); tc_step = tc_step + (t1_step - t0_step) END DO IF (my_id .EQ. 1) WRITE(*,'(a/)') '...time integration done' !________________________________________________________________________________ diff --git a/src/diagnose.F90 b/src/diagnose.F90 index b0885f3d..9a7bf995 100644 --- a/src/diagnose.F90 +++ b/src/diagnose.F90 @@ -271,9 +271,7 @@ SUBROUTINE diagnose(kstep) IF (my_id .EQ. 0) CALL display_h_min_s(finish-start) ! Close all diagnostic files - CALL mpi_barrier(MPI_COMM_WORLD, ierr) CALL closef(fidres) - CALL mpi_barrier(MPI_COMM_WORLD, ierr) CALL closef(fidrst) CALL mpi_barrier(MPI_COMM_WORLD, ierr) END IF diff --git a/src/srcinfo.h b/src/srcinfo.h index 0cc4fa8d..be4f109c 100644 --- a/src/srcinfo.h +++ b/src/srcinfo.h @@ -3,8 +3,8 @@ character(len=40) BRANCH character(len=20) AUTHOR character(len=40) EXECDATE character(len=40) HOST -parameter (VERSION='fde3f88-dirty') +parameter (VERSION='8dcebe0-dirty') parameter (BRANCH='MPI') parameter (AUTHOR='ahoffman') -parameter (EXECDATE='Fri Nov 27 15:29:47 CET 2020') +parameter (EXECDATE='Fri Nov 27 17:13:58 CET 2020') parameter (HOST ='spcpc606') diff --git a/src/srcinfo/srcinfo.h b/src/srcinfo/srcinfo.h index 0cc4fa8d..be4f109c 100644 --- a/src/srcinfo/srcinfo.h +++ b/src/srcinfo/srcinfo.h @@ -3,8 +3,8 @@ character(len=40) BRANCH character(len=20) AUTHOR character(len=40) EXECDATE character(len=40) HOST -parameter (VERSION='fde3f88-dirty') +parameter (VERSION='8dcebe0-dirty') parameter (BRANCH='MPI') parameter (AUTHOR='ahoffman') -parameter (EXECDATE='Fri Nov 27 15:29:47 CET 2020') +parameter (EXECDATE='Fri Nov 27 17:13:58 CET 2020') parameter (HOST ='spcpc606') diff --git a/wk/fort.90 b/wk/fort.90 index 34f66b4e..b2f3f7a2 100644 --- a/wk/fort.90 +++ b/wk/fort.90 @@ -1,8 +1,8 @@ &BASIC nrun = 100000000 - dt = 0.01 - tmax = 100 - RESTART = .false. + dt = 0.005 + tmax = 200 + RESTART = .true. / &GRID pmaxe =2 @@ -17,10 +17,10 @@ CANCEL_ODD_P = .false. / &OUTPUT_PAR - nsave_0d = 100 + nsave_0d = 200 nsave_1d = 0 - nsave_2d = 100 - nsave_5d = 1000 + nsave_2d = 200 + nsave_5d = 2000 write_Na00 = .true. write_moments = .true. write_phi = .true. diff --git a/wk/test_parallel.m b/wk/test_parallel.m index 923583ae..12a28d4b 100644 --- a/wk/test_parallel.m +++ b/wk/test_parallel.m @@ -19,12 +19,12 @@ JMAXE = 1; % Highest '' Laguerre '' PMAXI = 2; % Highest ion Hermite polynomial degree JMAXI = 1; % Highest '' Laguerre '' %% TIME PARAMETERS -TMAX = 100; % Maximal time unit -DT = 1e-2; % Time step +TMAX = 200; % Maximal time unit +DT = 5e-3; % Time step SPS0D = 1; % Sampling per time unit for profiler SPS2D = 1; % Sampling per time unit for 2D arrays SPS5D = 0.1; % Sampling per time unit for 5D arrays -RESTART = 0; % To restart from last checkpoint +RESTART = 1; % To restart from last checkpoint JOB2LOAD= 0; %% OPTIONS SIMID = 'test_parallel'; % Name of the simulation -- GitLab