Skip to content

Commit

Permalink
Cleaned up compilation warnings and linking issues on macos wit Xcode 15
Browse files Browse the repository at this point in the history
  • Loading branch information
meisenbach committed Nov 2, 2023
1 parent 71df824 commit 47963d8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Core/radialSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <cfloat>
#include <cstdlib>
#include <cmath>
#include <algorithm>

void lsms::nrel_in(double energy, int l_qn, double *p_array, double *q_array,
const double *__restrict__ r_mesh,
Expand Down
4 changes: 2 additions & 2 deletions src/Kubo/CurrentMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
#include "MultipleScattering/linearSolvers.hpp"
#include "MultipleScattering/MultipleScattering.hpp"
#include "MultipleScattering/buildKKRMatrix.hpp"
#include "Accelerator/DeviceStorage.hpp"
#if defined(ACCELERATOR_LIBSCI) || defined(ACCELERATOR_CUDA_C) || defined(ACCELERATOR_HIP)
#include "Accelerator/DeviceStorage.hpp"
extern DeviceStorage *deviceStorage;
#endif

class CurrentMatrix {
public:
Complex sqrtm1 = (0.0,1.0);
const Complex sqrtm1 = Complex(0.0,1.0);
Complex energy,prel,pnrel;
int local_index, is,lmax_cg,kkrsz,nrmat;
AtomData *atom;
Expand Down
2 changes: 1 addition & 1 deletion src/Main/initializeAtom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ int calculateAtomLevels(AtomData &a, std::vector<InitialAtomLevel> &atomLevels,
FILE *orbitalFile;
if (writeOrbitals) {
for (int nl = 0; nl < atomLevels.size(); nl++) {
sprintf(fname, "orbital_density_n%d_l%d", atomLevels[nl].n,
snprintf(fname, 250, "orbital_density_n%d_l%d", atomLevels[nl].n,
atomLevels[nl].l);
orbitalFile = fopen(fname, "w");

Expand Down
2 changes: 1 addition & 1 deletion src/Main/wl_lsms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
num_steps = 1;
initial_steps = 0;

sprintf(i_lsms_name, "i_lsms");
snprintf(i_lsms_name, 60, "i_lsms");
gWL_in_name[0] = gWL_out_name[0] = 0;
mode_name[0] = 0;
energy_calculation_name[0] = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/Mixer/Mixer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class AbstractMixer {
unsigned int mixerType, const RealMixingVector &mixVector,
const MixingParameter &params);

virtual ~AbstractMixer() = default;

};

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Potential/XCBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class XCBase {
Real xc_pot_out[2]) = 0;

virtual std::string get_name() = 0;

virtual ~XCBase() = default;
};

} // namespace lsms
Expand Down
1 change: 1 addition & 0 deletions src/Potential/newPotential.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Potential {
LocalTypeInfo &local,
CrystalParameters &crystal,
std::vector<Real> &qsub) = 0;
virtual ~Potential() = default;
};

class ASAPotential : public Potential {
Expand Down
10 changes: 7 additions & 3 deletions toolchain/macos-gfortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ set(MST_BUILD_KKR_MATRIX_DEFAULT 0x1000)
set(BLA_VENDOR Apple)

set(CMAKE_CXX_COMPILER "mpic++")
set(CMAKE_C_COMPILER "gcc-11")
set(CMAKE_C_COMPILER "gcc-13")

set(BUILD_WITH_OPENMP OFF)

set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "-O3 -mtune=native")
set(libxc_LIBRARIES "/Users/vie/Documents/MuST/external/libxc/LibXC/lib/libxc.a")
set(libxc_INCLUDE_DIR "/Users/vie/Documents/MuST/external/libxc/LibXC/include")
set(LINK_FLAGS "-Wl,-ld_classic")
# set(LINK_FLAGS "-ld64")
# set(libxc_LIBRARIES "/Users/vie/Documents/MuST/external/libxc/LibXC/lib/libxc.a")
# set(libxc_INCLUDE_DIR "/Users/vie/Documents/MuST/external/libxc/LibXC/include")

0 comments on commit 47963d8

Please sign in to comment.