sprint python error: TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'

53 views
Skip to first unread message

cisb...@gmail.com

unread,
Apr 17, 2015, 1:06:37 PM4/17/15
to emsp...@googlegroups.com
Dear All
Does anybody have any idea what the below python error means please ?

spring --version && springenv e2version.py
Spring environment loaded.
GUI from package Emspring-0.83.1449
Spring environment loaded.
EMAN 2.1 alpha2 (CVS 2013/08/07 17:01:09)
Your EMAN2 is running on:  Red Hat Enterprise Linux Workstation release 6.2 (Santiago)
Red Hat Enterprise Linux Workstation release 6.2 (Santiago) 2.6.32-220.el6.x86_64 x86_64
Your Python version is:  2.7.2

ERROR:

Traceback (most recent call last):
  File "/src/spring/spring_v0-83-1449/bin/segmentexam_mpi", line 137, in <module>
    sys.exit(spring.segment2d.segmentexam_mpi.main())
  File "/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam_mpi.py", line 175, in main
    stack.add_up_power_spectra()
  File "/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam_mpi.py", line 158, in add_up_power_spectra
    self.correlate_layer_line_region_mpi(segment_ids, avg_periodogram, power_infilestack)
  File "/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam_mpi.py", line 120, in correlate_layer_line_region_mpi
    self.enter_correlation_values_in_database(correlations, segment_ids)
  File "/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam.py", line 813, in enter_correlation_values_in_database
    avg_ccc_layer = np.mean([each_cc for each_cc in cc_per_helix])
  File "/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2727, in mean
    out=out, keepdims=keepdims)
  File "/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/numpy/core/_methods.py", line 66, in _mean
    ret = umr_sum(arr, axis, dtype, out, keepdims)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'


Thank you
Dr Suhail A Islam
Imperial College London


Carsten Sachse

unread,
Apr 19, 2015, 7:25:47 AM4/19/15
to emsp...@googlegroups.com
Dear Suhail,

In order to diagnose the error it would be helpful to know which program of the suite and which parameters you have used.

The most complete output error message you obtain directly from the command line by:
e.g.
% segmentexam --f parfile.par

Thanks.

Best wishes,


Carsten

cisb...@gmail.com

unread,
Apr 22, 2015, 1:48:38 PM4/22/15
to emsp...@googlegroups.com
Dear Carsten

Thank you for your reply. Here is further information:

The program used was segmentexam and the parameters together with the output error messages follow:


segmentexam --f segmentexam_22_Apr_2015_17_28_23_9374.par

Spring environment loaded.

****************************************************************************

* Hwloc has encountered what looks like an error from the operating system.

*

* object intersection without inclusion!

* Error occurred in topology.c line 594

*

* Please report this error message to the hwloc user's mailing list,

* along with the output from the hwloc-gather-topology.sh script.

****************************************************************************

****************************************************************************

* Hwloc has encountered what looks like an error from the operating system.

*

* object intersection without inclusion!

* Error occurred in topology.c line 594

*

* Please report this error message to the hwloc user's mailing list,

* along with the output from the hwloc-gather-topology.sh script.

****************************************************************************


Program to examine all excised in-plane rotated segments and compute their collapsed (1D) and 

2D power spectrum and width profile of helices


Input parameters are read from segmentexam_22_Apr_2015_17_28_23_9374.par

The following input parameters have been received:

Image input stack                        = /exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/SPRING_sk_COMPLETE_4class.hdf

Diagnostic plot                          = SPRING_sk_COMPLETE_4class_segexam_085_BEST_Width_CC.pdf

Power spectrum output image              = SPRING_sk_COMPLETE_4class_pow_085_BEST_Width_CC.hdf

Enhanced power spectrum option           = True

Enhanced power spectrum output image     = SPRING_sk_COMPLETE_4class_Epow_085_BEST_Width_CC.hdf

Pixel size in Angstrom                   = 1.03

Estimated helix width in Angstrom        = 350

Power spectrum resolution cutoff in 1/Angstrom = 0.1

Compute layer-line correlation option    = True

Layer-line region in 1/Angstrom          = (0.001, 0.08)

Reference power spectrum                 = True

Power spectrum input image               = /exports/csb/csb/home/segmentexam_14_Apr_2015_18_16_59_9374/SPRING_sk_COMPLETE_4class_pow_CC_085_BEST50percent.hdf

spring.db file                           = /exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/spring.db

Micrographs select option                = True

Include or exclude micrographs           = include

Micrographs list                         = 85

