hallowkm / RxODE

RxODE is an R package that facilitates easy simulations in R
20 stars 13 forks source link

Error when compiling over local network #7

Open haessar opened 8 years ago

haessar commented 8 years ago

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

wwang-at-github commented 8 years ago

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar notifications@github.com wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

haessar commented 8 years ago

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github notifications@github.com wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar notifications@github.com wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250477043, or mute the thread https://github.com/notifications/unsubscribe-auth/ALaIXdcckRUmwWk6VJNT-0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

wwang-at-github commented 8 years ago

I do not see the error msg. Is it blocked by gmail or somehow lost?

On Thu, Sep 29, 2016 at 11:05 AM, haessar notifications@github.com wrote:

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github notifications@github.com wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar notifications@github.com wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250477043, or mute the thread https://github.com/notifications/unsubscribe-auth/ALaIXdcckRUmwWk6VJNT- 0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250493683, or mute the thread https://github.com/notifications/unsubscribe-auth/AMdZdqN6avKIcpmebNPlhGp9oRsaxgouks5qu9OwgaJpZM4KImEc .

haessar commented 8 years ago

Must have been blocked. I've copied the text:

gcc -m64 -I"C:/PROGRA~1/R/R-31~1.3/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c //BAST_SYS2/Users/Public/run105.d/call_dvode.c -o //BAST_SYS2/Users/Public/run105.d/call_dvode.o //BAST_SYS2/Users/Public/run105.d/call_dvode.c:5:20: fatal error: dop853.h: No such file or directory compilation terminated. make: *\ [//BAST_SYS2/Users/Public/run105.d/call_dvode.o] Error 1 Warning message: running command 'make -f "C:/PROGRA~1/R/R-31~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-31~1.3/share/make/winshlib.mk" -f "C:/Users/Will/Documents/.R/Makevars" SHLIB="//BAST_SYS2/Users/Public/run105.d/run105.dll" PKG_LIBS='-LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' WIN=64 TCLBIN=64 OBJECTS="//BAST_SYS2/Users/Public/run105.d/run105.o //BAST_SYS2/Users/Public/run105.d/call_dvode.o"' had status 2 Error in cmpMgr$compile() : error loading dll file //BAST_SYS2/Users/Public/run105.d/run105.dll In addition: Warning message: running command 'C:/PROGRA~1/R/R-31~1.3/bin/R CMD SHLIB //BAST_SYS2/Users/Public/run105.d/run105.c //BAST_SYS2/Users/Public/run105.d/call_dvode.o -LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' had status 1

On 29 September 2016 at 16:15, wwang-at-github notifications@github.com wrote:

I do not see the error msg. Is it blocked by gmail or somehow lost?

On Thu, Sep 29, 2016 at 11:05 AM, haessar notifications@github.com wrote:

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github <notifications@github.com

wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar notifications@github.com wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250477043, or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXdcckRUmwWk6VJNT- 0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250493683, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdqN6avKIcpmebNPlhGp9oRsaxgouks5qu9OwgaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250496684, or mute the thread https://github.com/notifications/unsubscribe-auth/ALaIXeEONtncny5AhfBirEz3_yHVT9BCks5qu9YrgaJpZM4KImEc .

wwang-at-github commented 8 years ago

could you copy the contents of Makevars generated by RxODE? there should be an "-I" option for the RxODE includes files (mine is: -I/home/wangwez/R/x86_64-redhat-linux-gnu-library/3.3/RxODE/include). your gcc cannot find the header without the proper "-I" option.

On Thu, Sep 29, 2016 at 11:35 AM, haessar notifications@github.com wrote:

Must have been blocked. I've copied the text:

gcc -m64 -I"C:/PROGRA~1/R/R-31~1.3/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c //BAST_SYS2/Users/Public/run105.d/call_dvode.c -o //BAST_SYS2/Users/Public/run105.d/call_dvode.o //BAST_SYS2/Users/Public/run105.d/call_dvode.c:5:20: fatal error: dop853.h: No such file or directory compilation terminated. make: *\ [//BAST_SYS2/Users/Public/run105.d/call_dvode.o] Error 1 Warning message: running command 'make -f "C:/PROGRA~1/R/R-31~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-31~1.3/share/make/winshlib.mk" -f "C:/Users/Will/Documents/.R/Makevars" SHLIB="//BAST_SYS2/Users/Public/run105.d/run105.dll" PKG_LIBS='-LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' WIN=64 TCLBIN=64 OBJECTS="//BAST_SYS2/Users/Public/run105.d/run105.o //BAST_SYS2/Users/Public/run105.d/call_dvode.o"' had status 2 Error in cmpMgr$compile() : error loading dll file //BAST_SYS2/Users/Public/run105.d/run105.dll In addition: Warning message: running command 'C:/PROGRA~1/R/R-31~1.3/bin/R CMD SHLIB //BAST_SYS2/Users/Public/run105.d/run105.c //BAST_SYS2/Users/Public/run105.d/call_dvode.o -LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' had status 1

On 29 September 2016 at 16:15, wwang-at-github notifications@github.com wrote:

I do not see the error msg. Is it blocked by gmail or somehow lost?

On Thu, Sep 29, 2016 at 11:05 AM, haessar notifications@github.com wrote:

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github < notifications@github.com

wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar notifications@github.com wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250477043, or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXdcckRUmwWk6VJNT- 0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250493683, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdqN6avKIcpmebNPlhGp9oRsaxgouks5qu9OwgaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250496684, or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXeEONtncny5AhfBirEz3_yHVT9BCks5qu9YrgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250502398, or mute the thread https://github.com/notifications/unsubscribe-auth/AMdZdscESj0CO2bmij0wb-abmIfGub9-ks5qu9q0gaJpZM4KImEc .

haessar commented 8 years ago

This was the analysis of my colleague:

Problem: On a windows machine, when calling the function RxODE::RxODE, if the working directory (of R, not the argument wd) has a UNC path, then the function errors during the compilation step.

Reason: In the compile function built by RxODE::rx.initCmpMgr, a Makevars file is written to include headers from the RxODE package (dop853.h). The Makevars is written in the working directory of R. Then the system function is called in R to open CMD.EXE and compile the c code. The CMD.EXE should normally inherit the working directory from R, but when this is a UNC path it fails to inherit and prints:

                            '\\Blah\blah\blah'

                CMD.EXE was started with the above path as the current

directory.

                UNC paths are not supported.  Defaulting to Windows

directory.

Now the current directory of CMD.EXE is not the directory where the Makevars is located, therefore during compilation the Makevars is not used, and subsequently the header dop853.h (called in call_dvode.c ) cannot be found.

On 29 September 2016 at 16:50, wwang-at-github notifications@github.com wrote:

could you copy the contents of Makevars generated by RxODE? there should be an "-I" option for the RxODE includes files (mine is: -I/home/wangwez/R/x86_64-redhat-linux-gnu-library/3.3/RxODE/include). your gcc cannot find the header without the proper "-I" option.

On Thu, Sep 29, 2016 at 11:35 AM, haessar notifications@github.com wrote:

Must have been blocked. I've copied the text:

gcc -m64 -I"C:/PROGRA~1/R/R-31~1.3/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c //BAST_SYS2/Users/Public/ run105.d/call_dvode.c -o //BAST_SYS2/Users/Public/run105.d/call_dvode.o //BAST_SYS2/Users/Public/run105.d/call_dvode.c:5:20: fatal error: dop853.h: No such file or directory compilation terminated. make: *\ [//BAST_SYS2/Users/Public/run105.d/call_dvode.o] Error 1 Warning message: running command 'make -f "C:/PROGRA~1/R/R-31~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-31~1.3/share/make/winshlib.mk" -f "C:/Users/Will/Documents/.R/Makevars" SHLIB="//BAST_SYS2/Users/Public/run105.d/run105.dll" PKG_LIBS='-LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' WIN=64 TCLBIN=64 OBJECTS="//BAST_SYS2/Users/Public/run105.d/run105.o //BAST_SYS2/Users/Public/run105.d/call_dvode.o"' had status 2 Error in cmpMgr$compile() : error loading dll file //BAST_SYS2/Users/Public/run105.d/run105.dll In addition: Warning message: running command 'C:/PROGRA~1/R/R-31~1.3/bin/R CMD SHLIB //BAST_SYS2/Users/Public/run105.d/run105.c //BAST_SYS2/Users/Public/run105.d/call_dvode.o -LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' had status 1

