Configure library externally: Difference between revisions

From Lumen wiki
Jump to navigationJump to search
Created page with "== In this page we explain how to configure HDF5 and NetCDFc and NetCDF-Fortran == Configuration of HDF5 1.14.6 with gfortran: export INSTALLDIR={your installation directory} ./configure --prefix=$INSTALDIR --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx --enable-parallel CC=mpicc CPP="mpicc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpif90 --enable-build-mode=production Configure NetCDFC-4.9.0 with gfortran ./configure --..."
 
No edit summary
Line 1: Line 1:
== In this page we explain how to configure HDF5 and NetCDFc and NetCDF-Fortran ==
== In this page we explain how to configure HDF5 and NetCDFc and NetCDF-Fortran ==


'''Gfortran Installation'''


<code>export INSTALL_DIR={your installation directory}</code>


Configuration of HDF5 1.14.6 with gfortran:
Configuration of HDF5 1.14.6 with gfortran:


export INSTALLDIR={your installation directory}
<code>./configure --prefix=$INSTALL_DIR --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx --enable-parallel CC=mpicc CPP="mpicc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US"  FC=mpif90 --enable-build-mode=production</code>
 
./configure --prefix=$INSTALDIR --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx --enable-parallel CC=mpicc CPP="mpicc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US"  FC=mpif90 --enable-build-mode=production  


Configure NetCDFC-4.9.0 with gfortran
Configure NetCDFC-4.9.0 with gfortran


./configure --prefix=${INSTALLDIR} --without-pic --enable-static --disable-shared --disable-dap --enable-netcdf-4 CC=gcc CPP="gcc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpif90 CPPFLAGS="-DpgiFortran -I${INSTALLDIR}" LIBS="-L${INSTALLDIR} -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" F77=mpif90 LDFLAGS="-Wl,--copy-dt-needed-entries"
<code>./configure --prefix=${INSTALL_DIR} --without-pic --enable-static --disable-shared --disable-dap --enable-netcdf-4 CC=gcc CPP="gcc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpif90 CPPFLAGS="-DpgiFortran -I${INSTALLDIR}" LIBS="-L${INSTALL_DIR} -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" F77=mpif90 LDFLAGS="-Wl,--copy-dt-needed-entries"</code>


Configure NetCDF-fortran 4.6.2 with gfortran
Configure NetCDF-fortran 4.6.2 with gfortran


./configure --prefix=${INSTALLDIR} --libdir="${INSTALLDIR}/lib" --without-pic --enable-static --disable-shared CC=gcc CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" CPP="mpif90 -E" FC=mpif90 CPPFLAGS="-DpgiFortran
<code>./configure --prefix=${INSTALL_DIR} --libdir="${INSTALL_DIR}/lib" --without-pic --enable-static --disable-shared CC=gcc CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" CPP="mpif90 -E" FC=mpif90 CPPFLAGS="-DpgiFortran
-I${INSTALLDIR}/include" LIBS="-L${INSTALLDIR}/lib/ -lnetcdf -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -hdf5" F77=mpif90
-I${INSTALLDIR}/include" LIBS="-L${INSTALL_DIR}/lib/ -lnetcdf -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -hdf5" F77=mpif90</code>
 
 
'''Intel ONEAPI Installation'''
 
 
<code>export INSTALLDIR={your installation directory}</code>
 
Configuration of HDF5 1.14.6 with intel:
 
<code>/configure --prefix=/home/attacc/local_intel/ --enable-fortran --enable-parallel CC=mpiicx CPP="mpiicx -E" FC=mpiifx --enable-build-mode=production --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx</code>
 
Configure NetCDFC-4.9.0 with intel
 