Helices select option                    = False

Include or exclude helices               = include

Helices list                             = 

Segments select option                   = False

Include or exclude segments              = include

Segment file                             = /exports/csb/csb/home/Width_10A.dat

Classes select option                    = False

Include or exclude classes               = include

Class type                               = class_id

Classes list                             = 

Persistence class option                 = False

Persistence class length in Angstrom     = 1

Class occupancy threshold                = 0.0

Straightness select option               = False

Include or exclude straight helices      = include

Persistence length range                 = (0, 0)

Layer line correlation select option     = False

Include or exclude segments based on layer-line correlation = include

Correlation layer line range             = (0, 0)

Defocus select option                    = False

Include or exclude defocus range         = include

Defocus range                            = (0, 0)

Astigmatism select option                = False

Include or exclude astigmatic segments   = include

Astigmatism range                        = (0, 0)

MPI option                               = True

Number of CPUs                           = 8

Temporary directory                      = /exports/csb/csb/home/

/exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/SPRING_sk_COMPLETE_4class.hdf found

/exports/csb/csb/home/segmentexam_14_Apr_2015_18_16_59_9374/SPRING_sk_COMPLETE_4class_pow_CC_085_BEST50percent.hdf found

/exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/spring.db found

/exports/csb/csb/home/ found

****************************************************************************

* Hwloc has encountered what looks like an error from the operating system.

*

* object intersection without inclusion!

* Error occurred in topology.c line 594

*

* Please report this error message to the hwloc user's mailing list,

* along with the output from the hwloc-gather-topology.sh script.

****************************************************************************


Program to examine all excised in-plane rotated segments and compute their collapsed (1D) and 

2D power spectrum and width profile of helices


Input parameters are read from parfile_63065.par

The following input parameters have been received:

Image input stack                        = /exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/SPRING_sk_COMPLETE_4class.hdf

Diagnostic plot                          = SPRING_sk_COMPLETE_4class_segexam_085_BEST_Width_CC.pdf

Power spectrum output image              = SPRING_sk_COMPLETE_4class_pow_085_BEST_Width_CC.hdf

Enhanced power spectrum option           = True

Enhanced power spectrum output image     = SPRING_sk_COMPLETE_4class_Epow_085_BEST_Width_CC.hdf

Pixel size in Angstrom                   = 1.03

Estimated helix width in Angstrom        = 350

Power spectrum resolution cutoff in 1/Angstrom = 0.1

Compute layer-line correlation option    = True

Layer-line region in 1/Angstrom          = (0.001, 0.08)

Reference power spectrum                 = True

Power spectrum input image               = /exports/csb/csb/home/segmentexam_14_Apr_2015_18_16_59_9374/SPRING_sk_COMPLETE_4class_pow_CC_085_BEST50percent.hdf

spring.db file                           = /exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/spring.db

Micrographs select option                = True

Include or exclude micrographs           = include

Micrographs list                         = 85

Helices select option                    = False

Include or exclude helices               = include

Helices list                             = 

Segments select option                   = False

Include or exclude segments              = include

Segment file                             = /exports/csb/csb/home/Width_10A.dat

Classes select option                    = False

Include or exclude classes               = include

Class type                               = class_id

Classes list                             = 

Persistence class option                 = False

Persistence class length in Angstrom     = 1

Class occupancy threshold                = 0.0

Straightness select option               = False

Include or exclude straight helices      = include

Persistence length range                 = (0, 0)

Layer line correlation select option     = False

Include or exclude segments based on layer-line correlation = include

Correlation layer line range             = (0, 0)

Defocus select option                    = False

Include or exclude defocus range         = include

Defocus range                            = (0, 0)

Astigmatism select option                = False

Include or exclude astigmatic segments   = include

Astigmatism range                        = (0, 0)

MPI option                               = True

Number of CPUs                           = 8

Temporary directory                      = /exports/csb/csb/home/

/exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/SPRING_sk_COMPLETE_4class.hdf found

/exports/csb/csb/home/segmentexam_14_Apr_2015_18_16_59_9374/SPRING_sk_COMPLETE_4class_pow_CC_085_BEST50percent.hdf found

/exports/csb/csb/home/segment_31_Mar_2015_13_30_05_45620/spring.db found

/exports/csb/csb/home/ found

Traceback (most recent call last):

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/bin/segmentexam_mpi", line 137, in <module>

    sys.exit(spring.segment2d.segmentexam_mpi.main())

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam_mpi.py", line 175, in main

    stack.add_up_power_spectra()

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam_mpi.py", line 158, in add_up_power_spectra

    self.correlate_layer_line_region_mpi(segment_ids, avg_periodogram, power_infilestack)

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam_mpi.py", line 120, in correlate_layer_line_region_mpi

    self.enter_correlation_values_in_database(correlations, segment_ids)

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/emspring-0.83.1449-py2.7.egg/spring/segment2d/segmentexam.py", line 813, in enter_correlation_values_in_database

    avg_ccc_layer = np.mean([each_cc for each_cc in cc_per_helix])

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2727, in mean

    out=out, keepdims=keepdims)

  File "/exports/csb/csb/soft/Linux64/src/spring/spring_v0-83-1449/lib/python2.7/site-packages/numpy/core/_methods.py", line 66, in _mean

    ret = umr_sum(arr, axis, dtype, out, keepdims)

TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'


Rank 0 on machine csbserv1 with process ID 63072 raised an error message. Find the corresponding error message above. All other MPI processes are aborted. Ignore the error messages thereafter as they can arise as a result of the aborting procedure.

--------------------------------------------------------------------------

MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD 

with errorcode 1.


NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.

You may or may not see output from other processes, depending on

exactly when Open MPI kills them.

--------------------------------------------------------------------------

--------------------------------------------------------------------------

mpirun has exited due to process rank 0 with PID 63072 on

node csbserv1 exiting improperly. There are two reasons this could occur:


1. this process did not call "init" before exiting, but others in

the job did. This can cause a job to hang indefinitely while it waits

for all processes to call "init". By rule, if one process calls "init",

then ALL processes must call "init" prior to termination.


2. this process called "init", but exited without calling "finalize".

By rule, all processes that call "init" MUST call "finalize" prior to

exiting or it will be considered an "abnormal termination"


This may have caused other processes in the application to be

terminated by signals sent by mpirun (as reported here).

--------------------------------------------------------------------------

****************************************************************************

* Hwloc has encountered what looks like an error from the operating system.

*

* object intersection without inclusion!

* Error occurred in topology.c line 594

*

* Please report this error message to the hwloc user's mailing list,

* along with the output from the hwloc-gather-topology.sh script.

****************************************************************************


The following temporary directories were cleared and removed:

  rank  host        process_id  temporary directory

------  --------  ------------  --------------------------------------------------------------------------------------------------------

     0  csbserv1         63072  /exports/csb/csb/home/22_Apr_2015_17_53_39-63072/

     1  csbserv1         63073  /exports/csb/csb/home/22_Apr_2015_17_53_39-63073/

     2  csbserv1         63074  /exports/csb/csb/home/22_Apr_2015_17_53_39-63074/

     3  csbserv1         63075  /exports/csb/csb/home/22_Apr_2015_17_53_39-63075/

     4  csbserv1         63076  /exports/csb/csb/home/22_Apr_2015_17_53_39-63076/

     5  csbserv1         63077  /exports/csb/csb/home/22_Apr_2015_17_53_39-63077/

     6  csbserv1         63078  /exports/csb/csb/home/22_Apr_2015_17_53_39-63078/

     7  csbserv1         63079  /exports/csb/csb/home/22_Apr_2015_17_53_39-63079/



Carsten Sachse

unread,
Apr 24, 2015, 3:42:40 AM4/24/15
to emsp...@googlegroups.com
Dear Suhail,

Thanks for providing the input parameters. I think the following parameter pair may cause the trouble:
Compute layer-line correlation option    = True

Layer-line region in 1/Angstrom          = (0.001, 0.08) 

Please, swap the values to (0.08, 0.001) as it is specified from low- to high resolution.

Best wishes,


Carsten
...

cisb...@gmail.com

unread,
Apr 24, 2015, 7:13:36 AM4/24/15
to emsp...@googlegroups.com
Carsten Hi
The user tried this and reports that he is still getting the same error.
Regards
suhail

Carsten Sachse

unread,
Apr 24, 2015, 9:19:43 AM4/24/15
to emsp...@googlegroups.com
Dear Suhail,

I think I spotted one way I had not anticipated how to use the program.

You are requesting 'layer-line correlation' while including only a small fractions of micrographs (85). The 'Compute layer-line correlation' will only work for the entire data set. Please, don't exclude any data for this computation. If this fixes the problem I will make sure to prevent these settings in the future. 

In case you do want to get power spectra for a subset of segments you will need to turn off 'Compute layer-line correlation'.

Best wishes,


Carsten
Reply all
Reply to author
Forward
0 new messages