Skip to content

Instantly share code, notes, and snippets.

@kalmarek
Last active October 15, 2021 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalmarek/1ddc06f2d76f6b6c343bf7cb9be98d75 to your computer and use it in GitHub Desktop.
Save kalmarek/1ddc06f2d76f6b6c343bf7cb9be98d75 to your computer and use it in GitHub Desktop.
custom build of scs (SCS.jl)
#!/bin/bash
JULIA_HOME="/opt/julias/julia-1.6"
JULIA_LD_PATH="$JULIA_HOME/lib/julia"
BLASLDFLAGS="-L$JULIA_LD_PATH -lopenblas64_"
SCSFLAGS="USE_OPENMP=1 BLAS64=1 BLASSUFFIX=_64_"
make purge
make -j4 CFLAGS="-march=native" DLONG=1 ${SCSFLAGS} BLASLDFLAGS="${BLASLDFLAGS}" direct
make -j4 CFLAGS="-march=native" DLONG=1 ${SCSFLAGS} BLASLDFLAGS="${BLASLDFLAGS}" indirect
LD_LIBRARY_PATH=$JULIA_LD_PATH ./out/demo_socp_direct 1000 0.5 0.5 1
LD_LIBRARY_PATH=$JULIA_LD_PATH ./out/demo_socp_indirect 1000 0.5 0.5 1
make clean
make -j4 CFLAGS="-march=native" DLONG=0 ${SCSFLAGS} BLASLDFLAGS="${BLASLDFLAGS}" gpu
LD_LIBRARY_PATH=$JULIA_HOME/lib/julia:$LD_LIBRARY_PATH ./out/demo_socp_gpu 1000 0.5 0.5 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment