Commit 3f2fa89d authored by Cianciosa, Mark's avatar Cianciosa, Mark
Browse files

Update build system on NERSC so it can compile.

parent e5b831a0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -50,6 +50,14 @@ parameters.
`BUILD_C_BINDING`       Enable the C binding interface.
`BUILD_Fortran_BINDING` Enable the Fortran binding interface.

###  Building on NERSC
For convenience there is a script for configuing the build system on nerse. To
run this, 
```
source setup_cmake
```
Then follow the remaining from the screen.

##
There is an example case which can be run from inside the build directory using
the command
+28 −17
Original line number Diff line number Diff line
@@ -43,16 +43,27 @@ if [ $MACHINE_ID == "login1" ] || \
   [ $MACHINE_ID == "login27" ] || \
   [ $MACHINE_ID == "login28" ] || \
   [ $MACHINE_ID == "login29" ] || \
   [ $MACHINE_ID == "login30" ]
   [ $MACHINE_ID == "login30" ] || \
   [ $MACHINE_ID == "login31" ] || \
   [ $MACHINE_ID == "login32" ] || \
   [ $MACHINE_ID == "login33" ] || \
   [ $MACHINE_ID == "login34" ] || \
   [ $MACHINE_ID == "login35" ] || \
   [ $MACHINE_ID == "login36" ] || \
   [ $MACHINE_ID == "login37" ] || \
   [ $MACHINE_ID == "login38" ] || \
   [ $MACHINE_ID == "login39" ] || \
   [ $MACHINE_ID == "login40" ]
then
    module load cmake
    module load cray-hdf5
    cmake -DCMAKE_C_COMPILER=gcc            \
          -DCMAKE_CXX_COMPILER=g++          \
    module load cudnn/9.5.0
    cmake -DCMAKE_C_COMPILER=$(which cc)                      \
          -DCMAKE_CXX_COMPILER=$(which CC)                    \
          -DCMAKE_Fortran_COMPILER=gfortran                   \
          -DMLX_BUILD_CUDA=ON                                 \
          -DBUILD_C_BINDING=ON                                \
          -DBUILD_Fortran_BINDING=ON                          \
          -DMLX_BUILD_BLAS_FROM_SOURCE=ON   \
          -DBUILD_SHARED_LIBS=ON                              \
          ../
else
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@
      INTEGER(C_INT), PARAMETER                  :: batch_size = 10000

!  Start of executable code.
      model => ml_context(KERAS_MODEL // C_NULL_CHAR)
      model => ml_context(                                                     &
         KERAS_MODEL // C_NULL_CHAR)
      in_shape => model%get_in_shape()
      out_shape => model%get_out_shape()