On 29 September 2016 at 16:15, wwang-at-github <notifications@github.com

wrote:

I do not see the error msg. Is it blocked by gmail or somehow lost?

On Thu, Sep 29, 2016 at 11:05 AM, haessar notifications@github.com wrote:

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github < notifications@github.com

wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar <notifications@github.com

wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/hallowkm/RxODE/issues/7#issuecomment-250477043 , or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXdcckRUmwWk6VJNT- 0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250493683, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdqN6avKIcpmebNPlhGp9oRsaxgouks5qu9OwgaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250496684, or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXeEONtncny5AhfBirEz3_yHVT9BCks5qu9YrgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250502398, or mute the thread https://github.com/notifications/unsubscribe- auth/AMdZdscESj0CO2bmij0wb-abmIfGub9-ks5qu9q0gaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250506930, or mute the thread https://github.com/notifications/unsubscribe-auth/ALaIXY2lqKI94bNzl3vuG4QRoVPVBrFVks5qu942gaJpZM4KImEc .

haessar commented 8 years ago

What we have done as a work around is create a wrapper function around the RxODE function, which briefly calls setwd() to set to a local directory before calling RxODE(), such as this:

RxODEwrap <- function (model, modName = basename(wd), wd = getwd(), filename = NULL,

            do.compile = TRUE, ...)

{

            realwd <- getwd()

            setwd( Sys.getenv('HOME') )

                            ret <- RxODE(model, modName, wd, filename,

do.compile, ...)

            setwd(realwd)

            return(ret)

}

We would suggest incorporating such functionality within the RxODE function, so that it can ensure that the Makevars file is searched for on the correct system.

Thanks,

Will

On 30 September 2016 at 16:32, William Haese-Hill wahhill@gmail.com wrote:

This was the analysis of my colleague:

Problem: On a windows machine, when calling the function RxODE::RxODE, if the working directory (of R, not the argument wd) has a UNC path, then the function errors during the compilation step.

Reason: In the compile function built by RxODE::rx.initCmpMgr, a Makevars file is written to include headers from the RxODE package (dop853.h). The Makevars is written in the working directory of R. Then the system function is called in R to open CMD.EXE and compile the c code. The CMD.EXE should normally inherit the working directory from R, but when this is a UNC path it fails to inherit and prints:

                            '\\Blah\blah\blah'

                CMD.EXE was started with the above path as the current

directory.

                UNC paths are not supported.  Defaulting to Windows

directory.

Now the current directory of CMD.EXE is not the directory where the Makevars is located, therefore during compilation the Makevars is not used, and subsequently the header dop853.h (called in call_dvode.c ) cannot be found.

On 29 September 2016 at 16:50, wwang-at-github notifications@github.com wrote:

could you copy the contents of Makevars generated by RxODE? there should be an "-I" option for the RxODE includes files (mine is: -I/home/wangwez/R/x86_64-redhat-linux-gnu-library/3.3/RxODE/include). your gcc cannot find the header without the proper "-I" option.

On Thu, Sep 29, 2016 at 11:35 AM, haessar notifications@github.com wrote:

Must have been blocked. I've copied the text:

gcc -m64 -I"C:/PROGRA~1/R/R-31~1.3/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c //BAST_SYS2/Users/Public/run10 5.d/call_dvode.c -o //BAST_SYS2/Users/Public/run105.d/call_dvode.o //BAST_SYS2/Users/Public/run105.d/call_dvode.c:5:20: fatal error: dop853.h: No such file or directory compilation terminated. make: *\ [//BAST_SYS2/Users/Public/run105.d/call_dvode.o] Error 1 Warning message: running command 'make -f "C:/PROGRA~1/R/R-31~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-31~1.3/share/make/winshlib.mk" -f "C:/Users/Will/Documents/.R/Makevars" SHLIB="//BAST_SYS2/Users/Public/run105.d/run105.dll" PKG_LIBS='-LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' WIN=64 TCLBIN=64 OBJECTS="//BAST_SYS2/Users/Public/run105.d/run105.o //BAST_SYS2/Users/Public/run105.d/call_dvode.o"' had status 2 Error in cmpMgr$compile() : error loading dll file //BAST_SYS2/Users/Public/run105.d/run105.dll In addition: Warning message: running command 'C:/PROGRA~1/R/R-31~1.3/bin/R CMD SHLIB //BAST_SYS2/Users/Public/run105.d/run105.c //BAST_SYS2/Users/Public/run105.d/call_dvode.o -LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' had status 1

