bnosac / doc2vec

Distributed Representations of Sentences and Documents
Other
46 stars 5 forks source link

posix_memalign #1

Closed jwijffels closed 3 years ago

jwijffels commented 3 years ago

fix posix_memalign for windows, solaris (look to similar setup on crfsuite) make sure memory is released

jwijffels commented 3 years ago

Solaris on rhub:

Running `R CMD build`...
* checking for file ‘/export/home/XIzQP5G/Rtemp/RtmpHyw2lD/remotes56e92eaf6ff2/doc2vec/DESCRIPTION’ ... OK
* preparing ‘doc2vec’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘doc2vec_0.1.0.tar.gz’
Installing package into ‘/export/home/XIzQP5G/R’
(as ‘lib’ is unspecified)
* installing *source* package ‘doc2vec’ ...
** using staged installation
** libs
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XIzQP5G/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/Doc2Vec.cpp -o doc2vec/Doc2Vec.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XIzQP5G/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/NN.cpp -o doc2vec/NN.o
doc2vec/NN.cpp: In constructor ‘NN::NN(long long int, long long int, long long int, int, int)’:
doc2vec/NN.cpp:13:91: error: ‘posix_memalign’ was not declared in this scope
   a = posix_memalign((void **)&m_syn0, 128, (long long)m_vocab_size * m_dim * sizeof(real));
                                                                                           ^
doc2vec/NN.cpp: In member function ‘void NN::load(std::FILE*)’:
doc2vec/NN.cpp:69:87: error: ‘posix_memalign’ was not declared in this scope
   posix_memalign((void **)&m_syn0, 128, (long long)m_vocab_size * m_dim * sizeof(real));
                                                                                       ^
doc2vec/NN.cpp: In member function ‘void NN::norm()’:
doc2vec/NN.cpp:92:91: error: ‘posix_memalign’ was not declared in this scope
   posix_memalign((void **)&m_syn0norm, 128, (long long)m_vocab_size * m_dim * sizeof(real));
                                                                                           ^
gmake: *** [/opt/csw/lib/R/etc/Makeconf:181: doc2vec/NN.o] Error 1
ERROR: compilation failed for package ‘doc2vec’
* removing ‘/export/home/XIzQP5G/R/doc2vec’
Warning message:
In i.p(...) :
  installation of package ‘/export/home/XIzQP5G/Rtemp/RtmpHyw2lD/file56e9595a59a8/doc2vec_0.1.0.tar.gz’ had non-zero exit status
jwijffels commented 3 years ago

See https://github.com/bnosac/crfsuite/commit/3ea41945bc3772f674d7ca0a8109c72745445fe0

jwijffels commented 3 years ago

Solaris 1

Running `R CMD build`...
* checking for file ‘/export/home/XYrzqz3/Rtemp/RtmpaYhm3W/remotes45483bdb966/doc2vec/DESCRIPTION’ ... OK
* preparing ‘doc2vec’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘doc2vec_0.1.0.tar.gz’
Installing package into ‘/export/home/XYrzqz3/R’
(as ‘lib’ is unspecified)
* installing *source* package ‘doc2vec’ ...
** using staged installation
** libs
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/Doc2Vec.cpp -o doc2vec/Doc2Vec.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/NN.cpp -o doc2vec/NN.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/TaggedBrownCorpus.cpp -o doc2vec/TaggedBrownCorpus.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/TrainModelThread.cpp -o doc2vec/TrainModelThread.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/Vocab.cpp -o doc2vec/Vocab.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c doc2vec/WMD.cpp -o doc2vec/WMD.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c rcpp_doc2vec.cpp -o rcpp_doc2vec.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -I"/opt/csw/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XYrzqz3/R/Rcpp/include' -I/opt/csw/include   -fPIC  -O2 -pipe -fno-omit-frame-pointer -m32 -march=pentiumpro  -c RcppExports.cpp -o RcppExports.o
/opt/csw/bin/g++-5.5 -std=gnu++11 -shared -m32 -march=pentiumpro -L/opt/csw/lib -o doc2vec.so doc2vec/Doc2Vec.o doc2vec/NN.o doc2vec/TaggedBrownCorpus.o doc2vec/TrainModelThread.o doc2vec/Vocab.o doc2vec/WMD.o rcpp_doc2vec.o RcppExports.o -pthread
rm -f doc2vec/Doc2Vec.o doc2vec/NN.o doc2vec/TaggedBrownCorpus.o doc2vec/TrainModelThread.o doc2vec/Vocab.o doc2vec/WMD.o rcpp_doc2vec.o RcppExports.o 
installing to /export/home/XYrzqz3/R/00LOCK-doc2vec/00new/doc2vec/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* creating tarball
packaged installation of ‘doc2vec’ as ‘doc2vec_0.1.0_R_i386-pc-solaris2.10.tar.gz’
* DONE (doc2vec)
> 
> 
>>>>>============== Running R CMD check
* using log directory ‘/export/home/XYrzqz3/doc2vec.Rcheck’
* using R version 4.0.3 (2020-10-10)
* using platform: i386-pc-solaris2.10 (32-bit)
* using session charset: UTF-8
* checking for file ‘doc2vec/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘doc2vec’ version ‘0.1.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘doc2vec’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking include directives in Makefiles ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking PDF version of manual ... OK
* DONE

Status: OK

Solaris 2

* installing *source* package ‘doc2vec’ ...
** using staged installation
** libs
/opt/developerstudio12.6/bin/CC -std=c++11 -library=stdcpp,CrunG3  -I"/opt/R/R-4.0.3/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I./doc2vec  -I'/export/home/XyweDvg/R/Rcpp/include' -I/opt/csw/include   -KPIC  -O -xlibmil -xtarget=native -xcache=generic -nofstore  -c doc2vec/Doc2Vec.cpp -o doc2vec/Doc2Vec.o
CC: Warning: Option -pthread passed to ld, if ld is invoked, ignored otherwise
"doc2vec/Doc2Vec.h", line 27: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 27: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 36: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 37: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 38: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 42: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 43: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 44: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 44: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 44: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 45: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 45: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 45: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 54: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 67: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 68: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 73: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 75: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 84: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/Doc2Vec.h", line 87: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/NN.h", line 18: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/NN.h", line 21: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/WMD.h", line 19: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/WMD.h", line 30: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
"doc2vec/WMD.h", line 31: Error: The name real is ambiguous, real and _Tp std::real<_Tp>(const complex<_Tp>&).
Compilation aborted, too many Error messages.
gmake: *** [/opt/R/R-4.0.3/lib/R/etc/Makeconf:181: doc2vec/Doc2Vec.o] Error 2
ERROR: compilation failed for package ‘doc2vec’
* removing ‘/export/home/XyweDvg/R/doc2vec’
* restoring previous ‘/export/home/XyweDvg/R/doc2vec’