Giter VIP home page Giter VIP logo

Comments (19)

benjamin22-314 avatar benjamin22-314 commented on July 17, 2024 2

Hi, everyone, I met an issue: "g++: error: unrecognized command line option ‘-Wl’", any help?

Hi @zhan0903 , I think that issue is from a typo in the 'deep-neuroevolution/gpu_implementation/gym_tensorflow/Makefile'.

line 30 is missing a ","
I think it should be
FLAGS+= -Wl,-rpath=$(ALE)/build
instead of
FLAGS+= -Wl -rpath=$(ALE)/build

from deep-neuroevolution.

zhan0903 avatar zhan0903 commented on July 17, 2024 1

Hi, everyone, I met an issue: "g++: error: unrecognized command line option ‘-Wl’", any help?

from deep-neuroevolution.

youshaox avatar youshaox commented on July 17, 2024 1

Hi the FLAGS+= -Wl,-rpath=$(ALE)/build does not work. I am still encounter the same error. Have your solved this issue?
@Nostrademous
@fps7806
@ylddd

from deep-neuroevolution.

fps7806 avatar fps7806 commented on July 17, 2024

I wonder if it has anything do to with the two different tensorflow versions you have installed. Try pip uninstall tensorflow and keep tensorflow-gpu as is

from deep-neuroevolution.

Nostrademous avatar Nostrademous commented on July 17, 2024

Tried that, no luck.

(env) nostrademous@DESKTOP-J9431IB:~/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow$ make
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'sysconfig'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'sysconfig'
g++ -std=c++11 -shared -fPIC -I -I/external/nsync/public -L -D_GLIBCXX_USE_CXX11_ABI=0 -O2 -DGOOGLE_CUDA=1 -Wl,-rpath=/build .//*.cpp .//ops/*.cpp -ltensorflow_framework -o gym_tensorflow.so
.//tf_env.cpp:22:49: fatal error: tensorflow/core/framework/op_kernel.h: No such file or directory
compilation terminated.
.//ops/indexedmatmul.cpp:7:42: fatal error: tensorflow/core/framework/op.h: No such file or directory
compilation terminated.
Makefile:45: recipe for target 'gym_tensorflow.so' failed
make: *** [gym_tensorflow.so] Error 1

from deep-neuroevolution.

Nostrademous avatar Nostrademous commented on July 17, 2024

I did get the gym to compile after reinstalling the latest version of tensorflow (1.8.0) like I have with tensorflow-gpu. The previous 0.12 version was per the top-level requirements pip in the repo which I guess is obsolete.

However, as compile now, I can't get the ga.py or es.py to work b/c apparently even though I compiled the gym without ALE support, those files require ALE support.

(env) nostrademous@DESKTOP-J9431IB:~/ML/deep-neuroevolution/gpu_implementation$ python es.py configurations/es_atari_config.json
/home/nostrademous/ML/env/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
05/12/2018 09:29:42 AM {
    "episode_cutoff_mode": 5000,
    "game": "frostbite",
    "l2coeff": 0.005,
    "model": "ModelVirtualBN",
    "mutation_power": 0.02,
    "num_test_episodes": 200,
    "num_validation_episodes": 30,
    "optimizer": {
        "args": {
            "stepsize": 0.01
        },
        "type": "adam"
    },
    "population_size": 5000,
    "return_proc_mode": "centered_rank",
    "timesteps": 250000000.0
}
05/12/2018 09:29:42 AM Logging to: /tmp/tmp9g4m8tav
Traceback (most recent call last):
  File "es.py", line 293, in <module>
    main(**exp)
  File "es.py", line 148, in main
    worker = ConcurrentWorkers(make_env, Model, batch_size=64)
  File "/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/neuroevolution/concurrent_worker.py", line 135, in __init__
    ref_batch = gym_tensorflow.get_ref_batch(make_env_f, sess, 128)
  File "/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/__init__.py", line 18, in get_ref_batch
    env = make_env_f(1)
  File "es.py", line 147, in make_env
    return gym_tensorflow.make(game=exp["game"], batch_size=b)
  File "/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/__init__.py", line 11, in make
    return StackFramesWrapper(atari.AtariEnv(game, batch_size, *args, **kwargs))
  File "/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari/__init__.py", line 8, in __init__
    raise NotImplementedError("gym_tensorflow was not compiled with ALE support.")
NotImplementedError: gym_tensorflow was not compiled with ALE support.
(env) nostrademous@DESKTOP-J9431IB:~/ML/deep-neuroevolution/gpu_implementation$

However, when I try to enable ALE in the Makefile and make the gym I get the following errors:

(env) nostrademous@DESKTOP-J9431IB:~/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow$ make
/home/nostrademous/ML/env/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
/home/nostrademous/ML/env/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
g++ -std=c++11 -shared -fPIC -I/home/nostrademous/ML/env/lib/python3.6/site-packages/tensorflow/include -I/home/nostrademous/ML/env/lib/python3.6/site-packages/tensorflow/include/external/nsync/public -L/home/nostrademous/ML/env/lib/python3.6/site-packages/tensorflow -D_GLIBCXX_USE_CXX11_ABI=0 -O2 -DGOOGLE_CUDA=1 -I/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/src -I/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/src/controllers -I/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/src/os_dependent -I/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/src/environment -I/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/src/external -L/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/build -Wl,-rpath=/home/nostrademous/ML/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari-py/atari_py/ale_interface/build .//*.cpp .//ops/*.cpp .//atari/*.cpp -ltensorflow_framework -lale -o gym_tensorflow.so
.//atari/tf_atari.cpp:3:29: fatal error: ale_interface.hpp: No such file or directory
compilation terminated.
Makefile:45: recipe for target 'gym_tensorflow.so' failed
make: *** [gym_tensorflow.so] Error 1

from deep-neuroevolution.

Alro10 avatar Alro10 commented on July 17, 2024

Hi everyone! I got the same issue, I think it depends on which version of gcc this repository uses to build gpu_implementation.

I found the following references:

Zardinality/TF-deformable-conv#1

tensorflow/tensorflow#15002

from deep-neuroevolution.

fps7806 avatar fps7806 commented on July 17, 2024

The experiments we included are for the Atari games which require ALE support, you can follow these instructions to compile. We are in the process of adding MuJoCo support, but without ALE the only environment available is the hard maze.

from deep-neuroevolution.

ylddd avatar ylddd commented on July 17, 2024

Hello, have your problem been solved? I have the same trouble with you....

from deep-neuroevolution.

benjamin22-314 avatar benjamin22-314 commented on July 17, 2024

Hi, everyone, I met an issue: "g++: error: unrecognized command line option ‘-Wl’", any help?

I'm having the same issue. Did you work it out @zhan0903 ?

from deep-neuroevolution.

matthewzar avatar matthewzar commented on July 17, 2024

A slight adaptation of the changes suggested by @BenjaminPhillips22 fixed it on my Linux Mint instance:
FLAGS+= -Wl,-rpath,$(ALE)/build

Notice there are no spaces, and 1 extra comma.

from deep-neuroevolution.

lisun-ai avatar lisun-ai commented on July 17, 2024

Hi, everyone, I met an issue: "g++: error: unrecognized command line option ‘-Wl’", any help?

Hi @zhan0903 , I think that issue is from a typo in the 'deep-neuroevolution/gpu_implementation/gym_tensorflow/Makefile'.

line 30 is missing a ","
I think it should be
FLAGS+= -Wl,-rpath=$(ALE)/build
instead of
FLAGS+= -Wl -rpath=$(ALE)/build

Compile successful on Ubuntu 16.04, Thanks!

from deep-neuroevolution.

youshaox avatar youshaox commented on July 17, 2024

@Nostrademous I have changed it to "FLAGS+= -Wl,-rpath=$(ALE)/build" and successfully make the gym_tensorflow. But have you guys solved "gym_tensorflow was not compiled with ALE support" error? I have been stuck here for a long time.

Error log:

Traceback (most recent call last):
File "es.py", line 293, in
main(**exp)
File "es.py", line 148, in main
worker = ConcurrentWorkers(make_env, Model, batch_size=64)
File "/home/shawn/workspace/test/deep-neuroevolution/gpu_implementation/neuroevolution/concurrent_worker.py", line 135, in init
ref_batch = gym_tensorflow.get_ref_batch(make_env_f, sess, 128)
File "/home/shawn/workspace/test/deep-neuroevolution/gpu_implementation/gym_tensorflow/init.py", line 18, in get_ref_batch
env = make_env_f(1)
File "es.py", line 147, in make_env
return gym_tensorflow.make(game=exp["game"], batch_size=b)
File "/home/shawn/workspace/test/deep-neuroevolution/gpu_implementation/gym_tensorflow/init.py", line 11, in make
return StackFramesWrapper(atari.AtariEnv(game, batch_size, *args, **kwargs))
File "/home/shawn/workspace/test/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari/init.py", line 8, in init
raise NotImplementedError("gym_tensorflow was not compiled with ALE support.")
NotImplementedError: gym_tensorflow was not compiled with ALE support.