On 29 September 2016 at 16:15, wwang-at-github < notifications@github.com> wrote:

I do not see the error msg. Is it blocked by gmail or somehow lost?

On Thu, Sep 29, 2016 at 11:05 AM, haessar notifications@github.com wrote:

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github < notifications@github.com

wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar < notifications@github.com> wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250 477043, or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXdcckRUmwWk6VJNT- 0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/hallowkm/RxODE/issues/7#issuecomment-250493683 , or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdqN6avKIcpmebNPlhGp9oRsaxgouks5qu9OwgaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250496684, or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXeEONtncny5AhfBirEz3_yHVT9BCks5qu9YrgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250502398, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdscESj0CO2bmij0wb-abmIfGub9-ks5qu9q0gaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250506930, or mute the thread https://github.com/notifications/unsubscribe-auth/ALaIXY2lqKI94bNzl3vuG4QRoVPVBrFVks5qu942gaJpZM4KImEc .

wwang-at-github commented 8 years ago

great analysis. now how to fix this?

On Fri, Sep 30, 2016 at 11:35 AM, haessar notifications@github.com wrote:

What we have done as a work around is create a wrapper function around the RxODE function, which briefly calls setwd() to set to a local directory before calling RxODE(), such as this:

RxODEwrap <- function (model, modName = basename(wd), wd = getwd(), filename = NULL,

do.compile = TRUE, ...)

{

realwd <- getwd()

setwd( Sys.getenv('HOME') )

ret <- RxODE(model, modName, wd, filename, do.compile, ...)

setwd(realwd)

return(ret)

}

We would suggest incorporating such functionality within the RxODE function, so that it can ensure that the Makevars file is searched for on the correct system.

Thanks,

Will

On 30 September 2016 at 16:32, William Haese-Hill wahhill@gmail.com wrote:

This was the analysis of my colleague:

Problem: On a windows machine, when calling the function RxODE::RxODE, if the working directory (of R, not the argument wd) has a UNC path, then the function errors during the compilation step.

Reason: In the compile function built by RxODE::rx.initCmpMgr, a Makevars file is written to include headers from the RxODE package (dop853.h). The Makevars is written in the working directory of R. Then the system function is called in R to open CMD.EXE and compile the c code. The CMD.EXE should normally inherit the working directory from R, but when this is a UNC path it fails to inherit and prints:

'\Blah\blah\blah'

CMD.EXE was started with the above path as the current directory.

UNC paths are not supported. Defaulting to Windows directory.

Now the current directory of CMD.EXE is not the directory where the Makevars is located, therefore during compilation the Makevars is not used, and subsequently the header dop853.h (called in call_dvode.c ) cannot be found.

On 29 September 2016 at 16:50, wwang-at-github <notifications@github.com

wrote:

could you copy the contents of Makevars generated by RxODE? there should be an "-I" option for the RxODE includes files (mine is: -I/home/wangwez/R/x86_64-redhat-linux-gnu-library/3.3/ RxODE/include). your gcc cannot find the header without the proper "-I" option.

On Thu, Sep 29, 2016 at 11:35 AM, haessar notifications@github.com wrote:

Must have been blocked. I've copied the text:

gcc -m64 -I"C:/PROGRA~1/R/R-31~1.3/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c //BAST_SYS2/Users/Public/run10 5.d/call_dvode.c -o //BAST_SYS2/Users/Public/run105.d/call_dvode.o //BAST_SYS2/Users/Public/run105.d/call_dvode.c:5:20: fatal error: dop853.h: No such file or directory compilation terminated. make: *\ [//BAST_SYS2/Users/Public/run105.d/call_dvode.o] Error 1 Warning message: running command 'make -f "C:/PROGRA~1/R/R-31~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-31~1.3/share/make/winshlib.mk" -f "C:/Users/Will/Documents/.R/Makevars" SHLIB="//BAST_SYS2/Users/Public/run105.d/run105.dll" PKG_LIBS='-LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' WIN=64 TCLBIN=64 OBJECTS="//BAST_SYS2/Users/Public/run105.d/run105.o //BAST_SYS2/Users/Public/run105.d/call_dvode.o"' had status 2 Error in cmpMgr$compile() : error loading dll file //BAST_SYS2/Users/Public/run105.d/run105.dll In addition: Warning message: running command 'C:/PROGRA~1/R/R-31~1.3/bin/R CMD SHLIB //BAST_SYS2/Users/Public/run105.d/run105.c //BAST_SYS2/Users/Public/run105.d/call_dvode.o -LC:/Users/Will/DOCUME~1/R/WIN-LI~1/3.1/RxODE/libs/x64 -lodeaux -lRblas -lgfortran' had status 1

On 29 September 2016 at 16:15, wwang-at-github < notifications@github.com> wrote:

I do not see the error msg. Is it blocked by gmail or somehow lost?

On Thu, Sep 29, 2016 at 11:05 AM, haessar <notifications@github.com

wrote:

Thank you for responding.

Say I have an R session open in one system and I have my work directory set to a directory on SYS2, which is a system on my local network:

​ When running the above code snippet I get the following error:

​(please excuse all the red pen). I can see that the problem indeed seems to stem from RxODE calling R CMD SHLIB.

Any help you can offer will be greatly appreciated,

Thanks,

Will

On 29 September 2016 at 15:10, wwang-at-github < notifications@github.com

wrote:

I'm glad you found RxODE useful!

I am unsure if I understand yourr difficulty correctly.

RxODE calls R CMD SHLIB to do the compiling. If R CMD SHLIB has no problem, I cannot see RxODE could have problem.

We can do a screen sharing if you feel comfortable so that I can appreciate the problem better.

Best, Wenping

On Wed, Sep 28, 2016 at 5:21 AM, haessar < notifications@github.com> wrote:

Hi,

We are very pleased with performance improvements RxODE enables over the likes of deSolve. The only issue is that we can't work out how to compile a model when the work directory is set to a different machine on the local network. This leads to all R scripts having to have a setwd() statement manually inputted to account for the current system running it. Is there something we're missing here?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdgibdGcRrJAAkQzQ50rFzIS03Vncks5qujGkgaJpZM4KImEc .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250 477043,

or

mute

the thread https://github.com/notifications/unsubscribe- auth/ALaIXdcckRUmwWk6VJNT- 0SORLzwDjS2ks5qu8bTgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/hallowkm/RxODE/issues/7#issuecomment- 250493683 , or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdqN6avKIcpmebNPlhGp9oRsaxgouks5qu9OwgaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/hallowkm/RxODE/issues/7#issuecomment-250496684 , or mute the thread https://github.com/notifications/unsubscribe- auth/ALaIXeEONtncny5AhfBirEz3_yHVT9BCks5qu9YrgaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250502398, or mute the thread https://github.com/notifications/unsubscribe-auth/ AMdZdscESj0CO2bmij0wb-abmIfGub9-ks5qu9q0gaJpZM4KImEc

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250506930, or mute the thread https://github.com/notifications/unsubscribe-auth/ ALaIXY2lqKI94bNzl3vuG4QRoVPVBrFVks5qu942gaJpZM4KImEc .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hallowkm/RxODE/issues/7#issuecomment-250776766, or mute the thread https://github.com/notifications/unsubscribe-auth/AMdZdqrdOnHmDqqvazjLB61LI_SwwD1Mks5qvSxCgaJpZM4KImEc .

wwang-at-github commented 8 years ago

one idea is to copy the dop853 header and librxode.a to places that gcc can definitely access.

mattfidler commented 8 years ago

This is likely fixed by the fork that we will integrate located at https://github.com/mattfidler/RxODE since headers and .a files are no longer needed to compile rxode models.

iamstein commented 7 years ago

Thanks a lot Matt! This worked for me too. Please upload this fork to CRAN ASAP (it's been like 8 months since your message). I've been working with some math grad students, trying to get them going with RxODE and we wasted about an hour trying to figure out why RxODE wouldn't work. This fixed the problem, but it'd be often if you uploading this to CRAN now so it's working right out of the box.

mattfidler commented 7 years ago

We have moved development to http://github.com/nlmixrdevelopment/RxODE/

We hope do publish a version of this on cran soon.