Commit 8c406946 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 24/11/15 adapt for Linux

parent aee955b4
......@@ -13,6 +13,9 @@ ifeq ($(MACH), Linux)
BLASLIB = -L$(BLASDIR)/lib
BLASLIBN = $(BLASLIB) -lopenblas
endif
# ==== Boost ======
BOOSTDIR = /exp/opera/kits/boost_1_59_0
BOOSTINC = -I$(BOOSTDIR)
else
include Darwin_g++_omp_make.inc
# ===== nNative BLAS (Darwin)
......@@ -29,7 +32,7 @@ endif
# ===== Libsharp =====
#SHARPDIR = <yourdir>/libsharp-code/auto/
SHARPDIR = /Users/campagne/Travail/kits/libsharp-code/auto
SHARPDIR = /exp/opera/kits/libsharp-code/auto
SHARPLIB = $(SHARPDIR)/lib
SHARPINC = -I$(SHARPDIR)/include
SHARPLIBN = -L$(SHARPLIB) -lsharp -lc_utils -lfftpack
......@@ -72,12 +75,16 @@ confcheck :
@echo "Config check mach=<$(MACH)> sharp=<$(SHARPDIR)> blas=<$(BLASDIR)>"
ifeq ($(BLAS), 1)
@if [ ! -d "$(BLASDIR)" ]; then \
echo "BLAS directory not defined properly!"; \
echo "BLAS directory not defined properly: $BLASDIR"; \
exit 1; \
fi ;
endif
@if [ ! -d "$(SHARPDIR)" ]; then \
echo "SHARP directory not defined properly!"; \
echo "SHARP directory not defined properly: $SHARPDIR"; \
exit 1; \
fi ;
@if [ ! -d "$(BOOSTDIR)" ]; then \
echo "BOOST directory not defined properly: $BOOSTDIR"; \
exit 1; \
fi ;
......@@ -125,7 +132,7 @@ CXXHDR = $(SRC)lagsht_exceptions.h \
$(SRC)laguerre2bessel.h \
$(SRC)quadinteg.h
CPPFLAGS += $(BLASYES) $(SHARPINC) $(BLASINC)
CPPFLAGS += $(BLASYES) $(SHARPINC) $(BLASINC) $(BOOSTINC)
LDFLAGS += $(SHARPLIBN) $(BLASLIBN) -lm
......
......@@ -574,7 +574,7 @@ void TestPixelization() {
int state = 1234567 + 8912 ; //random seed
stringstream ss; ss << "pixels-" << geometry << "-L" << Lmax << ".txt";
std::ofstream ofs (ss.str(), std::ofstream::out);
std::ofstream ofs (ss.str().c_str(), std::ofstream::out);
r_8 dTheta = M_PI/ntheta/2;
r_8 dPhi = 2*M_PI/nphi/2;
......
......@@ -8,6 +8,7 @@
#include "walltimer.h" //timing
#include <fstream> //dump
#include <sstream>
#include <numeric>
#define DEBUG 0
......@@ -47,7 +48,8 @@ Laguerre2Bessel::Laguerre2Bessel(BaseGeometry* sphere,
//read the Rmax-independant values of the jlnp and rescale
stringstream ss; ss << "jlnp-L"<<Lmax_<<"-N"<<Nmax_<<"-P"<<Pmax_<<"-PP"<<PPmax_<<".txt";
std::ifstream ifs(jlnpDir+"/"+ss.str(), std::ifstream::in);
string fname(jlnpDir+"/"+ss.str());
std::ifstream ifs(fname.c_str(), std::ifstream::in);
if(!ifs.is_open())
throw LagSHTError("ERROR: jlnp file open failed.:"+ss.str());
......@@ -138,7 +140,8 @@ void Laguerre2Bessel::ComputeJInteg(string clenshawDir, string jlnpDir){
stringstream ss; ss << "jlnp-L"<<Lmax_<<"-N"<<Nmax_<<"-P"<<Pmax_<<"-PP"<<PPmax_<<".txt";
std::ofstream ofs;
ofs.open (jlnpDir+"/"+ss.str(), std::ofstream::out);
string fname(jlnpDir+"/"+ss.str());
ofs.open (fname.c_str(), std::ofstream::out);
// cout << "(JEC) Jlpn recompute..." << endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment