How to start with ADIOS - hpc

I'm attempting to install ADIOS 1.10 with Ubuntu 18.04. I had an anaconda-based terminal, and the only necessary requirement was Python 2.x or 3.x; therefore I installed using Automake simply by
CC=mpicc CXX=CC ./configure --disable-fortran --without-mpi --disable-write --prefix=/usr/local/adios
and the result is:
*********************************
adios configured as follows:
*********************************
- Build only the Read libraries
- Build only the C libraries (no Fortran)
- Build only the sequential libraries (no MPI)
- General Compile FLAGS
- CC = mpicc
- CXX = CC
- FC = /home/ali/anaconda3/bin/x86_64-conda-linux-gnu-gfortran
- CPPFLAGS = -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ali/anaconda3/include
- CFLAGS = -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ali/anaconda3/include
- CXXFLAGS = -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ali/anaconda3/include
- FCFLAGS =
- LDLAGS = -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/ali/anaconda3/lib -Wl,-rpath-link,/home/ali/anaconda3/lib -L/home/ali/anaconda3/lib
- LIBS = -lm -lrt
- No research transport methods
- ADIOS Timing Mechanism Enabled
- ADIOS Timing event recording Disabled
- No MXML
- No LUSTRE
- No FGR
- No GLIB
- Networking library for staging methods:
- No supported networking library found
- No DATASPACES to build DATASPACES transport method
- No DIMES to build DIMES transport method
- No PHDF5 to build PHDF5 transport method
- No HDF5
- No NETCDF 4 Parallel to build NC4 transport method
- No NETCDF
- No NSSI to build NSSI transport method
- No FLEXPATH to build FLEXPATH transport method
- No ICEE to build ICEE transport method
- No ZLIB to build ZLIB transform method
- No BZIP2 to build BZIP2 transform method
- No SZIP to build SZIP transform method
- No ISOBAR to build ISOBAR transform method
- No APLOD to build APLOD transform method
- No FASTBIT to build FASTBIT query method
- No ALACRITY to build ALACRITY transform & query methods
- BGQ METHOD is disabled
- Install path = /usr/local/adios
and then execute make and sudo make install as described in the user manual.
Now I code simple program in C++
#include <adios.h>
#include <stdio.h>
int main() {
return 0;
}
Then compile it to ensure that it is successfully installed However, I encountered the following error:
fatal error: adios.h: No such file or directory
1 | #include <adios.h>
So did I install it correctly?

Related

meaning of ld error message "duplicate version tag"

I'm compiling some C++ functionality into Matlab by using Mex compilation to produce a .mexa64 binary.
Honestly I don't know much about the guts of the symbols created in the .mexa64 binary and how it allows Matlab to call C++, but I'm starting with a simple question related to the error I eventually get when the command mex calls ld.
The ld error is:
/usr/bin/ld.real: duplicate version tag `MEX'
The question is, what does this ld error "duplicate version tag" mean? Other appreciated perspectives are: what does it mean in relation to the Matlab compilation I'm trying to do specifically; and where can I find comprehensive ld error message documentation?
This latter point, the comprehensive ld documentation, I've found particularly hard to find. The manual page for ld didn't seem to be helpful for this.
requested to post the mex config file:
<config Name="g++" ShortName="g++" Manufacturer="GNU" Version="" Language="C++" Priority="A" Location="$GCC_DIR">
<Details CompilerExecutable="$CXX" CompilerDefines="$DEFINES" CompilerFlags="$CXXFLAGS" OptimizationFlags="$CXXOPTIMFLAGS" DebugFlags="$CXXDEBUGFLAGS" IncludeFlags="$INCLUDE" LinkerLibraries="$LINKLIBS" LinkerOptimizationFlags="$LDOPTIMFLAGS" LinkerDebugFlags="$LDDEBUGFLAGS" CompilerDefineFormatter="-D%s" LinkerLibrarySwitchFormatter="-l%s" LinkerPathFormatter="-L%s"/>
<vars CMDLINE1="$CXX -c $DEFINES $INCLUDE $CXXFLAGS $OPTIM $SRC -o $OBJ" CMDLINE2="$LDXX $LDFLAGS $LDTYPE $LINKOPTIM $LINKEXPORT $OBJS $CXXLIBS $LINKLIBS -o $EXE" CMDLINE3="rm -f $OBJ" CXX="$GCC" DEFINES="-D_GNU_SOURCE $MATLABMEX" MATLABMEX="-DMATLAB_MEX_FILE " CXXFLAGS="-ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -std=c++11" INCLUDE="-I"$MATLABROOT/extern/include" -I"$MATLABROOT/simulink/include"" CXXOPTIMFLAGS="-O -DNDEBUG" CXXDEBUGFLAGS="-g" LDXX="$CXX" LDFLAGS="-pthread -Wl,--no-undefined " LDTYPE="-shared" LINKEXPORT="-Wl,--version-script,"$MATLABROOT/extern/lib/$ARCH/mexFunction.map"" LINKLIBS="-Wl,-rpath-link,$MATLABROOT/bin/$ARCH -L"$MATLABROOT/bin/$ARCH" -lmx -lmex -lmat -lm -lstdc++" LDOPTIMFLAGS="-O" LDDEBUGFLAGS="-g" OBJEXT=".o" LDEXT=".mexa64"> </vars>
<client>
<engine LINKLIBS="$LINKLIBS -leng" LINKEXPORT="" LDEXT="" LDTYPE=""/>
<mbuild DEFINES="-D_GNU_SOURCE $MATLABMEX -DUNIX -DX11 -DGLNXA64 -DGCC" CXXFLAGS="-ansi -pthread -std=c++11" INCLUDE="$INCLUDE -I"$MATLABROOT/extern/include/cpp"" LDFLAGS="-pthread -Wl,-rpath-link,$MATLABROOT/bin/$ARCH" LINKEXPORT="" LINKLIBS="-L"$MATLABROOT/runtime/$ARCH" -lm -lmwmclmcrrt" LDEXT="" MATLABMEX="" LDTYPE=""/>
</client>
<locationFinder>
<GCC>
<cmdReturns name="which g++"/>
</GCC>
<CPPLIB_DIR>
<cmdReturns name="g++ -print-file-name=libstdc++.so" diagnostic="GCC appears to be installed, but supporting C++ libraries were not found. You must first install the gcc-c++ packge, or similiar, to complete this action."/>
</CPPLIB_DIR>
</locationFinder>
</config>

Boost on eclipse on windows

I am using eclipse luna on win 7.
Here is my program.
#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
int main(int argc, char* argv[]){
// All programs that use asio need to have at least one io_service object
boost::asio::io_service io;
// sets the timer to expire 5 seconds from now
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.wait();
std::cout << "Hello, world!\n";
return 0;
}
Here is my command line code
g++ -I"C:\Users\Documents\Lib\boost_1_57_0\boost_1_57_0" -O0 -g3 -Wall -c -fmessage-length=0 -lboost_filesystem -lboost_system -lboost_libraryname -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
Invoking: Cross G++ Linker
g++ -o "002_TimerSynchronously" ./main.o
Error
C:/Users/SulfredLee/Documents/Lib/boost_1_57_0/boost_1_57_0/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
C:/Users/SulfredLee/Documents/Lib/boost_1_57_0/boost_1_57_0/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
C:/Users/SulfredLee/Documents/Lib/boost_1_57_0/boost_1_57_0/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
Anyone knows how to fix it?
Thank you very much
Reference:
undefined reference to boost::system::system_category() when compiling
How do I troubleshoot boost library/header inclusion via autoconf/automake?
The libraries should be present in the second command line when the linking takes place. Please be also careful and list the libraries after the object file.

MEX cuda code with dynamic parallelism - unable to compile

I have a code by name mexCodeCuda.cu which uses dynamic parallelism. In the matlab interface, when I try to execute the following commands, I get the following error :
system('nvcc --compile mexCodeCuda.cu -o mexCodeCuda.o --compiler-options -fPIC -m64 -rdc=true -gencode arch=compute_35,code=sm_35 -O3 -lineinfo -use_fast_math -lcudadevrt -I/cm/shared/apps/MATLAB/extern/include')
system('nvcc -arch=sm_35 -dlink mexCodeCuda.o -o dlink.o')
eval('mex mexCodeCuda.o dlink.o -L'CUDA_LIB_PATH '-lcudart')
It gives the following error :
Error using mex
/usr/bin/ld: dlink.o: relocation R_X86_64_32S against `__nv_module_id' can
not be used when making a shared object; recompile with -fPIC
dlink.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
Can anyone help me ?
Thanks in advance...
A few changes:
Add -fPIC to the second nvcc command (using --compiler-options, just as you did with the first nvcc).
Specify the cudadevrt runtime option on the mex command (-lcudadevrt), just as you have with the first nvcc call.
And you may need to add -fPIC to the mex linking via LDCXXFLAGS or LDFLAGS. Not sure.

