diff --git a/INSTALLATION.txt b/INSTALLATION.txt index 96d1e93..3b06f82 100644 --- a/INSTALLATION.txt +++ b/INSTALLATION.txt @@ -1,56 +1,60 @@ Cloning the code : 1. ssh-keygen to generate a public key (press enter to the questions) 2. copy .ssh/id_rsa.pub in the ssh public key list of c4science with your account 3. git clone ssh://git@c4science.ch/source/HeLaZ.git Installing librairies : requirements : intel mpi compiler fftw3-mpi : 1. download .tar.gz on download page http://www.fftw.org/download.html 2. move it to the lib folder and unzip it with tar -zxvf fftw-3.x.x.tar.gz 3. cd into the folder created ffw-3.x.x/ 5. use pwd to find the path of the current folder and use it as the prefix in "CURRENT PATH" so all the lib, headers and bin will be installed in this folder (prevents problem with root access) 4. ./configure --enable-mpi --prefix="CURRENT PATH" 5. make 6. make install (if problems, do make distclean before retrying) 7. mv lib64 lib in the fftw3 folder so the HeLaZ makefile finds it FM Multiple-Precision Software Package: 0. ??? (copy paste...) hdf5: 1. download latest release .tar.gz here https://www.hdfgroup.org/downloads/hdf5/source-code/ 2. mv it to the lib/ and tar -zxvf *.tar.gz 3. cd the hdf5 folder then we follow instructions from futils.pdf export F9X=mpif90 export CC=mpicc VERSION=1.12.0 PREFIX=$HOME/lib/hdf5-$VERSION ./configure --prefix=$PREFIX \ --enable-fortran \ --enable-parallel \ --disable-shared \ 2>&1 | tee configure.log zlib: 1. download https://www.zlib.net/ by clicking "Pick a mirror" (sourceforge.net) 2. inside zlib folder : ./configure then make futils: 1. Go to futils c4science page > https://c4science.ch/diffusion/7804/ 2. clone it in lib/ 3. go to futils/src/ and modify the Makefile by replacing $(OPT) by -O3 in F90FLAGS and LIBS, moreover change F90 = mpif90 to mpiifort 4. make lib 5. make install Compilation of HeLaZ 1. ensure that HeLaZ/local/dirs.inc contains the right paths to the librairies (Be careful of fftw name) 2. make install 3. (TODO: test script for installation check) 4. next times, for compilation, make is sufficient + +Remark for PPB110 +- The module list should be at least + 1) intel_comp/17.0 2) impi/17.0 3) hdf5/1.8.12_intel13.1 diff --git a/wk/ppb110_run.m b/wk/ppb110_run.m index 02fd897..170e11e 100644 --- a/wk/ppb110_run.m +++ b/wk/ppb110_run.m @@ -1,103 +1,101 @@ %clear all; addpath(genpath('../matlab')) % ... add %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Set Up parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% CLUSTER PARAMETERS CLUSTER.TIME = '01:00:00'; % allocation time hh:mm:ss CLUSTER.NODES = '8'; % MPI process CLUSTER.MEM = '2000'; % Memory CLUSTER.JNAME = 'test_HeLaZ'; % Job name USERNAME = 'ahoffman'; % username at ppb110 for folder naming %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PHYSICAL PARAMETERS NU = 1.0; % Collision frequency ETAB = 0.5; % Magnetic gradient NU_HYP = 0.1; % Hyperdiffusivity coefficient %% GRID PARAMETERS N = 150; % Frequency gridpoints (Nkr = N/2) L = 70; % Size of the squared frequency domain P = 2; % Electron and Ion highest Hermite polynomial degree J = 1; % Electron and Ion highest Laguerre polynomial degree MU_P = 0; % Hermite hyperdiffusivity -mu_p*(d/dvpar)^4 f MU_J = 0; % Laguerre hyperdiffusivity -mu_j*(d/dvperp)^4 f %% TIME PARAMETERS TMAX = 150; % Maximal time unit DT = 2e-2; % Time step SPS0D = 1; % Sampling per time unit for profiler SPS2D = 1/2; % Sampling per time unit for 2D arrays SPS5D = 1/10; % Sampling per time unit for 5D arrays SPSCP = 1/10; % Sampling per time unit for checkpoints RESTART = 0; % To restart from last checkpoint JOB2LOAD= 0; %% OPTIONS SIMID = 'test'; % Name of the simulation SIMID = sprintf(SIMID,NU); CO = -3; % Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty, -3 : GK Dougherty) CLOS = 0; % Closure model (0: =0 truncation, 1: semi coll, 2: Copy closure J+1 = J, P+2 = P) KERN = 0; % Kernel model (0 : GK) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% fixed parameters (for current study) KR0KH = 0; A0KH = 0; % Background phi mode to drive Ray-Tay inst. (not implemented) KREQ0 = 0; % put kr = 0 KPAR = 0.0; % Parellel wave vector component LAMBDAD = 0.0; NON_LIN = 1 *(1-KREQ0); % activate non-linearity (is cancelled if KREQ0 = 1) PMAXE = P; % Highest electron Hermite polynomial degree JMAXE = J; % Highest '' Laguerre '' PMAXI = P; % Highest ion Hermite polynomial degree JMAXI = J; % Highest '' Laguerre '' kmax = N*pi/L;% Highest fourier mode HD_CO = 0.5; % Hyper diffusivity cutoff ratio MU = NU_HYP/(HD_CO*kmax)^4 % Hyperdiffusivity coefficient NOISE0 = 1.0e-5; ETAT = 0.0; % Temperature gradient ETAN = 1.0; % Density gradient TAU = 1.0; % e/i temperature ratio %% Run file management scripts setup % Write the input script "fort.90" with desired parameters %% Write the sh script to launch the job on slurm for PPB110 INPUT = 'setup_and_run.sh'; fid = fopen(INPUT,'wt'); SCRATCH_SIMDIR = ['/scratch/',USERNAME,'/HeLaZ']; % Path to the simulation directory in the scratch % Writing of the script fprintf(fid,[... '#!/bin/bash\n',... 'mkdir -p ',SCRATCH_SIMDIR,'/wk\n',... ... 'cd ',SCRATCH_SIMDIR,'/wk\n',... ... 'mkdir -p ', BASIC.RESDIR,'\n',... 'cd ',BASIC.RESDIR,'\n',... 'cp $HOME/HeLaZ/wk/fort.90 .\n',... 'cp $HOME/HeLaZ/wk/batch_script.sh .\n',... ... 'sbatch batch_script.sh\n',... 'echo $',SCRATCH_SIMDIR,'/results/',BASIC.SIMID,'/',BASIC.PARAMS,'/out.txt']); fclose(fid); system(['cp setup_and_run.sh ',BASIC.RESDIR,'/.']); %% Write the sbatch script for PPB110 INPUT = 'batch_script.sh'; fid = fopen(INPUT,'wt'); fprintf(fid,[... '#!/bin/bash\n',... '#SBATCH --job-name=',CLUSTER.JNAME,'\n',... '#SBATCH --time=', CLUSTER.TIME,'\n',... '#SBATCH -n ', CLUSTER.NODES,'\n',... '#SBATCH --mem-per-cpu=', CLUSTER.MEM,'\n',... '#SBATCH --error=err.txt\n',... '#SBATCH --output=out.txt\n',... -'module load intel_comp\n',... -'module load impi\n',... -'module load hdf5\n',... +'module load intel_comp/17.0 impi/17.0 hdf5/1.8.12_intel13.1\n',... 'srun ./../../../bin/helaz']); fclose(fid); system(['cp batch_script.sh ',BASIC.RESDIR,'/.']); disp('done');