Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

TmbList issue #5

Open
EllenY opened this issue Mar 10, 2016 · 4 comments
Open

TmbList issue #5

EllenY opened this issue Mar 10, 2016 · 4 comments

Comments

@EllenY
Copy link

EllenY commented Mar 10, 2016

I am using the R version installed by IT admin but received another error. Can you make a suggestions? Do I need to change the library location?

Make TMB object

TmbList = Build_TMB_Fn("TmbData"=TmbData, "TmbDir"=TmbDir, "Version"=Version, "VesselConfig"=VesselConfig , "loc_x"=loc_x)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'c:/R2/R/win-library/3.2/SpatialDeltaGLMM/executables/geo_index_v3l.dll':
LoadLibrary failure: The specified module could not be found.
Obj = TmbList[["Obj"]]
Error: object 'TmbList' not found
Thank you,
Ellen

@James-Thorson
Copy link
Contributor

Ellen,

I'm not sure from that output, but I'm guessing that the CPP didn't compile
properly to generate a DLL, which would then have been loaded (hence the
wording of the error). If correct, this might have been caused by you not
having permissions in the directory where R is saving packages.

I have now changed Build_TMB_Fn() to copy the CPP to your working
directory, and compile and link it there (this change also simplifies user
code slightly). Please see the "Example--simple.R" on GitHub for small
changes in syntax for Build_TMB_Fn(). Does this fix the problem?

cheers,
jim

On Thu, Mar 10, 2016 at 1:39 PM, EllenY [email protected] wrote:

I am using the R version installed by IT admin but received another error.
Can you make a suggestions? Do I need to change the library location?
Make TMB object

TmbList = Build_TMB_Fn("TmbData"=TmbData, "TmbDir"=TmbDir,
"Version"=Version, "VesselConfig"=VesselConfig , "loc_x"=loc_x)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object
'c:/R2/R/win-library/3.2/SpatialDeltaGLMM/executables/geo_index_v3l.dll':
LoadLibrary failure: The specified module could not be found.
Obj = TmbList[["Obj"]]
Error: object 'TmbList' not found
Thank you,
Ellen


Reply to this email directly or view it on GitHub
#5.

@EllenY
Copy link
Author

EllenY commented Mar 14, 2016

Hi,

For some reason the new Build_TMB_Fn did not fix the problem.

It appears that R is not able to "compile" (TMB package) .

I tried these two sets of codes, after the #SETTINGS# and prior to the
#PREPARE DATA# sections and got errors from both.

Compile TMB software

TmbDir = system.file("executables", package="SpatialDeltaGLMM")
setwd( TmbDir )
compile(paste(Version,".cpp",sep=""))

Error in compile(paste(Version, ".cpp", sep = "")) : Compilation failed
In addition: Warning message:
running command 'make -f "C:/PROGRA1/R/R-321.2/etc/x64/Makeconf" -f
"C:/PROGRA1/R/R-321.2/share/make/winshlib.mk" -f
"C:\Users\ELLEN~1.YAS\AppData\Local\Temp\Rtmp2TN9vU\file134a036286463"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="geo_index_v3l.dll" WIN=64 TCLBIN=64 OBJECTS="geo_index_v3l.o"' had
status 127

and
2)

file.copy( from=paste0(TmbDir,"/",Version,".cpp"),
to=paste0(RunDir,"/",Version,".cpp"), overwrite=FALSE)
[1] FALSE
setwd( RunDir )
compile( paste(Version,".cpp",sep="") )

Error in compile(paste(Version, ".cpp", sep = "")) : Compilation failed
In addition: Warning message:
running command 'make -f "C:/PROGRA1/R/R-321.2/etc/x64/Makeconf" -f
"C:/PROGRA1/R/R-321.2/share/make/winshlib.mk" -f
"C:\Users\ELLEN~1.YAS\AppData\Local\Temp\Rtmp2TN9vU\file134a049d52c6c"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="geo_index_v3l.dll" WIN=64 TCLBIN=64 OBJECTS="geo_index_v3l.o"' had
status 127

There is also an error when trying to make the TMB Object.

TmbList = Build_TMB_Fn("TmbData"=TmbData, "TmbDir"=TmbDir,
"Version"=Version, "VesselConfig"=VesselConfig , "loc_x"=loc_x)

Error in compile(paste(Version, ".cpp", sep = "")) : Compilation failed
In addition: Warning message:
running command 'make -f "C:/PROGRA1/R/R-311.1/etc/x64/Makeconf" -f
"C:/PROGRA1/R/R-311.1/share/make/winshlib.mk" -f
"C:\Users\ELLEN~1.YAS\AppData\Local\Temp\RtmpIXdHCD\file2cf6418f822b7"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="geo_index_v3l.dll" WIN=64 TCLBIN=64 OBJECTS="geo_index_v3l.o"' had
status 127

