Forum

Author Topic: agisoft on g2.8xlarge (aws ec2)  (Read 4624 times)

Goran

  • Newbie
  • *
  • Posts: 10
    • View Profile
agisoft on g2.8xlarge (aws ec2)
« on: April 13, 2017, 03:57:20 PM »
Hey,
I try to run photoscan 1.3.1 on aws ec2 instance g2.8xlarge since this is crucial to our company needs.
os is:
Quote
Distributor ID:   Ubuntu
Description:   Ubuntu 16.04.2 LTS
Release:   16.04
Codename:   xenial

I get following error:
Quote
QXcbConnection: Could not connect to display
Aborted (core dumped)

What could that be?

Goran

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #1 on: April 13, 2017, 04:08:43 PM »
I got it running with xvfb-run.
is that the standard way to do it?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #2 on: April 13, 2017, 05:09:35 PM »
Hello Goran,

Are you running the scripts in headless mode on this AWS instance?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Goran

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #3 on: April 13, 2017, 06:04:47 PM »
Hey Alexey,

yes I am starting script with -r.
it works, but I am not sure the rendering process takes full use of the capabilities of this instance.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #4 on: April 13, 2017, 06:06:37 PM »
Hello Goran,

You can add "-platform offscreen" argument to your command in order to avoid the issue of the first post:
Code: [Select]
./photoscan.sh -platform offscreen -r script.py
Best regards,
Alexey Pasumansky,
Agisoft LLC

Goran

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #5 on: April 13, 2017, 06:43:01 PM »
yes "-platform offscreen" worked, thanks  8)
my other question is: do I need to install the NVIDIA Driver on Amazon Linux as referred to here
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/accelerated-computing-instances.html#install-nvidia-driver
to make use of the gpu of the instance?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #6 on: April 13, 2017, 06:45:16 PM »
Hello Goran,

If you do not see any GPU usage during image matching and depth maps calculation in the log even with the gpu_mask set up, then you should install recommended drivers.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Goran

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #7 on: April 13, 2017, 07:12:13 PM »
I guess it´s the case since
Code: [Select]
numGpu = PhotoScan.app.enumGPUDevices()
print(numGpu)

returns
Code: [Select]
[]
or do I have to set up gpu_mask in order to get list returned?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: agisoft on g2.8xlarge (aws ec2)
« Reply #8 on: April 13, 2017, 09:56:34 PM »
Hello Goran,

gpu_mask is used only for processing, so if the list of devices is empty, then no GPUs are recognized.
Best regards,
Alexey Pasumansky,
Agisoft LLC