sanger-pathogens / Artemis

Artemis is a free genome viewer and annotation tool that allows visualization of sequence features and the results of analyses within the context of the sequence, and its six-frame translation
http://sanger-pathogens.github.io/Artemis
Other
236 stars 76 forks source link

Argument to increase memory size throws exception (Ubuntu) #305

Closed kubu4 closed 4 years ago

kubu4 commented 4 years ago

The documentation that explains how to increase memory doesn't actually explain how to pass the argument when starting Artemis. All it says is:

-Xmsn -Xmxn

Use -Xmsn to specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes.

Use -Xmxn to specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes.

When I try to start Artemis by passing a maximum memory size argument, this is what prints to the screen:

./art -Xmx20g
Starting Artemis with arguments: -mx2g -ms100m -noverify --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -Djdbc.drivers=org.postgresql.Driver -Dartemis.environment=UNIX  -Xmx20g
Exception in thread "Thread-0" java.lang.NullPointerException
    at uk.ac.sanger.artemis.j2ssh.SshFileManager.getSftpClient(SshFileManager.java:92)
    at uk.ac.sanger.artemis.j2ssh.SshFileManager.access$000(SshFileManager.java:47)
    at uk.ac.sanger.artemis.j2ssh.SshFileManager$SshGet.run(SshFileManager.java:419)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at uk.ac.sanger.artemis.j2ssh.SshFileManager$SshGet.getByteArray(SshFileManager.java:444)
    at uk.ac.sanger.artemis.j2ssh.SshFileManager.getFileContents(SshFileManager.java:378)
    at uk.ac.sanger.artemis.components.filetree.FileList.getFileContents(FileList.java:146)
    at uk.ac.sanger.artemis.components.filetree.RemoteFileNode.getFileContents(RemoteFileNode.java:327)
    at uk.ac.sanger.artemis.util.RemoteFileDocument.getInputStream(RemoteFileDocument.java:115)
    at uk.ac.sanger.artemis.io.DocumentEntryFactory.makeDocumentEntry(DocumentEntryFactory.java:86)
    at uk.ac.sanger.artemis.components.EntryFileDialog.getEntryFromFileHelper(EntryFileDialog.java:242)
    at uk.ac.sanger.artemis.components.EntryFileDialog.getEntryFromFile(EntryFileDialog.java:299)
    at uk.ac.sanger.artemis.components.ArtemisMain.readArgsAndOptions(ArtemisMain.java:419)
    at uk.ac.sanger.artemis.components.ArtemisMain$10.run(ArtemisMain.java:795)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Additionally, a pop up window shows up indicating "File not found -Xmx20g". When I click "OK" to dismiss the pop up window, a new window pops up and appears to be an SSH initiation window, as this window asks for login credentials for a hostname and a default port 22.

Any suggestions on how to pass the memory argument to Artemis?

kpepper commented 4 years ago

Hi @kubu4. There's some info in the FAQ section of the GitHub pages: http://sanger-pathogens.github.io/Artemis/Artemis/ Just set the ARTEMIS_JVM_FLAGS variable before you run the art script, e.g. export ARTEMIS_JVM_FLAGS="-mx4g -ms1g"

kubu4 commented 4 years ago

Thanks for the quick response! I managed to find/edit the art script, but thought I was missing something since the documentation indicated that the memory could be adjusted by passing an argument.

tseemann commented 4 years ago

You can also do this:

_JAVA_OPTIONS="-mx4g -ms1g" art genome.gff

all on one line