Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: COMETS_HOME environmental variable is not set #8

Open
2132030 opened this issue Feb 15, 2024 · 3 comments
Open

Error: COMETS_HOME environmental variable is not set #8

2132030 opened this issue Feb 15, 2024 · 3 comments

Comments

@2132030
Copy link

2132030 commented Feb 15, 2024

I am using Linux and MATLAB_R2021b. I'm trying to run the comets simulation with this code:

runComets(layout,cometsDirectory)
I got this Error:
Error using runCometsOnDirectory
COMETS_HOME environmental variable is not set

' %% Add COMETS Java Classpath to MATLAB
cometshome = getenv('COMETS_HOME');
if isempty(cometshome)
error('COMETS_HOME environmental variable is not set')
end
gurobihome = getenv('GUROBI_HOME');
if isempty(gurobihome)
error('GUROBI_HOME environmental variable is not set')
end
javaclasspath(cometshome); % add COMETS classpath to MATLAB
javaclasspath(gurobihome); '

@dukovski
Copy link
Contributor

You need these system variables set properly. What system are you using? Windows, Linux?

@2132030
Copy link
Author

2132030 commented Feb 22, 2024

Linux

@dukovski
Copy link
Contributor

You need to include these lines in your .bashrc file (or equivalent for other shells):

export COMETS_HOME=/projectnb/cometsfba/comets_2.11.1
export PATH=$PATH:$COMETS_HOME
export GUROBI_HOME=/share/pkg.7/gurobi/9.0.0/install/
export GUROBI_COMETS_HOME=/share/pkg.7/gurobi/9.0.0/install/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GUROBI_COMETS_HOME/lib/

export GUROBI_PATH=$GUROBI_HOME
export PATH=$PATH:$GUROBI_HOME/bin

Of course, you need to edit it to your system, the first line is setting the variable that is missing in your case. Set it to wherever you installed Comets. Let me know how it goes.

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

No branches or pull requests

2 participants