This page describes the libraries that are available for SQUID's GPU nodes.
※There is a note for the FORTRAN compiler for GPGPU computing environment (nvfortran). nvfortran does not have the function to change the search path of the include file according to the environment variable. For this reason, you need to pass the CPATH environment variable set by the module command with the -I option at the time of compilation. An execution example is shown below.

$ nvfortran -o sample sample.f90 -I${CPATH}

 
HDF5
NetCDF
Parallel netcdf
 

HDF5

    HDF5 is a library for generating files that can store large amounts of data in a hierarchically structured manner. It is maintained for each computing environment. To use this library, the option -lhdf5 is given at compile time. The following is an example of linking the library.

    $ module load BaseGPU
    $ module load hdf5
    $ nvc -o h5-sample h5-sample.c -lhdf5 -R${LD_RUN_PATH}

 

NetCDF

    NetCDF is a library that can use binary file format, which is widely used as a common data format, for the purpose of storing scientific multi-dimensional data. In this system, the library is prepared to be used from C/C++/FORTRAN languages respectively for each computing environment. In order to use the library, you need to add options such as -lnetcdf when compiling. The following is a link example of the library.

    C

      $ module load BaseGPU
      $ module load netcdf-c
      $ nvc -o ncdf-sample ncdf-sample.c -lnetcdf
      f

    C++

      $ module load BaseGPU
      $ module load netcdf-cxx
      $ nvc++ -o ncdf-sample ncdf-sample.cpp -lnetcdf_c++4 -lnetcdf

    FORTRAN

      $ module load BaseGPU
      $ module load netcdf-fortran
      $ nvfortran -o ncdf-sample ncdf-sample.f90 -I${CPATH} -lnetcdff -lnetcdf

 

PnetCDF

    PnetCDF is a library for concurrent access to NetCDF format files from parallel programs. In this system, PnetCDF can be used in C/C++/FORTRAN language for each computing environment. In order to use the library, you need to add options such as -lpnetcdf when compiling. The following is a link example of the library.

    C

      $ module load BaseGPU
      $ module load pnetcdf-c
      $ mpicc -o pncdf-sample pncdf-sample.c -lpnetcdf

    C++

      $ module load BaseGPU
      $ module load pnetcdf-cxx
      $ mpic++ -o pncdf-sample pncdf-sample.cpp -lpnetcdf

    FORTRAN

      $ module load BaseGPU
      $ module load pnetcdf-fortran
      $ mpifort -o pncdf-sample pncdf-sample.f90 -I${CPATH} -lpnetcdf