stewid / SimInf

A framework for data-driven stochastic disease spread simulations
GNU General Public License v3.0
32 stars 14 forks source link

SimInf Error #37

Closed JNAKATO closed 3 years ago

JNAKATO commented 3 years ago

Error: "C:/rtools40/mingw64/bin/"gcc -I"C:/R/R/R-41~1.0/include" -DNDEBUG -I"C:/R/R/R-4.1.0/library/SimInf/include" -DSIMINF_MODEL_RUN=run_249c247652b7 -DSIMINF_R_INIT=R_init_SimInf_249c247652b7 -DSIMINF_FORCE_SYMBOLS=FALSE -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c C:/Users/HP840G~1/AppData/Local/Temp/RtmpGi9NPi/SimInf_249c247652b7.c -o C:/Users/HP840G~1/AppData/Local/Temp/RtmpGi9NPi/SimInf_249c247652b7.osh: line 6: tmp.def: No such file or directorysh: line 7: tmp.def: No such file or directoryC:/rtools40/mingw64/bin/gcc -shared -s -static-libgcc -o C:/Users/HP840G~1/AppData/Local/Temp/RtmpGi9NPi/SimInf_249c247652b7.dll tmp.def C:/Users/HP840G~1/AppData/Local/Temp/RtmpGi9NPi/SimInf_249c247652b7.o -LC:/R/R/R-41~1.0/bin/x64 -lRgcc.exe: error: tmp.def: No such file or directory ###I HAVE FAILED TO GET THIS PACKAGE UP AND RUNNING. THAT IS THE ERROR AM CONTINUOUSLY GETTING

stewid commented 3 years ago

Hi @JNAKATO Could you please provide an example off the code you are running to get the error?

JNAKATO commented 3 years ago

install.packages('SimInf') library(SimInf)

specify variables

N<-500 I0<-1 B<-0.5 tspan<-seq(from=1,t=30,by= 1)

Commands for performing the simulations

parms<- c(beta=B) initial_state<-data.frame(S=N-I0,I=I0) compartments<- c('S','I') transitions<- c('S -> betaSI/(S+I) -> I') getwd()

model<- mparse(transitions = transitions,compartments = compartments,gdata = parms,u0 = initial_state,tspan = tspan) out<-run(model = model ,threads = 1) plot(out)

trosendal commented 3 years ago

@JNAKATO Hi! Your C code in the transitions seems to be invalid. I guess you want to multiply the S and I compartments with the beta parameter? like this:

transitions<- c('S -> beta*S*I/(S+I) -> I')

That should work

JNAKATO commented 3 years ago

I still get the same error. I was only able to run the model using another computer

stewid commented 3 years ago

@JNAKATO Does it work if you put Rtools on the path using the instructions from https://cran.r-project.org/bin/windows/Rtools/ and run the following in R

writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")

and then restart R?

JNAKATO commented 3 years ago

I have tried that several times . I also reinstalled by R and Rtools but i was still getting the same error

stewid commented 3 years ago

I will close this issue since I think it is related to configuring Rtools and not directly an issue with SimInf. However, do not hesitate to re-open the issue if you you have more information or if there is anything in SimInf that can be changed to fix this.

JNAKATO commented 3 years ago

Its alright. Thank you


From: Stefan Widgren @.> Sent: Sunday, September 19, 2021 12:09 PM To: stewid/SimInf @.> Cc: JNAKATO @.>; Mention @.> Subject: Re: [stewid/SimInf] SimInf Error (#37)

I will close this issue since I think it is related to configuring Rtools and not directly an issue with SimInf. However, do not hesitate to re-open the issue if you you have more information or if there is anything in SimInf that can be changed to fix this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/stewid/SimInf/issues/37#issuecomment-922463581, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AU5O7X5AUNOQNFBLTL5XSLTUCXHIRANCNFSM5AXWOQIQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.