Compilation and Installation
Installing the I/O API
- Use PuTTY to log in to the server as the root user.
- Install SMOKE in csh.
csh
- Set the environment variables.
setenv SMK_HOME /path/to/SMOKE setenv LD_LIBRARY_PATH /path/to/BISHENG/bisheng-1.3.1/lib:/path/to/HMPI/hmpi-1.0.2/ompi/lib setenv PATH /path/to/HMPI/hmpi-1.0.2/hmpi/bin:/path/to/BISHENG/bisheng-1.3.1/bin:$PATH setenv LD_LIBRARY_PATH /path/to/NETCDF/lib:$LD_LIBRARY_PATH
- Copy the installation packages to the installation path.
cp smoke_v47.gz $SMK_HOME cp smoke_v47.nctox.data.tar.gz $SMK_HOME cp smoke_install.csh $SMK_HOME cp ioapi-3.2.tar.gz $SMK_HOME cd $SMK_HOME source smoke_install_v47.csh setenv BIN Linux2_aarch64
- Decompress and rename the ioapi file.
tar -xvf ioapi-3.2-2020111.tar.gz mv ioapi-3.2-2020111 ioapi-3.2
- Copy the configuration file.
cd ioapi-3.2 cp ioapi/Makeinclude.Linux2_ia64gfort ioapi/Makeinclude.Linux2_aarch64
- Modify the Makeinclude.Linux2_aarch64 configuration file.
- Open the Makeinclude.Linux2_aarch64 configuration file.
vi ioapi/Makeinclude.Linux2_aarch64
- Press i to enter the edit mode and modify the compiler options (you can use an absolute path if necessary).
CC = mpicc CXX = mpicxx FC = mpif90
Comment out the line corresponding to the FSFLAGS keyword, for example, #FSFLAGS = -save.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the Makeinclude.Linux2_aarch64 configuration file.
- Copy the Makefile file.
cp ioapi/Makefile.nocpl ioapi/Makefile
- Copy the configuration file.
cp m3tools/Makefile.nocpl m3tools/Makefile
- Modify the Makefile configuration file.
- Open the Makefile configuration file.
vi m3tools/Makefile
- Press i to enter the edit mode and modify the file as follows:
LIBS = -L${OBJDIR} -lioapi -L/path/to/NETCDF/lib -lnetcdff –lnetcdf -L/path/to/HDF5/lib -lhdf5_hl -lhdf5 -lz $(OMPLIBS) $(ARCHLIB) $(ARCHLIBS) - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the Makefile configuration file.
- Copy the configuration file.
cp Makefile.template Makefile
- Edit the configuration file.
- Open the configuration file.
vi Makefile
- Press i to enter the edit mode.Modify the following content and remove the comments. (If the path is incorrect, check whether the path in BASEDIR is correct.)
BIN = Linux2_aarch64 BASEDIR = ${PWD} INSTALL = ${HOME} LIBINST = $(INSTALL)/$(BIN) BININST = $(INSTALL)/$(BIN) CPLMODE = nocpl IOAPIDEFS = "-DIOAPI_NCF4"Modify NCFLIBS.
NCFLIBS = -L/path/to/NETCDF/lib -lnetcdff -lnetcdf -L/path/to/HDF5/lib -lhdf5_hl -lhdf5 -lz
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the configuration file.
- Compile the I/O API.
make BIN=Linux2_aarch64
Installing SMOKE
- Use PuTTY to log in to the server as the root user.
- Go to the $SMK_HOME/subsys/smoke/assigns/ directory.
cd $SMK_HOME/subsys/smoke/assigns/
- Modify the ASSIGNS.nctox.cmaq.cb05_soa.us12-nc file.
- Modify the Makeinclude file.
- Open the Makeinclude file.
cd $SMK_HOME/subsys/smoke/src vi Makeinclude
- Press i to enter the edit mode and modify the following content. (If an error is reported for the link library, add the absolute path of the library in the format of -L/Absolute path.)
INSTDIR = ${OBJDIR}/${BIN} #EFLAG = -extend-source 132 -zero EFLAG = -ffixed-line-length-132 -fno-backslash IOLIB = -L$(IOBIN) -lioapi -L/path/to/NETCDF/lib -lnetcdf -lnetcdff IOBASE = ${SMK_HOME}/ ioapi-3.2 - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the Makeinclude file.
- Modify the biog/normbeis361.f file.
- Modify the emutil/gentpro.f file.
- Create the directory.
mkdir ${SMK_HOME}/subsys/smoke/${BIN} - Perform the compilation.
source $SMK_HOME/subsys/smoke/assigns/ASSIGNS.nctox.cmaq.cb05_soa.us12-nc make
Parent topic: SMOKE 4.7 Porting Guide (openEuler 21.03)
