Comments (8)
Based on the traceback, this appears to be an error in lpSolveAPI::set.objfn()
. I don't think we can do anything about it. Perhaps we can capture the problematic inputs, confirm that the error is reproducible, and report a bug to the lpSolveAPI
developers?
from ergm.
Something like this could be used to capture the inputs, I think:
trace(ergm:::mple.existence, quote(save(list=ls(), file="existence_dump.rda")))
from ergm.
@krivit I guess this was my fault: considering that lpSolveAPI
code comment, I added this patch:
--- inst/include/lp_types.h 2023-11-28 22:11:24
+++ inst/include/lp_types.h 2023-12-07 12:33:22
@@ -74,7 +74,11 @@
#define CHAR_BIT 8
#endif
#ifndef MYBOOL
- #define MYBOOL unsigned char /* Conserve memory, could be unsigned int */
+ #if defined(__APPLE__) && defined(__ppc__)
+ #define MYBOOL unsigned int /* Darwin ppc 32-bit ABI */
+ #else
+ #define MYBOOL unsigned char /* Conserve memory, could be unsigned int */
+ #endif
#endif
However, apparently, the comment is inaccurate, and int
does not work. Dropping the patch fixes the problem with running broom
tests, everything passes cleanly now:
---> Testing R-broom
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-broom/R-broom/work/broom" && /opt/local/bin/R CMD check ./broom_1.0.6.tar.gz --no-manual --no-build-vignettes
* using log directory ‘/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_R_R-broom/R-broom/work/broom/broom.Rcheck’
* using R version 4.4.1 (2024-06-14)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
gcc-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
GNU Fortran (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘broom/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘broom’ version ‘1.0.6’
* 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 ‘broom’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ 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 code 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 whether startup messages can be suppressed ... 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 R/sysdata.rda ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘spelling.R’
Running ‘test-all.R’
OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ...
‘adding-tidiers.Rmd’ using ‘UTF-8’... OK
‘available-methods.Rmd’ using ‘UTF-8’... OK
‘bootstrapping.Rmd’ using ‘UTF-8’... OK
‘broom.Rmd’ using ‘UTF-8’... OK
‘broom_and_dplyr.Rmd’ using ‘UTF-8’... OK
‘kmeans.Rmd’ using ‘UTF-8’... OK
OK
* checking re-building of vignette outputs ... SKIPPED
* DONE
Status: OK
Thank you very much for pointing to lpSolveAPI
!
from ergm.
All tests and examples pass on our end. I suspect some non-standard OS configuration or/and issues with R installation maybe?
from ergm.
@mbojan Thank you for responding!
This is a “non-standard OS”, but the failure is untypical if not unique, and bus error usually suggests a bug in the code. Generally speaking, everything C/C++/Fortran must work, with sole exception of packages heavily relying on Apple SDK features (there are very few such packages; consider ps
).
(For the context, we have about 5000 R
packages in MacPorts, and I run tests wherever they are provided: normally everything works fine on the same OS.)
Could anything in ergm
assume little-endian platform without checking or 64-bitness? From the error message, apparently alignment gets wrong.
from ergm.
Thanks @barracuda156 . I don't think we've had this kind of problems before, and CRAN grinds the C code in the packages quite finely.
Any ideas @krivit ?
from ergm.
CRAN has no checks for Big-endian (not even 64-bit BSD or Linux) and no checks for 32-bit platforms (AFAIK, not even i386). So it is of no help to detect any issues which are specific to either.
malloc
errors may happen due to C++ runtime conflicts (GCC uses its own libstdc++
, while OS has its own older library), that is a familiar issue, but I think we handle it pretty well for R
-related stuff. At least I do not see malloc
issues normally.
Another reason may be allocating something beyond 32-bit address space (but that would be a bug, it should not be happening).
However malloc
aside, bus error with a wrong alignment rather suggests that something is wrong with the code. Standard reasons are wrong endianness, assumed 64-bitness and one obscure one – wrong size of bool/spinlock (both are 4 byte in Darwin ppc ABI).
If neither of these are likely to apply, then perhaps more debugging is needed. I do not know the code here: do we know what is supposed to be executed around the time of failure?
from ergm.
@krivit Thank you, this is helpful. I will look into lpSolveAPI
.
from ergm.
Related Issues (20)
- ergm() misinterprets a dyad-dependent hint as a dyad-dependent sample-space constraint.
- In missing data MLE, ergm.estimate()'s Hessian based on the original matrices can be non-SPD, if the Hummel step length < 1.
- A scale for proposal and hint "scores"?
- I'm trying to construct a valued ERGM model using `ergm.count`, but the runtime is excessively long.
- Error installing ergm due to lpSolveAPI compilation error HOT 1
- Augment auxiliaries API to enable "eager" evaluation.
- Using an offset together with the Godambe information for the MPLE does not work HOT 3
- levels2 error in nodemix when levels are named HOT 2
- GOF documentation for bipartite networks
- Dyadic attributes and graph manipulation HOT 6
- edgecov() and dyadcov() should check that the covariate matrix is of the correct dimension.
- Consider calling glm.fit() instead of glm() HOT 1
- Optional MPLE existence check? HOT 1
- search.ergmTerms behavior -- returns bipartite terms for non-bipartite network HOT 6
- fixedas(present, absent) constraint does not actually ensure edges are present or absent. HOT 5
- Dropped terms appear to result in the estimated log-likelihood being NaN. HOT 7
- After dropping extreme values, MPLE and MLE likelihoods report different numbers of observations.
- ergm uses a non-API call SET_TYPEOF().
- 'ergm' and everything LinkingTo ergm should work with STRICT_R_HEADERS=1.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ergm.