Commit c05b9797 authored by mathieu's avatar mathieu

Fix dependencies

parent a6dad32d
......@@ -5,14 +5,21 @@ calculatorproject=CHANGE_ME
echo " compiling c++... "
g++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC \
$root/$calculatorproject/src/main/c++/Native/LCAKernel_LCAKernel.cpp \
-I$root/external/libs/ \
-I/opt/boost_1_67_0 -std=c++17 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I/usr/lib/jvm/java-8-oracle/include/ \
-I/usr/lib/jvm/java-8-oracle/include/linux/ \
-L /opt/boost_1_67_0/stage/lib -lgsl -lgslcblas -lm -lboost_serialization -shared -o libLCAKernel.so
g++ -v -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC \
./src/main/c++/Native/LCAKernel_LCAKernel.cpp \
-I$HOME/external/libs/ \
-I$BOOST_HOME -std=c++17 -O0 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I"$JAVA_HOME/include/" \
-I"$JAVA_HOME/include/linux/" \
-L $BOOST_HOME/stage/lib -lgsl -lgslcblas -lm -lboost_serialization -shared -o libLCAKernel.so
cp $root/$calculatorproject/libLCAKernel.so $root/$calculatorproject/src/main/resources/lib/Linux/amd64/
#mkdir -p ./src/main/resources/lib/Linux/amd64
#cp ./libLCAKernel.so ./src/main/resources/lib/Linux/amd64/
sbt clean package
#cd src/main/java/LCAKernel
#javac LCAKernel.java
#javah LCAKernel.LCAKernel
#cd ../../../..
#sbt clean package
......@@ -7,7 +7,8 @@ scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
"net.sf.trove4j" % "trove4j" % "3.0.1",
"org.slf4j" % "slf4j-api" % "1.7.21"
"org.slf4j" % "slf4j-api" % "1.7.21",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.2"
)
fork in run := true
......
......@@ -51,10 +51,10 @@ using namespace std;
#include "../Utilities/ParameterUtils.h"
#include "../DAL/ParameterTable.h"
#include <tr1/unordered_map>
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
using Eigen::BiCGSTAB;
using Eigen::ConjugateGradient;
......
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./MontecarloCalculatorMain.cpp -I./libs/ -I/opt/boost_1_67_0 -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I/usr/lib/jvm/java-8-oracle/include/ \
-I/usr/lib/jvm/java-8-oracle/include/linux/ \
-L/opt/boost_1_67_0/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -march=native -DEIGEN_USE_BLAS -o processes/montecarlo
\ No newline at end of file
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./MontecarloCalculatorMain.cpp -I$HOME/libs/ -I$BOOST_HOME/ -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I"$JAVA_HOME/include/"
-I"$JAVA_HOME/include/linux/" \
-L$BOOST_HOME/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -march=native -DEIGEN_USE_BLAS -o processes/montecarlo
......@@ -26,7 +26,7 @@
using namespace std;
#include "../includes/exprtk.hpp"
#include "exprtk/exprtk.hpp"
#include "../LCAModels/CalcParameter.hpp"
typedef exprtk::expression<double> expression_t;
......
......@@ -30,10 +30,10 @@
#include "../Calculators/Models/AppSettings.hpp"
using namespace std;
#include "../DAL/LCADBUtils.h"
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
/*#include <Eigen>*/
......
......@@ -33,7 +33,7 @@
#include "../Utilities/ResultsUtilsSingle.hpp"
#include "../Calculators/Models/AppSettings.hpp"
#include <Eigen/SparseCore>
#include <eigen3/Eigen/SparseCore>
/*#include <Eigen>*/
#include <iostream>
using Eigen::VectorXd;
......
......@@ -30,10 +30,10 @@
#include "../Utilities/ResultsUtilsSingle.hpp"
#include "../Calculators/Models/AppSettings.hpp"
using namespace std;
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
#include <algorithm>
/*#include <Eigen>*/
......
......@@ -31,10 +31,10 @@
#include "../Calculators/Models/AppSettings.hpp"
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
......
......@@ -20,12 +20,12 @@
#include "../Utilities/ResultsUtilsSingle.hpp"
#include "../LCAModels/LCAIndexes.hpp"
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <Eigen/Dense>
/*#include <Eigen>*/
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
//#include <Eigen>
//#include "../libs/libMUMPS.hpp"
//#include <Eigen/UmfPackSupport>
using Eigen::BiCGSTAB;
......
......@@ -39,7 +39,7 @@
#include <iostream>
#include "../DAL/LCADB.hpp"
#include "../includes/exprtk.hpp"
#include "exprtk/exprtk.hpp"
#include "../LCAModels/CalcParameter.hpp"
template <typename T>
......
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./Native/LCAKernel_LCAKernel.cpp -I./libs/ -I/opt/boost_1_67_0 -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I/usr/lib/jvm/java-8-oracle/include/ \
-I/usr/lib/jvm/java-8-oracle/include/linux/ \
-L /opt/boost_1_67_0/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -shared -o libLCAKernel.so
\ No newline at end of file
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./LCAKernel_LCAKernel.cpp -Ilibs/ -I$BOOST_HOME/ -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I"$JAVA_HOME/include/" \
-I"$JAVA_HOME/include/linux/" \
-L $BOOST_HOME/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -shared -o libLCAKernel.so
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./Native/LCAKernel_LCAKernel.cpp -I./libs/ -I/opt/boost_1_67_0 -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I/usr/lib/jvm/java-8-oracle/include/ \
-I/usr/lib/jvm/java-8-oracle/include/linux/ \
-L /opt/boost_1_67_0/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -shared -o libLCAKernel.so
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./Native/LCAKernel_LCAKernel.cpp -I$HOME/libs/ -I$BOOST_HOME/ -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I"$JAVA_HOME/include/" \
-I"$JAVA_HOME/include/linux/" \
-L $BOOST_HOME/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -shared -o libLCAKernel.so
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./Native/Calculators_MPI/MontecarloCalculatorMPIMain.cpp -I./libs/ -I/opt/boost_1_67_0 -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I/usr/lib/jvm/java-8-oracle/include/ \
-I/usr/lib/jvm/java-8-oracle/include/linux/ \
-L/opt/boost_1_67_0/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -march=native -DEIGEN_USE_BLAS -o processes/montecarlo
\ No newline at end of file
mpic++ -pipe -D_JNI_IMPLEMENTATION_ -m64 -fPIC ./Native/Calculators_MPI/MontecarloCalculatorMPIMain.cpp -I$HOME/libs/ -I$BOOST_HOME/ -std=c++11 -O3 -fopenmp -DBOOST_SYSTEM_NO_DEPRECATED \
-I"$JAVA_HOME/include/" \
-I"$JAVA_HOME/include/linux" \
-L $BOOST_HOME/stage/lib -lgsl -lgslcblas -lm -lboost_mpi -lboost_serialization -march=native -DEIGEN_USE_BLAS -o processes/montecarlo
......@@ -28,10 +28,10 @@
#include <iostream>
#include "../Messaging/LCAException.hpp"
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
//#include <Eigen/UmfPackSupport>
using Eigen::BiCGSTAB;
......
......@@ -37,10 +37,10 @@ using namespace std;
//#include "/usr/include/suitesparse/umfpack.h"
#include <suitesparse/umfpack.h>
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include <Eigen/SparseLU>
#include <Eigen/IterativeLinearSolvers>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/SparseCore>
#include <eigen3/Eigen/SparseLU>
#include <eigen3/Eigen/IterativeLinearSolvers>
//#include <Eigen/UmfPackSupport>
using Eigen::VectorXd;
......
......@@ -22,7 +22,7 @@
*--------------------------*/
package org.ets.lca
import LCAKernel.LCAKernel
//import LCAKernel.LCAKernel
import org.ets.lca.DAL.{LCADBSet}
import org.ets.lca.Factories._
import org.ets.lca.LCACalculators.CalculatorData.CalculationSettings
......@@ -42,9 +42,11 @@ import scala.util.parsing.json.JSON
class LCACalculator(val settings: CalculationSettings) {
import org.Native._
//import org.Native._
Session.loadLib("LCAKernel","0.1")
//Session.loadLib("LCAKernel","0.1")
System.loadLibrary("LCAKernel")
import LCAKernel.LCAKernel
val resultUtils=new ResultsUtilsSingle(settings)
......
......@@ -35,9 +35,11 @@ import scala.util.Try
*/
object LCASingle {
import org.Native._
//import org.Native._
Session.loadLib("LCAKernel","0.1")
//Session.loadLib("LCAKernel","0.1")
System.loadLibrary("LCAKernel")
import LCAKernel.LCAKernel
def main(args : Array[String])={
......
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