Perl/Tk not building via CPAN on OS X Mountain Lion

I can not get Perl/Tk to install via CPAN on OS X Mountain Lion. It errors with an error in a file with which google does not help:
/Users/villadelfia/perl5/perlbrew/perls/perl-5.17.8/bin/perl5.17.8 /Users/villadelfia/perl5/perlbrew/perls/perl-5.17.8/lib/5.17.8/ExtUtils/xsubpp -typemap /Users/villadelfia/perl5/perlbrew/perls/perl-5.17.8/lib/5.17.8/ExtUtils/typemap -typemap /Users/villadelfia/Downloads/Tk-804.030/Tk/typemap IO.xs > IO.xsc && mv IO.xsc IO.c
Warning: Found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section. in IO.xs, line 235
cc -c -I.. -I/usr/X11R6/include -I/usr/local/include/freetype2 -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O3 -DVERSION=\"804.03\" -DXS_VERSION=\"804.03\" "-I/Users/villadelfia/perl5/perlbrew/perls/perl-5.17.8/lib/5.17.8/darwin-2level/CORE" -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__ IO.c
IO.xs:210:10: error: invalid argument type 'void' to unary expression
if (!SvUPGRADE(buf, SVt_PV))
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [IO.o] Error 1
make: *** [subdirs] Error 2
As you can see, I run perlbrew as well.
Any ideas what could cause this?
From the 5.17.7 release notes:
SvUPGRADE() is no longer an expression. Originally this macro (and its
underlying function, sv_upgrade()) were documented as boolean, although
in reality they always croaked on error and never returned false. In 2005
the documentation was updated to specify a void return value, but
SvUPGRADE() was left always returning 1 for backwards compatibility. This
has now been removed, and SvUPGRADE() is now a statement with no return
value.
So this is now a syntax error:
if (!SvUPGRADE(sv)) { croak(...); }
If you have code like that, simply replace it with
SvUPGRADE(sv);
or to to avoid compiler warnings with older perls, possibly
(void)SvUPGRADE(sv);
It has already been reported.

Eclipse/C++ Configuration Issue

I am trying to configure Eclipse/Helios on a Win7/64 Professional with CDT and MinGW. When I try and compile:
#include <iostream>
using namespace std ;
int main() {
cout << "What a lovely day\n" ;
return(0) ;
}
I get the output/error:
make all
Building file: ../SeeProgram.cpp
Invoking: Cross G++ Compiler
C:\Tools\MinGW\bin\g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"SeeProgram.d" -MT"SeeProgram.d" -o"SeeProgram.o" "../SeeProgram.cpp"
/bin/sh: C:ToolsMinGWbing++: command not found
make: *** [SeeProgram.o] Error 127 .
In the next-to-last line, it should have read C:\Tools\MinGW\bin\g++, but it left out the back-slashes. I have not seen any other discussion of this, and have tried numerous approaches, but I am stumped at the moment. Any thoughts?
Many thanks.
Have you tried escaping the backslashes when you enter the location, e.g.:
C:\\Tools\\MingGW\\bin\\g++
This setup seems similar to yours, maybe it could provide a hint:
http://max.berger.name/howto/cdt/ar01s03.jsp#wincompiler