Obj = TmbList[["Obj"]]
Error: object 'TmbList' not found

and

TmbData = Data_Fn("Version"=Version, "FieldConfig"=FieldConfig,
"ObsModel"=ObsModel, "b_i"=Data_Geostat[,'Catch_KG'],
"a_i"=Data_Geostat[,'AreaSwept_km2'],
"v_i"=as.numeric(Data_Geostat[,'Vessel'])-1,
"s_i"=Data_Geostat[,'knot_i']-1,
"t_i"=Data_Geostat[,'Year']-min(Data_Geostat[,'Year']), "a_xl"=a_xl,
"MeshList"=MeshList )
TmbList = Build_TMB_Fn("TmbData"=TmbData, "RunDir"=DateFile,
"Version"=Version, "VesselConfig"=VesselConfig, "loc_x"=loc_x)
Error in compile(paste(Version, ".cpp", sep = "")) : Compilation failed
In addition: Warning message:
running command 'make -f "C:/PROGRA1/R/R-311.1/etc/x64/Makeconf" -f
"C:/PROGRA1/R/R-311.1/share/make/winshlib.mk" -f
"C:\Users\ELLEN~1.YAS\AppData\Local\Temp\RtmpIXdHCD\file2cf6419fa4fb7"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="geo_index_v3l.dll" WIN=64 TCLBIN=64 OBJECTS="geo_index_v3l.o"' had
status 127
Obj = TmbList[["Obj"]]
Error: object 'TmbList' not found

Tomorrow I will ask a few colleagues in the office but I appreciate any
feedback.

Ellen

The contents of this message are mine personally and do not necessarily
reflect any position of NOAA
Ellen Yasumiishi, PhD, Research Fishery Biologist
Ecosystem Monitoring and Assessment Program
NOAA/AFSC/ABL, Ted Stevens Marine Research Institute
17109 Point Lena Loop Rd., Juneau, AK  99801 USA
tel. 907-789-6604  fax. 907-789-6094

http://www.afsc.noaa.gov/ABL/staff/ablProfile_EMartinsonYasumiishi.htm
https://www.researchgate.net/profile/Ellen_Yasumiishi

On Sat, Mar 12, 2016 at 9:14 PM, Jim Thorson <[email protected]>
wrote:

> Ellen,
>
> I'm not sure from that output, but I'm guessing that the CPP didn't compile
> properly to generate a DLL, which would then have been loaded (hence the
> wording of the error). If correct, this might have been caused by you not
> having permissions in the directory where R is saving packages.
>
> I have now changed Build_TMB_Fn() to copy the CPP to your working
> directory, and compile and link it there (this change also simplifies user
> code slightly). Please see the "Example--simple.R" on GitHub for small
> changes in syntax for Build_TMB_Fn(). Does this fix the problem?
>
> cheers,
> jim
>
> On Thu, Mar 10, 2016 at 1:39 PM, EllenY <[email protected]> wrote:
>
> > I am using the R version installed by IT admin but received another
> error.
> > Can you make a suggestions? Do I need to change the library location?
> > Make TMB object
> >
> > TmbList = Build_TMB_Fn("TmbData"=TmbData, "TmbDir"=TmbDir,
> > "Version"=Version, "VesselConfig"=VesselConfig , "loc_x"=loc_x)
> > Error in inDL(x, as.logical(local), as.logical(now), ...) :
> > unable to load shared object
> > 'c:/R2/R/win-library/3.2/SpatialDeltaGLMM/executables/geo_index_v3l.dll':
> > LoadLibrary failure: The specified module could not be found.
> > Obj = TmbList[["Obj"]]
> > Error: object 'TmbList' not found
> > Thank you,
> > Ellen
> >
> > —
> > Reply to this email directly or view it on GitHub
> > <https://github.com/nwfsc-assess/geostatistical_delta-GLMM/issues/5>.
> >
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nwfsc-assess/geostatistical_delta-GLMM/issues/5#issuecomment-195888418>
> .
>

@jin-gao
Copy link

jin-gao commented Mar 15, 2016

What about Rtools? It also needs to be installed with admin right. It looks like something wrong with 'make'.

@James-Thorson
Copy link
Contributor

Yeah, this is a problem with the installation of TMB. I recommend making
sure that TMB is installed correctly prior to using the SpatialDeltaGLMM
package.

cheers
jim

On Wed, Mar 16, 2016 at 11:45 AM, Jin Gao [email protected] wrote:

What about Rtools? It also needs to be installed with admin right. It
looks like something wrong with 'make'.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#5 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants