GAMS and R: Error when using igdx

Hi all,

I am trying to run GAMS and R together using package “gdxrrw”. I followed the steps written in here:

http://support.gams.com/doku.php?id=gdxrrw:interfacing_gams_and_r

I downloaded and installed package “gdxrrw_0.2.0_r_x86_64-redhat-linux-gnu.tar.gz”. The rest of the packages have been installed successfully. The problem comes when I tried to “initialize” the GAMS libraries using igdx() function. The following error appears, assuming that I have installed GAMS in /home/me/GAMS23.7:

igdx(‘/home/me/GAMS23.7’)
Error loading the GDX API from directory /home/me/GAMS23.7
Could not load symbol ‘gdxGetLastError’: (null)
The GDX library has been not been loaded

Also note that I have been using GAMS before, also in connection with Matlab, and it worked fine. I am using the following R vesion:

sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gdxrrw_0.2.0 reshape2_1.2.2

loaded via a namespace (and not attached):
[1] plyr_1.8 stringr_0.6.2 tools_2.15.2

It seems that no one else have posted a message about this error, so that is why I would like to share it with you. I would like to know if someone else had the same error and in that case to know how you solved it. Thanks a lot for your time.

Have a nice day!

Best

Javier


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hi Javier



I checked on my computer, and it runs fine.

  •      Just a hunch: did you load the package gdxrrw before running igdx?
    
  •      I use R 3.0.1 and gdxrrw 0.3.0. Perhaps upgrading R would help?
    




Renger





Here is the output I get on my windows machine


\

library(gdxrrw)

igdx(“c:/program files/gams”)

The GDX library has been loaded

GDX library load path: c:/program files/gams

sessionInfo()

R version 3.0.1 (2013-05-16)

Platform: x86_64-w64-mingw32/x64 (64-bit)



locale:

[1] LC_COLLATE=German_Switzerland.1252 LC_CTYPE=German_Switzerland.1252

[3] LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C

[5] LC_TIME=German_Switzerland.1252



attached base packages:

[1] stats graphics grDevices utils datasets methods base



other attached packages:

[1] gdxrrw_0.3.0 reshape2_1.2.2



loaded via a namespace (and not attached):

[1] compiler_3.0.1 fortunes_1.5-0 plyr_1.8 stringr_0.6.2 tools_3.0.1

gdxInfo()

  • Library location: unknown

  • Library version: GDX Library 24.1.2 r40979 Released Jun 16, 2013 WEI x86_64/MS Windows




From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of javiersaezgallego@gmail.com
Sent: Mittwoch, 17. Juli 2013 13:17
To: gamsworld@googlegroups.com
Subject: GAMS and R: Error when using igdx



Hi all,

I am trying to run GAMS and R together using package “gdxrrw”. I followed the steps written in here:

http://support.gams.com/doku.php?id=gdxrrw:interfacing_gams_and_r

I downloaded and installed package “gdxrrw_0.2.0_r_x86_64-redhat-linux-gnu.tar.gz”. The rest of the packages have been installed successfully. The problem comes when I tried to “initialize” the GAMS libraries using igdx() function. The following error appears, assuming that I have installed GAMS in /home/me/GAMS23.7:

igdx(‘/home/me/GAMS23.7’)
Error loading the GDX API from directory /home/me/GAMS23.7
Could not load symbol ‘gdxGetLastError’: (null)
The GDX library has been not been loaded

Also note that I have been using GAMS before, also in connection with Matlab, and it worked fine. I am using the following R vesion:

sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gdxrrw_0.2.0 reshape2_1.2.2

loaded via a namespace (and not attached):
[1] plyr_1.8 stringr_0.6.2 tools_2.15.2

It seems that no one else have posted a message about this error, so that is why I would like to share it with you. I would like to know if someone else had the same error and in that case to know how you solved it. Thanks a lot for your time.

Have a nice day!

Best

Javier


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hi Renger,

thanks a lot for the reply.

-Yes, I did load the library before calling igdx
-I have updated R to the latest version but I still get the same error. I suspect it is because I am not using the last version of GAMS; In that respect I can’t do anything because I don’t have the license for the latest version :slight_smile: Or might be something else, I have no clue.

Again, thanks a lot!

Have a nice day

Javier

PS:

\

sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gdxrrw_0.3.0 reshape2_1.2.2

loaded via a namespace (and not attached):
[1] plyr_1.8 stringr_0.6.2 tools_3.0.1

igdx(“/home/me/GAMS23.7”)
Error loading the GDX API from directory /home/me/GAMS23.7
Could not load symbol ‘gdxGetLastError’: (null)
The GDX library has not been loaded
igdx()
The GDX library has not been loaded


On Friday, July 19, 2013 2:13:07 PM UTC+2, Renger van Nieuwkoop wrote:

Hi Javier



I checked on my computer, and it runs fine.

  •      Just a hunch: did you load the package gdxrrw before running igdx?
    
  •      I use R 3.0.1 and gdxrrw 0.3.0. Perhaps upgrading R would help?
    




Renger





Here is the output I get on my windows machine


\

library(gdxrrw)

igdx(“c:/program files/gams”)

The GDX library has been loaded

GDX library load path: c:/program files/gams

sessionInfo()

R version 3.0.1 (2013-05-16)

Platform: x86_64-w64-mingw32/x64 (64-bit)



locale:

[1] LC_COLLATE=German_Switzerland.1252 LC_CTYPE=German_Switzerland.1252

[3] LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C

[5] LC_TIME=German_Switzerland.1252



attached base packages:

[1] stats graphics grDevices utils datasets methods base



other attached packages:

[1] gdxrrw_0.3.0 reshape2_1.2.2



loaded via a namespace (and not attached):

[1] compiler_3.0.1 fortunes_1.5-0 plyr_1.8 stringr_0.6.2 tools_3.0.1

gdxInfo()

  • Library location: unknown

  • Library version: GDX Library 24.1.2 r40979 Released Jun 16, 2013 WEI x86_64/MS Windows




From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of javiersa...@gmail.com
Sent: Mittwoch, 17. Juli 2013 13:17
To: gams...@googlegroups.com
Subject: GAMS and R: Error when using igdx



Hi all,

I am trying to run GAMS and R together using package “gdxrrw”. I followed the steps written in here:

http://support.gams.com/doku.php?id=gdxrrw:interfacing_gams_and_r

I downloaded and installed package “gdxrrw_0.2.0_r_x86_64-redhat-linux-gnu.tar.gz”. The rest of the packages have been installed successfully. The problem comes when I tried to “initialize” the GAMS libraries using igdx() function. The following error appears, assuming that I have installed GAMS in /home/me/GAMS23.7:

igdx(‘/home/me/GAMS23.7’)
Error loading the GDX API from directory /home/me/GAMS23.7
Could not load symbol ‘gdxGetLastError’: (null)
The GDX library has been not been loaded

Also note that I have been using GAMS before, also in connection with Matlab, and it worked fine. I am using the following R vesion:

sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gdxrrw_0.2.0 reshape2_1.2.2

loaded via a namespace (and not attached):
[1] plyr_1.8 stringr_0.6.2 tools_2.15.2

It seems that no one else have posted a message about this error, so that is why I would like to share it with you. I would like to know if someone else had the same error and in that case to know how you solved it. Thanks a lot for your time.

Have a nice day!

Best

Javier


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

Javier,

You need to be using a more recent version of GAMS. The symbol gdxGetLastError is not found in the GDX shared library on your older system.

I suggest you install the latest version of GAMS, in parallel with your existing 23.7 system. They coexist nicely, and you can run the new GAMS system without a license to do your R stuff.

-Steve


On Wed, Jul 17, 2013 at 7:17 AM, wrote:

Hi all,

I am trying to run GAMS and R together using package “gdxrrw”. I followed the steps written in here:

http://support.gams.com/doku.php?id=gdxrrw:interfacing_gams_and_r

I downloaded and installed package “gdxrrw_0.2.0_r_x86_64-redhat-linux-gnu.tar.gz”. The rest of the packages have been installed successfully. The problem comes when I tried to “initialize” the GAMS libraries using igdx() function. The following error appears, assuming that I have installed GAMS in /home/me/GAMS23.7:

igdx(‘/home/me/GAMS23.7’)
Error loading the GDX API from directory /home/me/GAMS23.7
Could not load symbol ‘gdxGetLastError’: (null)
The GDX library has been not been loaded

Also note that I have been using GAMS before, also in connection with Matlab, and it worked fine. I am using the following R vesion:

sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gdxrrw_0.2.0 reshape2_1.2.2

loaded via a namespace (and not attached):
[1] plyr_1.8 stringr_0.6.2 tools_2.15.2

It seems that no one else have posted a message about this error, so that is why I would like to share it with you. I would like to know if someone else had the same error and in that case to know how you solved it. Thanks a lot for your time.

Have a nice day!

Best

Javier


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.





\

Steven Dirkse, Ph.D.
GAMS Development Corp., Washington DC
Voice: (202)342-0180 Fax: (202)342-0181
sdirkse@gams.com
http://www.gams.com