from deep-neuroevolution.

denis-xiao avatar denis-xiao commented on July 17, 2024

@Nostrademous @youshaox I got the same problem "gym_tensorflow was not compiled with ALE support" error. Have you ever solved this problem?

from deep-neuroevolution.

fps7806 avatar fps7806 commented on July 17, 2024

@Nostrademous @youshaox I got the same problem "gym_tensorflow was not compiled with ALE support" error. Have you ever solved this problem?

That can be solved if you enable USE_ALE option: https://github.com/uber-research/deep-neuroevolution/blob/master/gpu_implementation/gym_tensorflow/Makefile#L2

Instructions to use ALE are here: https://github.com/uber-research/deep-neuroevolution/tree/master/gpu_implementation/gym_tensorflow/atari

from deep-neuroevolution.

youshaox avatar youshaox commented on July 17, 2024

I have already set USE_ALE=1 in the file "deep-neuroevolution/gpu_implementation/gym_tensorflow/Makefile".
USE_SDL := 0
USE_ALE := 1
USE_GPU := 1

Still, i get the above error.

Following the instructions in https://github.com/uber-research/deep-neuroevolution/tree/master/gpu_implementation/gym_tensorflow/atari:

  1. git clone https://github.com/fps7806/atari-py.git into the directory "deep-neuroevolution/gpu_implementation/gym_tensorflow".
  2. cd ./atari-py && make
  3. set USE_ALE := 1 in the file "deep-neuroevolution/gpu_implementation/gym_tensorflow/Makefile".
  4. cd ./gym_tensorflow && make
  5. python es.py configurations/es_atari_config.json
    I still get the above error.

Error log:

2019-04-27 08:02:27.225223: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8790 MB memory) -> physical GPU (device: 0, name: Tesla K40c, pci bus id: 0000:03:00.0, compute capability: 3.5)
Traceback (most recent call last):
File "es.py", line 293, in
main(**exp)
File "es.py", line 148, in main
worker = ConcurrentWorkers(make_env, Model, batch_size=64)
File "/home/shawn/workspace/research/deep-neuroevolution/gpu_implementation/neuroevolution/concurrent_worker.py", line 135, in init
ref_batch = gym_tensorflow.get_ref_batch(make_env_f, sess, 128)
File "/home/shawn/workspace/research/deep-neuroevolution/gpu_implementation/gym_tensorflow/init.py", line 18, in get_ref_batch
env = make_env_f(1)
File "es.py", line 147, in make_env
return gym_tensorflow.make(game=exp["game"], batch_size=b)
File "/home/shawn/workspace/research/deep-neuroevolution/gpu_implementation/gym_tensorflow/init.py", line 11, in make
return StackFramesWrapper(atari.AtariEnv(game, batch_size, *args, **kwargs))
File "/home/shawn/workspace/research/deep-neuroevolution/gpu_implementation/gym_tensorflow/atari/init.py", line 8, in init
raise NotImplementedError("gym_tensorflow was not compiled with ALE support.")
NotImplementedError: gym_tensorflow was not compiled with ALE support.

from deep-neuroevolution.

fps7806 avatar fps7806 commented on July 17, 2024

I have already set USE_ALE=1 in the file "deep-neuroevolution/gpu_implementation/gym_tensorflow/Makefile".
USE_SDL := 0
USE_ALE := 1
USE_GPU := 1

Still get the above error.

Interesting, can you try running cd ./gym_tensorflow && make clean && make

from deep-neuroevolution.

vijnasu avatar vijnasu commented on July 17, 2024

Running the python ga.py -c configurations/ga_atari_config.json -o out gives the following error. I tried most of the suggestions discussed above.

tensorflow.python.framework.errors_impl.NotFoundError: /home/administrator/Hands-on-Neuroevolution-with-Python/Chapter10/gym_tensorflow/gym_tensorflow.so: undefined symbol: ZN10tensorflow11ResourceMgr8DoDeleteERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10type_indexS8

from deep-neuroevolution.

thisisjasleen avatar thisisjasleen commented on July 17, 2024

Hi, everyone, I met an issue: "g++: error: unrecognized command line option ‘-Wl’", any help?

Hi @zhan0903 , I think that issue is from a typo in the 'deep-neuroevolution/gpu_implementation/gym_tensorflow/Makefile'.

line 30 is missing a ","
I think it should be
FLAGS+= -Wl,-rpath=$(ALE)/build
instead of
FLAGS+= -Wl -rpath=$(ALE)/build

I am still having some trouble with the same error. Does somebody know how to resolve it?

from deep-neuroevolution.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.