CLAWRIM Wiki

The Computational Lab for Advanced Water Resources Informatics and Modeling

User Tools

Site Tools


howtos:how_to_compile_modflow_6_on_slackware

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:how_to_compile_modflow_6_on_slackware [2024-08-20 07:31 am] hchohowtos:how_to_compile_modflow_6_on_slackware [2025-04-10 01:06 pm] (current) hcho
Line 1: Line 1:
 ====== How to compile MODFLOW 6 on Slackware ====== ====== How to compile MODFLOW 6 on Slackware ======
 +
 +[[https://github.com/MODFLOW-USGS/modflow6|MODFLOW 6]] is parallelized using [[https://www.mpi-forum.org/|the Message Passing Interface]] (MPI) and [[https://petsc.org/|the Portable, Extensible Toolkit for Scientific Computation]] (PETSc). This HOWTO explains how to compile these dependencies and MODFLOW 6 on Slackware.
  
 <code bash> <code bash>
-su -              # switch to root +# switch to root 
-sbopkg -i openmpi # install OpenMPI+su - 
 + 
 +# install openmpi and python3-numpy; petsc requires python3-numpy and OpenBLAS; 
 +# build queuefiles, not packages, to automatically build any other dependencies 
 +sbopkg -k -i "openmpi python3-numpy OpenBLAS" 
 + 
 +# download and unzip a petsc build script 
 +cd /tmp 
 +wget https://clawiki.isnew.info/_media/howtos/petsc.zip 
 +unzip petsc.zip 
 +cd petsc 
 + 
 +# build petsc 
 +./petsc.SlackBuild 
 + 
 +# install petsc 
 +cd .. 
 +rm -rf petsc 
 +installpkg petsc-*.tgz 
 + 
 +# switch to non-root 
 +exit 
 + 
 +# clone github repositories 
 +mkdir -p ~/usr/local/src 
 +cd ~/usr/local/src 
 +git clone https://github.com/MODFLOW-USGS/modflow6.git 
 +git clone https://github.com/fortran-lang/test-drive.git 
 + 
 +# build test-drive 
 +cd test-drive 
 +meson setup builddir --prefix=$PWD --libdir=lib 
 +meson install -C builddir 
 +mkdir -p ~/usr/local/share/pkgconfig 
 +cp -a builddir/meson-private/test-drive.pc ~/usr/local/share/pkgconfig 
 +if ! echo $PKG_CONFIG_PATH | grep -q $HOME/usr/local/share/pkgconfig; then 
 +  echo 'export PKG_CONFIG_PATH="$HOME/usr/local/share/pkgconfig:$PKG_CONFIG_PATH"' > ~/.bash_profile 
 +  . ~/.bash_profile 
 +fi 
 +cd .. 
 + 
 +# build modflow6 
 +cd modflow6 
 +meson setup builddir -Ddebug=false -Dparallel=true --prefix=$(pwd) --libdir=bin 
 +meson install -C builddir 
 +meson test --verbose --no-rebuild -C builddir 
 + 
 +# install modflow6 
 +mkdir ~/usr/local/bin 
 +cp -a bin/mf6 ~/usr/local/bin 
 +if ! echo $PATH | grep -q $HOME/usr/local/bin; then 
 +  echo 'export PATH="$HOME/usr/local/bin:$PATH"' > ~/.bash_profile 
 +  . ~/.bash_profile 
 +fi
 </code> </code>
howtos/how_to_compile_modflow_6_on_slackware.1724160706.txt.gz · Last modified: by hcho

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki