JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for CCPEM Archives


CCPEM Archives

CCPEM Archives


CCPEM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CCPEM Home

CCPEM Home

CCPEM  May 2017

CCPEM May 2017

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: GPUs running out of memory

From:

Bjoern Forsberg <[log in to unmask]>

Reply-To:

Bjoern Forsberg <[log in to unmask]>

Date:

Wed, 31 May 2017 16:04:13 +0200

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (183 lines)

Hi Chris,

RELION manages memory in two ways; "static" and fully dynamic. Static 
memory is allocated at the start of an iteration and mostly holds large 
volumes and reconstructions throughout the iteration. Dynamic memory is 
allocated and released on a per-particle basis. Because the need for 
dynamic space is unpredictable, RELION currently grabs as much as it can 
and manages it though a custom allocator, hence "CudaCustomAllocator out 
of memory".

This is to clarify that you are running out of dynamic memory, as 
opposed to large volumes etc; the box-size does not matter. This tends 
to indicate very noisy/uncertain/difficult data for which RELION to 
align/classify. RELION is in these cases extremely cautious, calculating 
extremely many points of possible interest. This level of caution is 
rarely necessary, but it is default behavior so as to maintain fidelity. 
You can recognize this situation by very large (>10'000) numbers of 
significant points of interest, as listed under the label 
_rlnNumberOfSignificants in the _data.star file.

You can impose a limit on the number of points to examine by using the 
flag --maxsig. This truncates the detailed search beyond what RELION 
normally uses. For 2D, --maxsig 50 has worked well in both speeding up 
and differentiating classes.  For 3D --maxsig 2000 is a safe setting 
which will cause minimal effects while still safeguarding against large 
dynamic allocations. As suggested by Pablo, you can also reduce the 
number of threads, but I expect this will have a lesser effect and slow 
you down, whereas --maxsig tends to speed things up.

Disclaimer: setting --maxsig too low will start to compromise the 
Bayesian approach, but generally only in the low-res regime, where the 
maxsig-limit takes any effect.

/Björn


On 05/31/2017 02:54 PM, Pablo Conesa wrote:
> Hi Chris,
>
> It it seems you entered 15 threads and 3 mpis.
>
> 15 threads seems to be too high.
>
> You could try 4 Mpis (one for the master and 1 for each GPU) and 1 
> thread.
>
> Number of MPI should be chosen taking into account: GPU number, GPU 
> memory available and particle box size.
>
> In our runs, for a 200x200 box we use  2+1 mpi (1 is for the master 
> process) for a 8GB GPU memory.
>
>
> All the best, Pablo.
>
> On 31/05/17 12:01, Christopher Browning wrote:
>> Hi,
>>
>> I have an issue with Scipion where when I launch a Relion 
>> 3D-Classification run, where when it starts the 3rd iteration it 
>> crashes and complains of a lack of GPU memory. Our system consists of 
>> 2x NVIDIA Titan XP and 1x NVIDIA Quadro P5000 GPU cards. I've had 
>> this error message come up sporadically for other runs but used to go 
>> away when I relaunched the run, but when I try this specific C1 
>> 3D-classification it crashes. Is there something one can do to manage 
>> the memory usage better? I've attached the error message below.
>>
>> Many Thanks,
>>
>> Chris
>>
>>
>> Expectation iteration 3 of 25
>> 00128:   4.92/22.73 min ............~~(,_,">ERROR: 
>> CudaCustomAllocator out of memory
>> 00129:    [requestedSpace:             60989440 B]
>> 00130:    [largestContinuousFreeSpace: 22902272 B]
>> 00131:    [totalFreeSpace:             53996032 B]
>> 00132:   [512B] (36864B) (165888B) (36864B) (512B) (512B) (512B) 
>> (512B) [3584B] (512B) [12800B] (165888B) (36864B) (165888B) (36864B) 
>> (165888B) (36864B) (165888B) (36864B) (165888B) [56320B] (110592B) 
>> (110592B) (110592B) (110592B) (110592B) [471040B] (108032B) (109056B) 
>> (108032B) (109056B) (108032B) (109056B) (108032B) (109056B) (108032B) 
>> (109056B) (70753792B) (141507072B) (141507072B) (141507072B) 
>> (141507072B) (283014144B) [7581184B] (69500928B) (139001856B) 
>> (139001856B) (139001856B) (139001856B) (278003712B) [7446528B] 
>> (73374720B) (146748928B) (146748928B) (146748928B) (146748928B) 
>> (293497344B) [7861760B] (71493120B) (142985728B) (142985728B) 
>> (142985728B) (142985728B) (285970944B) [7660032B] (72887808B) 
>> (145775616B) (145775616B) (145775616B) (145775616B) (291551232B) 
>> (48721920B) (48721920B) (54879232B) (54879232B) (57516544B) 
>> (57516544B) (61488128B) (61488128B) [22902272B] = 5156189696B
>> 00133:   [localhost:15970] *** Process received signal ***
>> 00134:   [localhost:15970] Signal: Segmentation fault (11)
>> 00135:   [localhost:15970] Signal code: Address not mapped (1)
>> 00136:   [localhost:15970] Failing at address: 0x28
>> 00137:   [localhost:15970] [ 0] 
>> /lib64/libpthread.so.0(+0xf370)[0x7f84fa7fc370]
>> 00138:   [localhost:15970] [ 1] 
>> /usr/local/scipion/software/em/relion-2.0/lib/librelion_lib.so(_ZN13CudaGlobalPtrIfLb1EE11free_if_setEv+0x40)[0x7f850526b0d0]
>> 00139:   [localhost:15970] [ 2] 
>> /usr/local/scipion/software/em/relion-2.0/lib/librelion_gpu_util.so(_Z37convertAllSquaredDifferencesToWeightsIfEvjR21OptimisationParamtersR18SamplingParametersP11MlOptimiserP15MlOptimiserCudaRSt6vectorI16IndexedDataArraySaIS9_EERS8_IS8_I20IndexedDataArrayMaskSaISD_EESaISF_EER13CudaGlobalPtrIfLb1EEb+0x3267)[0x7f84fb519f67]
>> 00140:   [localhost:15970] [ 3] 
>> /usr/local/scipion/software/em/relion-2.0/lib/librelion_gpu_util.so(_ZN15MlOptimiserCuda32doThreadExpectationSomeParticlesEi+0x167a)[0x7f84fb4f2eca]
>> 00141:   [localhost:15970] [ 4] 
>> /usr/local/scipion/software/em/relion-2.0/lib/librelion_lib.so(_Z36globalThreadExpectationSomeParticlesR14ThreadArgument+0x28)[0x7f850526aa78]
>> 00142:   [localhost:15970] [ 5] 
>> /usr/local/scipion/software/em/relion-2.0/lib/librelion_lib.so(_Z11_threadMainPv+0x1d)[0x7f850529d86d]
>> 00143:   [localhost:15970] [ 6] 
>> /lib64/libpthread.so.0(+0x7dc5)[0x7f84fa7f4dc5]
>> 00144:   [localhost:15970] [ 7] 
>> /lib64/libc.so.6(clone+0x6d)[0x7f84fa52373d]
>> 00145:   [localhost:15970] *** End of error message ***
>> 00146: 
>> --------------------------------------------------------------------------
>> 00147:   mpirun noticed that process rank 1 with PID 15970 on node 
>> localhost exited on signal 11 (Segmentation fault).
>> 00148: 
>> --------------------------------------------------------------------------
>> 00149:   Traceback (most recent call last):
>> 00150:     File "/usr/local/scipion/pyworkflow/protocol/protocol.py", 
>> line 182, in run
>> 00151:       self._run()
>> 00152:     File "/usr/local/scipion/pyworkflow/protocol/protocol.py", 
>> line 228, in _run
>> 00153:       resultFiles = self._runFunc()
>> 00154:     File "/usr/local/scipion/pyworkflow/protocol/protocol.py", 
>> line 224, in _runFunc
>> 00155:       return self._func(*self._args)
>> 00156:     File 
>> "/usr/local/scipion/pyworkflow/em/packages/relion/protocol_base.py", 
>> line 741, in runRelionStep
>> 00157:       self.runJob(self._getProgram(), params)
>> 00158:     File "/usr/local/scipion/pyworkflow/protocol/protocol.py", 
>> line 1077, in runJob
>> 00159:       self._stepsExecutor.runJob(self._log, program, 
>> arguments, **kwargs)
>> 00160:     File "/usr/local/scipion/pyworkflow/protocol/executor.py", 
>> line 56, in runJob
>> 00161:       env=env, cwd=cwd)
>> 00162:     File "/usr/local/scipion/pyworkflow/utils/process.py", 
>> line 51, in runJob
>> 00163:       return runCommand(command, env, cwd)
>> 00164:     File "/usr/local/scipion/pyworkflow/utils/process.py", 
>> line 65, in runCommand
>> 00165:       check_call(command, shell=True, stdout=sys.stdout, 
>> stderr=sys.stderr, env=env, cwd=cwd)
>> 00166:     File 
>> "/usr/local/scipion/software/lib/python2.7/subprocess.py", line 540, 
>> in check_call
>> 00167:       raise CalledProcessError(retcode, cmd)
>> 00168:   CalledProcessError: Command 'mpirun -np 3 -bynode `which 
>> relion_refine_mpi` --gpu  --pool 3 --angpix 1.35 
>> --dont_combine_weights_via_disc  --ref 
>> Runs/004791_ProtRelionClassify3D/tmp/output_volume.mrc --scale 
>> --offset_range 5.0 --ini_high 30.0 --offset_step 2.0 --healpix_order 
>> 2 --tau2_fudge 2 --ctf  --oversampling 1 --o 
>> Runs/004791_ProtRelionClassify3D/extra/relion --i 
>> Runs/004791_ProtRelionClassify3D/input_particles.star --iter 25 
>> --zero_mask  --norm  --firstiter_cc  --sym c1 --K 6 --solvent_mask 
>> Runs/004119_ProtRelionCreateMask3D/extra/mask.mrc --flatten_solvent  
>> --particle_diameter 190  --j 15' returned non-zero exit status 139
>> 00169:   Protocol failed: Command 'mpirun -np 3 -bynode  `which 
>> relion_refine_mpi` --gpu  --pool 3 --angpix 1.35 
>> --dont_combine_weights_via_disc  --ref 
>> Runs/004791_ProtRelionClassify3D/tmp/output_volume.mrc --scale 
>> --offset_range 5.0 --ini_high 30.0 --offset_step 2.0 --healpix_order 
>> 2 --tau2_fudge 2 --ctf  --oversampling 1 --o 
>> Runs/004791_ProtRelionClassify3D/extra/relion --i 
>> Runs/004791_ProtRelionClassify3D/input_particles.star --iter 25 
>> --zero_mask  --norm  --firstiter_cc  --sym c1 --K 6 --solvent_mask 
>> Runs/004119_ProtRelionCreateMask3D/extra/mask.mrc --flatten_solvent  
>> --particle_diameter 190  --j 15' returned non-zero exit status 139
>> 00170:   FAILED: runRelionStep, step 2
>> 00171:     2017-05-31 10:48:22.696428
>> 00172:   ------------------- PROTOCOL FAILED (DONE 2/3)
>>
>>
>> This email message and any attachments are confidential and intended 
>> for use by the addressee(s) only. If you are not the intended 
>> recipient, please notify me immediately by replying to this message, 
>> and destroy all copies of this message and any attachments. Thank you.

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager