Skip to content

matheusdiogenesandrade/Scaled-algencan-c-cpp-cmake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scaled Algencan C/C++/CMake setup

Beforehand settings

Make sure you had built scaled-algencan properly. After, you will have to build the shared library of the scaled-algencan:

cd /opt/scaled-algencan/algencan-3.1.1_scaled
make sharedlib

And then set the environment variables, such as below.

export SCALED_ALGENCAN_LIB=/opt/scaled-algencan/algencan-3.1.1_scaled/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCALED_ALGENCAN_LIB

C

cd c/
gcc -O3 main.c -L${SCALED_ALGENCAN_LIB} -lalgencan -lgfortran -lopenblas -zmuldefs -lm -o algencan
./algencan

C++

cd cpp/
g++ -O3 main.cpp -L${SCALED_ALGENCAN_LIB} -lalgencan -lgfortran -lopenblas -zmuldefs -lm -o algencan
./algencan

CMake

When using CMake, there is no need for setting neither SCALED_ALGENCAN_LIB nor LD_LIBRARY_PATH, since the FindSCALED_ALGENCAN will load it automatically.

cd cmake/
mkdir build
cd build
cmake ..
make
./main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published