<code>./configure --prefix=/home/attacc/local_intel/ --without-pic --enable-static --disable-shared --disable-dap --disable-libxml2 --enable-netcdf-4  CC=mpiicx CPP="mpiicx -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpiifort CPPFLAGS="-DpgiFortran -I${INSTALL_DIR}/include" LIBS="-L${INSTALL_DIR}/lib  -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" F77=mpiifx</code>
 
 
Configure NetCDF-fortran 4.6.2 with intel
 
<code>./configure --prefix=/home/attacc/local_intel/ --libdir=/home/attacc/local_intel/lib --without-pic --enable-static --disable-shared CC=mpiicx CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" CPP="mpiicx -E" FC=mpiifx CPPFLAGS="-DpgiFortran -I</code><code>${INSTALL_DIR}/include" LIBS="-L${INSTALL_DIR}/lib/ -lnetcdf -lhdf5hl_fortran -lhdf5_fortran  -lhdf5_hl -lhdf5" F77=mpiifx</code>
 
 
'''Linking libraries to Lumen'''
 
<code>/configure  --with-netcdf-path="${INSTALL_DIR}" --with-netcdff-path="${INSTALL_DIR}" --with-hdf5-path="${INSTALL_DIR}"</code>

Revision as of 16:24, 30 January 2026

In this page we explain how to configure HDF5 and NetCDFc and NetCDF-Fortran

Gfortran Installation

export INSTALL_DIR={your installation directory}

Configuration of HDF5 1.14.6 with gfortran:

./configure --prefix=$INSTALL_DIR --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx --enable-parallel CC=mpicc CPP="mpicc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpif90 --enable-build-mode=production

Configure NetCDFC-4.9.0 with gfortran

./configure --prefix=${INSTALL_DIR} --without-pic --enable-static --disable-shared --disable-dap --enable-netcdf-4 CC=gcc CPP="gcc -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpif90 CPPFLAGS="-DpgiFortran -I${INSTALLDIR}" LIBS="-L${INSTALL_DIR} -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" F77=mpif90 LDFLAGS="-Wl,--copy-dt-needed-entries"

Configure NetCDF-fortran 4.6.2 with gfortran

./configure --prefix=${INSTALL_DIR} --libdir="${INSTALL_DIR}/lib" --without-pic --enable-static --disable-shared CC=gcc CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" CPP="mpif90 -E" FC=mpif90 CPPFLAGS="-DpgiFortran -I${INSTALLDIR}/include" LIBS="-L${INSTALL_DIR}/lib/ -lnetcdf -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -hdf5" F77=mpif90


Intel ONEAPI Installation


export INSTALLDIR={your installation directory}

Configuration of HDF5 1.14.6 with intel:

/configure --prefix=/home/attacc/local_intel/ --enable-fortran --enable-parallel CC=mpiicx CPP="mpiicx -E" FC=mpiifx --enable-build-mode=production --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx

Configure NetCDFC-4.9.0 with intel

./configure --prefix=/home/attacc/local_intel/ --without-pic --enable-static --disable-shared --disable-dap --disable-libxml2 --enable-netcdf-4  CC=mpiicx CPP="mpiicx -E" CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" FC=mpiifort CPPFLAGS="-DpgiFortran -I${INSTALL_DIR}/include" LIBS="-L${INSTALL_DIR}/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" F77=mpiifx


Configure NetCDF-fortran 4.6.2 with intel

./configure --prefix=/home/attacc/local_intel/ --libdir=/home/attacc/local_intel/lib --without-pic --enable-static --disable-shared CC=mpiicx CFLAGS="-O2 -std=gnu99 -D_C_US -D_FORTRAN_US" CPP="mpiicx -E" FC=mpiifx CPPFLAGS="-DpgiFortran -I${INSTALL_DIR}/include" LIBS="-L${INSTALL_DIR}/lib/ -lnetcdf -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" F77=mpiifx


Linking libraries to Lumen

/configure --with-netcdf-path="${INSTALL_DIR}" --with-netcdff-path="${INSTALL_DIR}" --with-hdf5-path="${INSTALL_DIR}"