User Tools

Site Tools


admin:compilaciones:gadget

This is an old revision of the document!


Compilar Gadget4

git clone http://gitlab.mpcdf.mpg.de/vrs/gadget4
module purge && ml intel/2023.2.1 openmpi4/4.1.6  fftw/3.3.10 hdf5/1.10.8 cmake/3.24.2 gsl/2.8
cd gadget4
cp Template-Config.sh Config.sh 
cp Template-Makefile.systype Makefile.systype

En Makefile.systype descomentar SYSTYPE=“Generic-gcc”. Luego editar buildsystem/Makefile.gen.libs:

GSL_INCL   = -I/opt/ohpc/pub/apps/gsl/2.8/include
GSL_LIBS   = -L/opt/ohpc/pub/apps/gsl/2.8/lib
FFTW_INCL  = -I/opt/ohpc/pub/apps/fftw/3.3.10/include
FFTW_LIBS  = -L/opt/ohpc/pub/apps/fftw/3.3.10/lib
HDF5_INCL  = -I/opt/ohpc/pub/libs/intel/hdf5/1.10.8/include
HDF5_LIBS  = -L/opt/ohpc/pub/libs/intel/hdf5/1.10.8/lib
HWLOC_INCL = -I/opt/ohpc/pub/libs/hwloc/include
HWLOC_LIBS = -L/opt/ohpc/pub/libs/hwloc/lib

Editar buildsystem/Makefile.comp.gcc:

CPP      =  mpicxx -std=c++11

# Optimización con Intel (las flags originales son compatibles)
OPTIMIZE =  -ggdb -O3 -march=native -Wall -Wno-format-security

# Vectorización explícita (con AVX)
ifeq (EXPLICIT_VECTORIZATION,$(findstring EXPLICIT_VECTORIZATION,$(CONFIGVARS)))
CFLAGS_VECTOR += -mavx -fabi-version=0
CPV      =  $(CPP)
else
CFLAGS_VECTOR =
CPV      =  $(CPP)
endif

Compilar:

make -j 16

Si falla porque necesita el comando python y no esta instalado python-is-python3:

cd $HOME/bin
ln -s /usr/bin/python3 python

Luego volver a correr el make.

admin/compilaciones/gadget.1752696061.txt.gz · Last modified: by flezcano