Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .conda/conda.recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -ex

# Create the lib directory to store the Fortran library in
LIB_DIR="${PREFIX}/lib"
mkdir -p $LIB_DIR

# Create the bin directory to store the Fortran binaries in
echo "FKDEV: echo BIN_DIR"
echo $BIN_DIR
BIN_DIR="${PREFIX}/bin"
mkdir -p $BIN_DIR
echo "FKDEV: echo BIN_DIR after creation"
echo $BIN_DIR

cd $SRC_DIR

# get important settings
echo "FKDEV: cp settings"
cp .conda/important_settings .

# echo "FKDEV: ls PREFIX lib"
# ls $PREFIX/lib
# echo "FKDEV: ls PREFIX include"
# ls $PREFIX/include
# echo "FKDEV: ls BUILD_PREFIX/bin"
# ls $BUILD_PREFIX/bin


# let's build this thing
echo "FKDEV: build"
# bash build_things.sh --nthreads_make 2
bash build_things.sh

# Install binaries explicitly

for file in bin/*
do
echo $file
cp $file $BIN_DIR
done

# Optional: print installed binaries to verify
echo "Installed binaries:"
ls -l $BIN_DIR
46 changes: 46 additions & 0 deletions .conda/conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% set version = "24.09" %}

package:
name: tdep
version: {{ version }}

source:
git_url: https://github.com/tdep-developers/tdep.git
git_rev: fk_conda_build
# git_depth: 1

build:
number: 0

requirements:
build:
- {{ compiler('fortran') }}
# - gfortran
- openmpi
- openmpi-mpifort
- scalapack
- fftw
- hdf5
- openblas
host:
- openmpi
- openmpi-mpifort
- scalapack
- hdf5
- fftw
- openblas
run:
- scalapack
- openmpi-mpifort
- hdf5
- fftw
- openblas

about:
home: https://github.com/tdep-developers/tdep
license: MIT
summary: 'TDEP'
description: "Proper phonons made in Sweden."
dev_url: https://github.com/tdep-developers/tdep
doc_url: https://tdep-developers.github.io/tdep/
doc_source_url: https://github.com/tdep-developers/tdep/blob/main/README.md
50 changes: 50 additions & 0 deletions .conda/important_settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
# A central place to put all the important paths. You probably have to modify this to make things work.

# the fortran compiler
FORTRAN_COMPILER="$FC"
# required compiler flags
FCFLAGS="-ffree-line-length-none -std=gnu -cpp -fallow-argument-mismatch"
# extra flags, for debugging and such
FCFLAGS_EXTRA=""

# optimization stuff. Go all in, sometimes
OPTIMIZATION_LEVEL="-O3"
OPTIMIZATION_SENSITIVE="-O0"

# the flag that sets the default real to a double.
DOUBLE_FLAG= # "-fdefault-real-8"
# The flag that tells the compiler where to put .o and .mod files.
MODULE_FLAG="-J"

# the header to put in python scripts.
PYTHONHEADER="#!/usr/bin/env python"

# Which gnuplot terminal to use by default.
# Choices: aqua, qt, wxt
GNUPLOTTERMINAL="qt"

# Precompiler flags. Selecting default gnuplot terminal, and make the progressbars work.
PRECOMPILER_FLAGS="-DGP${GNUPLOTTERMINAL} -Dclusterprogressbar"

# These are the BLAS/LAPACK libraries. On OSX with gfortran, use the built-in 'framework accelerate'
PATH_TO_BLASLAPACK_LIB="-L/$PREFIX/lib"
PATH_TO_BLASLAPACK_INC="-I/$PREFIX/include"
BLASLAPACK_LIBS="-llapack -lscalapack"

# I use fftw for Fourier transforms.
PATH_TO_FFTW_LIB="-L/$PREFIX/lib"
PATH_TO_FFTW_INC="-I/$PREFIX/include"
FFTW_LIBS="-lfftw3"

# Also need MPI
PATH_TO_MPI_LIB="-L/$PREFIX/lib"
PATH_TO_MPI_INC="-I/$PREFIX/include"
MPI_LIBS="-lmpi_mpifh -lmpi"

# I also use HDF5 every now and then
PATH_TO_HDF5_LIB="-L/$PREFIX/lib"
PATH_TO_HDF5_INC="-I/$PREFIX/include"
HDF5_LIBS="-lhdf5 -lhdf5_fortran"

USECGAL=no
4 changes: 3 additions & 1 deletion build_things.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ do
fi
cd ../../
# link it to bin?
[ -f build/${code}/${code} ] && ln -sf ../build/${code}/${code} bin/${code}
# [ -f build/${code}/${code} ] && ln -sf ../build/${code}/${code} bin/${code}
# move it instead
[ -f build/${code}/${code} ] && mv build/${code}/${code} bin/${code}
done

basedir=`pwd`
Expand Down